Skip to content

fix: guard experimental React transition APIs - #509

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-identification-de2e
Draft

fix: guard experimental React transition APIs#509
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-identification-de2e

Conversation

@cursor

@cursor cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bug and impact

The installed React runtime does not export ViewTransition or addTransitionType, but multiple app components imported and rendered/called those APIs directly. A page that renders the shared directional transition boundary or course-paper grid can crash on render, and programmatic search/filter/navigation interactions can throw when clicked/submitted.

Root cause

Recent view-transition code trusted canary TypeScript declarations/docs, but the actual react@19.2.8 package in this lockfile still reports both experimental exports as absent.

Fix

  • Added OptionalViewTransition to render children when React.ViewTransition is unavailable.
  • Added addReactTransitionType to no-op safely when React.addTransitionType is unavailable.
  • Replaced direct value imports/calls across nav, search, filter, and grid components.
  • Added scripts/test-react-transition-compat.tsx to lock in the fallback behavior.

Validation

  • node --input-type=module named import check confirmed ViewTransition is absent in the installed React package.
  • pnpm exec tsx scripts/test-react-transition-compat.tsx passed.
  • pnpm exec tsx scripts/test-hydration-recovery-privacy.ts && pnpm exec tsx scripts/test-global-error-reload-guard.ts && pnpm exec tsx scripts/test-inline-youtube-watchdog.ts passed.
  • pnpm --filter examcooker typecheck passed.
  • pnpm build compiled successfully and passed TypeScript, then stopped at expected local page-data collection because DATABASE_URL is not set.
Open in Web View Automation 

Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examcooker-dev Error Error Aug 1, 2026 11:11am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant