fix: prove presentation runtime smoke - #1067
Conversation
|
Warning Review limit reached
More reviews will be available in 34 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (128)
📝 WalkthroughWalkthrough
Changes프레젠테이션 런타임 패키지 베타 승격
Sequence Diagram(s)sequenceDiagram
participant CISmoke as CI 스모크
participant createSsrHandler as createSsrHandler
participant ASSETS as ASSETS Fetcher
participant API_WORKER as API_WORKER Fetcher
participant PageDataProvider
participant SmokePage
rect rgba(30, 100, 200, 0.5)
Note over CISmoke,SmokePage: Worker SSR 스모크 흐름
CISmoke->>createSsrHandler: GET /assets/app.js
createSsrHandler->>ASSETS: fetch(/assets/app.js)
ASSETS-->>CISmoke: 200 asset 응답
CISmoke->>createSsrHandler: GET /api/ping
createSsrHandler->>API_WORKER: fetch(/api/ping)
API_WORKER-->>CISmoke: {pong:true}
CISmoke->>createSsrHandler: GET / (SMOKE_FLAG=smoke-flag)
createSsrHandler->>PageDataProvider: {envValue, message:hydrated, platform}
PageDataProvider->>SmokePage: usePageData / usePageMeta 제공
SmokePage-->>CISmoke: page-data:hydrated:cloudflare:smoke-flag:/
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📊 Benchmark Results❌ Some benchmarks failed Gate failures
Updated: 2026-06-21T17:46:59.733Z · Commit: 3dbe1c5 |
48d9a72 to
0afa6e2
Compare
There was a problem hiding this comment.
Actionable comments posted: 13
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/create-croco-app/templates/addons/web-meta-vite-fullstack/ssr-worker/src/smoke/presentationSmoke.ts`:
- Around line 1-2: Reorganize the imports in the presentationSmoke.ts file to
follow the guideline order: external packages (like React) should be imported
first, followed by internal `@croco/*` packages. Additionally, any type imports
(such as ReactElement) must be separated into their own `import type` statements
instead of being mixed with regular imports. Ensure all
`@croco/frontend-cloudflare` and `@croco/frontend-react` imports are grouped
together after external package imports, with type-only imports properly
declared using the `import type` syntax.
In `@packages/create-croco-app/templates/addons/web-meta-vite/package.json.hbs`:
- Around line 7-8: The build script outputs to dist/client but the preview
script uses the default dist directory, causing a mismatch that will break
preview functionality. Update the preview script to explicitly specify the same
output directory using the --outDir dist/client flag to ensure it references the
correct build artifacts that were created by the build script.
In `@packages/create-croco-app/templates/addons/web-meta-vite/src/client.tsx`:
- Around line 16-18: The throw statement in the hydration root element
validation is using a generic Error class, which violates the coding guideline
to only throw Problem subclasses. Replace the generic Error instantiation with
an appropriate Problem subclass that conveys the same error message about the
missing Croco hydration root element. Ensure the Problem subclass is imported
and used consistently with the rest of the codebase standards.
In
`@packages/create-croco-app/templates/addons/web-meta-vite/src/smoke/presentationSmoke.ts`:
- Line 1: The import statements do not follow the correct import order and type
import conventions. Reorder the imports so that external packages (like React)
come first, followed by internal `@croco/`* packages. Additionally, separate any
type-only imports by using the `type` keyword in a dedicated import statement
rather than mixing them with value imports. Apply this reorganization to the
imports in the presentationSmoke.ts file to ensure consistency with the project
guidelines.
In
`@packages/docs/src/content/docs/api/frontend-react/src/classes/ProblemBoundary.md`:
- Around line 14-55: The ProblemBoundary documentation has duplicate "###
Constructor" headings at the same markdown level (lines 14 and 32 area), which
violates the MD024 markdownlint rule. Modify the second Constructor heading to
be distinct from the first, either by changing it to "### Constructor (with
context)" or adjusting the heading level to #### for the second overload,
ensuring each heading at the same level is unique while maintaining proper
markdown hierarchy.
In
`@packages/docs/src/content/docs/api/frontend-react/src/functions/useEntitlements.md`:
- Around line 8-32: The useEntitlements function documentation contains
duplicate "## Call Signature" headings at lines 8 and 16, which violates the
markdownlint MD024 rule and breaks documentation generation and table of
contents creation. Differentiate these headings to distinguish between the two
function overloads, such as by renaming the second occurrence to "## Call
Signature (with entitlements)" or using a different heading structure that
clearly separates the overload variants without duplicating heading text.
In
`@packages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemBoundaryFallback.md`:
- Line 8: The ProblemBoundaryFallback type alias definition is missing a type
annotation for the function parameter. In the union type definition for
ProblemBoundaryFallback, add the type annotation `ProblemBoundaryFallbackState`
to the `state` parameter in the function signature portion of the union,
changing `(state) => ReactNode` to `(state: ProblemBoundaryFallbackState) =>
ReactNode` to provide proper type information for the function parameter.
In
`@packages/docs/src/content/docs/api/frontend-react/src/variables/PageDataContext.md`:
- Around line 1-8: The PageDataContext documentation file currently contains
only frontmatter metadata and a type declaration without any substantive
explanation. Add documentation content to the file that explains the purpose and
role of PageDataContext as an internal Context for the page data pattern,
clarifies its relationship to PageDataProvider, describes how
PageDataContextValue is structured and used, and provides common usage examples
or scenarios where developers would interact with this Context. This will help
API documentation readers understand what PageDataContext is for and when they
should use it in their applications.
In
`@packages/docs/src/content/docs/api/frontend-react/src/variables/PageDataProvider.md`:
- Around line 1-8: The PageDataProvider documentation file is incomplete and
lacks essential information needed for beta-level API documentation. Expand the
documentation for PageDataProvider to include: a clear description explaining
what the Provider does and why it is needed, instructions on how to wrap
application components at the entry point, explanations of its relationship with
the usePageData and usePageMeta hooks, and practical code examples demonstrating
basic usage patterns. This will ensure the documentation provides sufficient
context and guidance for developers adopting PageDataProvider-based rendering.
In
`@packages/docs/src/content/docs/api/frontend-vite/src/classes/MissingCloudflareVitePluginProblem.md`:
- Around line 8-9: The class description for MissingCloudflareVitePluginProblem
in lines 8-9 is currently a generic description of the base Problem class for
RFC 7807 Problem Details. Replace this generic description with a specific one
that accurately describes MissingCloudflareVitePluginProblem as a
ValidationError that represents the specific condition when the Cloudflare Vite
plugin is not installed or missing. Check the original JSDoc comments in the
source code for MissingCloudflareVitePluginProblem to ensure the documentation
matches the actual class purpose and usage scenario.
In
`@packages/docs/src/content/docs/api/frontend-vite/src/functions/createCrocoSpaViteConfig.md`:
- Around line 10-15: Remove the package-level introduction text (lines 10-15)
that describes the `@croco/frontend-vite` package from the function API
documentation for createCrocoSpaViteConfig. This package description text is
inappropriate in function-level API reference documentation and should only
appear in package-level documentation like the README. Keep only documentation
specific to the createCrocoSpaViteConfig function itself, and move the package
introduction content to the appropriate package-level documentation files.
In
`@packages/docs/src/content/docs/api/transports-cloudflare-workers/src/type-aliases/WorkersHandlerOptions.md`:
- Line 16: The WorkersHandlerOptions documentation contains only Korean text
without any English description, which is inconsistent with other API reference
documents. Add an English description alongside or instead of the Korean-only
text "env를 FrameworkContext에 주입할지 여부 (기본: false)" to ensure consistency across
the API documentation. Provide either a bilingual version with both English and
Korean, or replace with an English version that matches the content and style of
other API reference documents.
In `@packages/transports-cloudflare-workers/README.md`:
- Around line 7-16: The README documentation for the smoke test (lines
describing `pnpm create-croco-app:smoke meta-vite-fullstack-workers`)
inaccurately claims validation of `api-worker` service bindings and
zero-credential Worker fullstack scenarios, but the actual implementation in
`scripts/create-croco-app-generated-smoke.mts` only validates `ssr-worker` with
vite config loading, build output, and presentation:smoke tests. Update the
README to accurately reflect what the smoke test actually validates (ssr-worker
only), removing references to `api-worker` service binding calls and
zero-credential fullstack validation, since these features are correctly
validated by the unit tests (`WorkersAdapter.spec.ts` and
`PublishedWorkerTypes.spec.ts`) not the smoke test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fb7975a6-ece9-4e64-9a52-4b11bb6e1928
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (121)
.changeset/presentation-runtime-smoke.mdREADME.mddocs/package-catalog.jsondocs/package-docs-baseline.jsondocs/package-docs-report.mdpackages/create-croco-app/src/tests/e2e-generation.spec.tspackages/create-croco-app/templates/addons/web-meta-vite-fullstack/ssr-worker/index.html.hbspackages/create-croco-app/templates/addons/web-meta-vite-fullstack/ssr-worker/package.json.hbspackages/create-croco-app/templates/addons/web-meta-vite-fullstack/ssr-worker/src/client.tsxpackages/create-croco-app/templates/addons/web-meta-vite-fullstack/ssr-worker/src/smoke/presentationSmoke.tspackages/create-croco-app/templates/addons/web-meta-vite-fullstack/ssr-worker/tsconfig.json.hbspackages/create-croco-app/templates/addons/web-meta-vite/index.html.hbspackages/create-croco-app/templates/addons/web-meta-vite/package.json.hbspackages/create-croco-app/templates/addons/web-meta-vite/src/client.tsxpackages/create-croco-app/templates/addons/web-meta-vite/src/smoke/presentationSmoke.tspackages/create-croco-app/templates/addons/web-meta-vite/tsconfig.json.hbspackages/docs/astro.config.mjspackages/docs/package.jsonpackages/docs/src/content/docs/api/frontend-cloudflare/src/functions/createSsrHandler.mdpackages/docs/src/content/docs/api/frontend-cloudflare/src/type-aliases/SsrHandlerOptions.mdpackages/docs/src/content/docs/api/frontend-cloudflare/src/type-aliases/SsrWorkerEnv.mdpackages/docs/src/content/docs/api/frontend-cloudflare/src/variables/default.mdpackages/docs/src/content/docs/api/frontend-react/src/classes/ProblemBoundary.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/AuthBridgeGateStatus.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/AuthBridgeProblemNotice.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/AuthBridgeRecoveryActions.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/CrocoAuthBridgeProvider.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/ProblemPanel.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/ProblemRecoveryActions.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/ProblemToastAdapter.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/RequireEntitlement.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/RequirePermission.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/RequireSession.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createAuthBridgeMissingProviderProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createCrocoPageConfig.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createFrontendAuthBridgeState.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createFrontendEntitlementDeniedProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createFrontendPermissionDeniedProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createFrontendProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createFrontendTenantUnavailableProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createFrontendUnauthenticatedProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createMissingProviderAuthBridgeState.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/createProblemToastPayload.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/evaluateSessionGateState.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/normalizeProblemDetails.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/useAuthBridgeState.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/useEntitlements.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/usePageData.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/usePageMeta.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/usePermissionGate.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/useSessionGate.mdpackages/docs/src/content/docs/api/frontend-react/src/functions/useTenant.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/AuthBridgeGateStatusProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/CrocoAuthBridgeProviderProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/CrocoDataFn.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/CrocoPageConfig.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/CrocoPageContext.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/CrocoPageOptions.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthBridgeSource.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthBridgeState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthBridgeStateInput.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateAllowedState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateBlockedState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateDeniedState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateFallback.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateLoadingState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateRequirements.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateUnauthenticatedState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendAuthGateUnavailableState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendEntitlementCheck.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendEntitlementState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendPermissionCheck.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendPermissionState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendRecoveryAction.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendSession.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendSessionPrincipal.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendSessionState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendTenant.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/FrontendTenantState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemBoundaryFallback.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemBoundaryFallbackState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemBoundaryProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemBoundaryState.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemPanelProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemRecoveryAction.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemRecoveryActionKind.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemRecoveryActionsProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemToastAdapterProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/ProblemToastPayload.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/RequireEntitlementProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/RequirePermissionProps.mdpackages/docs/src/content/docs/api/frontend-react/src/type-aliases/RequireSessionProps.mdpackages/docs/src/content/docs/api/frontend-react/src/variables/AuthBridgeContext.mdpackages/docs/src/content/docs/api/frontend-react/src/variables/PageDataContext.mdpackages/docs/src/content/docs/api/frontend-react/src/variables/PageDataProvider.mdpackages/docs/src/content/docs/api/frontend-vite/src/classes/MissingCloudflareVitePluginProblem.mdpackages/docs/src/content/docs/api/frontend-vite/src/functions/createCrocoSpaViteConfig.mdpackages/docs/src/content/docs/api/frontend-vite/src/functions/crocoSpaViteConfig.mdpackages/docs/src/content/docs/api/frontend-vite/src/functions/crocoVitePlugin.mdpackages/docs/src/content/docs/api/frontend-vite/src/type-aliases/CrocoSpaOptions.mdpackages/docs/src/content/docs/api/frontend-vite/src/type-aliases/CrocoViteConfig.mdpackages/docs/src/content/docs/api/frontend-vite/src/type-aliases/CrocoViteOptions.mdpackages/docs/src/content/docs/api/problems-core/src/classes/Problem.mdpackages/docs/src/content/docs/api/protocols-rest/src/interfaces/ArgumentMetadata.mdpackages/docs/src/content/docs/api/transports-cloudflare-workers/src/functions/toWorkersHandler.mdpackages/docs/src/content/docs/api/transports-cloudflare-workers/src/type-aliases/CloudflareEnv.mdpackages/docs/src/content/docs/api/transports-cloudflare-workers/src/type-aliases/WorkersFetchHandler.mdpackages/docs/src/content/docs/api/transports-cloudflare-workers/src/type-aliases/WorkersHandlerOptions.mdpackages/docs/src/content/docs/en/reference/extension-matrix.mdpackages/docs/src/content/docs/en/reference/presentation-runtime-support.mdpackages/docs/tsconfig.typedoc.jsonpackages/frontend-cloudflare/README.mdpackages/frontend-cloudflare/package.jsonpackages/frontend-cloudflare/tsup.config.tspackages/frontend-react/README.mdpackages/frontend-react/src/tests/usePageData.spec.tspackages/frontend-react/src/tests/usePageData.spec.tsxpackages/frontend-vite/README.mdpackages/transports-cloudflare-workers/README.mdscripts/create-croco-app-generated-smoke.mts
💤 Files with no reviewable changes (2)
- packages/frontend-react/src/tests/usePageData.spec.tsx
- docs/package-docs-baseline.json
c343fbb to
7cd2335
Compare
7cd2335 to
f401e6f
Compare
Fixes #941.
Summary
@croco/frontend-react,@croco/frontend-vite,@croco/frontend-cloudflare, and@croco/transports-cloudflare-workerswith generated API docs, catalog/runtime support evidence, README runtime evidence, and a patch changeset.@croco/frontend-cloudflarewith a CJS worker entrypoint so packed package consumers can resolve the Worker surface through the package entrypoint smoke.Verification
pnpm --filter @croco/frontend-react test- passed, 5 files / 27 tests.pnpm --filter @croco/frontend-vite test- passed, 2 files / 10 tests.pnpm --filter @croco/frontend-cloudflare test- passed, 1 file / 7 tests.pnpm --filter @croco/transports-cloudflare-workers test- passed, 3 files / 12 tests.pnpm create-croco-app:smoke graphql-vite-spa-docker meta-vite-web meta-vite-fullstack-workers- passed, including strict contract typecheck, static misuse check, generated template lint, forced 60-package build, frontend-cloudflare tarball CJS/ESM/type entry evidence, Vite config load checks, browser build output checks, Meta Vite build output checks, and presentation runtime smoke.pnpm --filter @croco/docs docs:build- passed; existing TypeDoc unknown-tag warnings and sitemapsitewarning remain.pnpm docs:catalog:write- passed.pnpm docs:catalog:check- passed.pnpm package-manifests:check- passed.pnpm --filter create-croco-app exec vitest run src/tests/e2e-generation.spec.ts- passed, 14 tests.pnpm public-api:check- passed, 109 snapshots match.pnpm changeset-required:check -- --base origin/trunk --head HEAD- passed.pnpm build- passed, 112 tasks.pnpm package-entrypoints:smoke- passed, 108 checked packages.pnpm typecheck- passed, 222 Turbo tasks.pnpm check- passed.git diff --checkand staged diff check - passed.oxlintandoxfmt.Self-review gates
Risk
Low-medium. The promoted packages now have generated runtime smoke and API reference evidence for the documented beta claim, but broader custom app/bootstrap combinations remain outside this issue and should stay covered by follow-up production-readiness work.
Summary by CodeRabbit
릴리스 노트
새로운 기능
문서
개선