fix: guard missing React ViewTransition#467
Draft
cursor[bot] wants to merge 2 commits into
Draft
Conversation
Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug and impact
React 19.2.7 in the installed runtime does not export
ViewTransition(typeof React.ViewTransition === "undefined"). The past-paper grid rendered<ViewTransition>unconditionally around every paper card, so opening a past-paper listing could crash with React's invalid element type error instead of showing papers.A separate setup regression also made
pnpm install --frozen-lockfile --prefer-offlinefail under pnpm 11 becausepackage.json#pnpm.overridesis ignored while the lockfile still recorded those overrides.Root cause
ViewTransitioncomponent exists at runtime.package.json#pnpmblock and activepnpm-workspace.yamloverrides, leaving the lockfile out of sync with pnpm 11's active config.Fix
ViewTransitionwrappers whentypeof ViewTransition === "function"; otherwise render children directly.pnpm-workspace.yaml, syncpnpm-lock.yaml, and explicitly deny nonessential optional postinstall scripts that broke frozen install in the cloud image.Validation
corepack pnpm install --frozen-lockfile --prefer-offlinecorepack pnpm exec tsx scripts/test-global-error-reload-guard.tscorepack pnpm exec tsx scripts/test-pdf-download-page-edits.tscorepack pnpm --filter examcooker typecheckCoursePaperGridwith placeholder env:grid render okNote:
corepack pnpm exec tsc --noEmit --pretty falsestill fails on pre-existing SVG/generated JSON module declarations, as recorded in repo automation memory; no new errors from these changes were observed.spent a lot of water and tokens to review your slop
Greptile Summary
This PR prevents crashes when React does not export
ViewTransitionand aligns pnpm installation settings. The main changes are:Confidence Score: 5/5
This looks safe to merge.
The optional React export is checked before either component renders it. The keyed wrapper preserves paper-card reconciliation in the fallback path. The workspace and lockfile override declarations match. No blocking issue was found in the changed code.
What T-Rex did
Important Files Changed
Reviews (1): Last reviewed commit: "fix: guard missing React ViewTransition" | Re-trigger Greptile