mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #1029] [MERGED] feat(dev): React-based runtime error overlay #1033
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#1033
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/1029
Author: @james-elicx
Created: 5/2/2026
Status: ✅ Merged
Merged: 5/3/2026
Merged by: @james-elicx
Base:
main← Head:claude/mystifying-goldberg-20355c📝 Commits (1)
52dcf5cfeat(dev): add React-based runtime error overlay📊 Changes
21 files changed (+1380 additions, -41 deletions)
View changed files
📝
packages/vinext/src/server/app-browser-entry.ts(+65 -3)📝
packages/vinext/src/server/app-browser-error.ts(+5 -16)📝
packages/vinext/src/server/app-browser-navigation-controller.ts(+10 -0)➕
packages/vinext/src/server/dev-error-overlay-store.ts(+79 -0)➕
packages/vinext/src/server/dev-error-overlay.tsx(+703 -0)📝
packages/vinext/src/shims/error-boundary.tsx(+84 -0)📝
tests/app-browser-entry.test.ts(+2 -4)➕
tests/e2e/app-router/dev-error-overlay.spec.ts(+231 -0)📝
tests/e2e/app-router/error-interactive.spec.ts(+3 -14)📝
tests/e2e/app-router/layout-persistence.spec.ts(+5 -1)📝
tests/e2e/app-router/navigation-flows.spec.ts(+5 -1)📝
tests/e2e/app-router/nextjs-compat/error-nav.spec.ts(+5 -1)➕
tests/e2e/app-with-src/dev-overlay-recovery.spec.ts(+52 -0)📝
tests/e2e/helpers.ts(+21 -0)➕
tests/fixtures/app-basic/app/dev-overlay-broken/broken-client.tsx(+5 -0)➕
tests/fixtures/app-basic/app/dev-overlay-broken/page.tsx(+13 -0)➕
tests/fixtures/app-basic/app/dev-overlay-test/dev-overlay-triggers.tsx(+42 -0)➕
tests/fixtures/app-basic/app/dev-overlay-test/page.tsx(+20 -0)➕
tests/fixtures/app-with-src/src/app/dev-overlay-recovery/page.tsx(+15 -0)➕
tests/fixtures/app-with-src/src/app/dev-overlay-recovery/throw-on-render.tsx(+5 -0)...and 1 more files
📄 Description
Summary
error.tsxboundary (onCaughtError), render errors with no boundary above them (onUncaughtError), and plain script errors / unhandled promise rejections viawindowlisteners.createRootmounted on a detached<div>appended tobody, so it survives an unmount of the mainhydrateRoot(document, …)tree — necessary because most errors we want to surface take that tree down./dev-overlay-testfixture page and a Playwright spec covering each error source plus dismiss and prev/next pagination across multiple errors.Test plan
PLAYWRIGHT_PROJECT=app-router npx playwright test tests/e2e/app-router/dev-error-overlay.spec.ts— 7 passingPLAYWRIGHT_PROJECT=app-router npx playwright test tests/e2e/app-router/error-handling.spec.ts tests/e2e/app-router/error-interactive.spec.ts— 13 passing (no regression in existing error tests)pnpm exec vp check --fixclean🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.