Repository navigation
fix(ui): show recoverable lazy renderer errors - #180742
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2896945181
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fallback={(error, reset) => ( | ||
| <LazyViewError | ||
| error={error()} | ||
| onRetry={() => reset()} |
There was a problem hiding this comment.
Route stale chunks through reload recovery
When an already-open tab hits an obsolete chunk after a deployment, reset() simply invokes the same dynamic import again and can leave Retry stuck on the same stale-chunk failure. The repository already handles this case with isStaleChunkImportError and retryStaleChunkReloadWhenReachable; this handler and the equivalent Retry handlers in image-lightbox.tsx and lobster-pet.tsx need that path so the newly visible recovery action can actually recover from update-related failures.
AGENTS.md reference: AGENTS.md:L76-L77
Useful? React with 👍 / 👎.
| function WidgetRegistration(props: { tagName: string; loadModule: () => Promise<unknown> }) { | ||
| const ready = createMemo(() => | ||
| ensureCustomElementDefined(props.tagName, props.loadModule).then(() => null), | ||
| ); |
There was a problem hiding this comment.
Clear sibling registration errors after a shared retry
When multiple cards require the same tag, ensureCustomElementDefined gives them the same pending promise; if it rejects, every card's local boundary latches the error. Retrying one card can successfully define the element and upgrade all hosts, but only that card resets, so the other cards continue displaying stale failure alerts despite their widgets now working. Keep readiness/recovery with the shared registration owner or notify all consumers when registration succeeds.
AGENTS.md reference: AGENTS.md:L18-L20
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesAdds visible error recovery for lazy widget, lightbox, and lobster renderers, plus a decorative avatar fallback. Example: Loading the Canvas renderer for document synthetic-widget fails.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain This PR addresses real gaps on current main and has maintainer-approved direction, but recovery and test-cleanup defects need repair before merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherControl UI components load optional renderers through dynamic imports and shared custom-element registration, then render their content or local recovery controls. flowchart TD
A[Control UI interaction] --> B[Widget or native host]
B --> C[Lazy renderer import]
B --> D[Shared tag registration]
C --> E[Local error boundary]
D --> E
E --> F[Content or recovery controls]
Technical reviewBest possible solution: Keep the narrow local boundaries, reuse guarded stale-chunk recovery, and let the existing registration owner clear all consumers after successful registration. Do we have a high-confidence way to reproduce the issue? Current main logs rejected widget registration and leaves native lazy renderers without local error boundaries; the added tests inject those failures, but no product reproduction was run during this read-only review. Is this the best way to solve the issue? Local boundaries preserve existing hosts and lazy loading, but complete recovery must consume the existing stale-chunk and shared registration owners rather than leaving per-card errors latched. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 19f6fa1851d8. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +81, Tests +156. Total +237 across 6 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 12:04 PM ET / 16:04 UTC. |
|
Merged via squash.
|
* fix(ui): show recoverable lazy renderer errors * test(ui): retire native hosts before clearing portal fixtures * test(ui): qualify intentional lazy import failures * test(ui): diagnose task PR Git read completion * test(ui): await Inbox retry import settlement * test(ui): follow provider row discovery feedback
What Problem This Solves
Canvas/MCP widget registration failures left blank cards. Lazy renderer failures in native avatar, lobster, and lightbox roots also escaped their local loading boundary, because those roots are isolated from the enclosing app's error boundary.
User Impact
Widgets show retryable errors while retaining their host and actions. The lobster and image lightbox expose Close/Retry controls. Failed decorative avatar artwork falls back to a text glyph without replacing the accessible identity.
Why This Change Was Made
The existing registration owner still deduplicates tag loads and admits retries. One shared readiness/error slot observes its promise beside both widget hosts. Native roots gain narrow
Erroredboundaries. The pet and lightbox failure panels use a Portal so clipped preview/composer hosts cannot hide recovery controls. No renderer or modal library becomes eager, and no owner state is copied into signals.A failed import panel deliberately does not reproduce the successfully loaded modal's focus trap/return behavior. Close and Retry remain usable without introducing a second overlay lifecycle. Browser-cached module evaluation failures may still require reloading the page. The widget retry capture uses the real registration owner with a fixture loader that first rejects, then resolves and defines the tag; it proves retained host/action identity, not Chromium network-import cache recovery. Decorative avatar failure intentionally has no alert or retry control.
Evidence
Full CI runs on the final head. Local proof covers rejected imports, retained native hosts, widget retries, and the native lightbox close event.
9020a4d4d4ca5190664f2de97a0d9e0b102cdcf4; native completed-hosted evidence verified.48b7b4e6c2836891339d977bc939ce651946d891; zero violations or warnings. Production files are identical on the final test-only correction.src/infra/heartbeat-active-hours.tsandsrc/infra/heartbeat-wake-policy.ts; no UI additionsAll surfaces remain below their caps. The small route additions provide local failure panels while preserving the original lazy imports.
Scoped recipe and size counts
These counts cover the four changed production files; the campaign tracks the complete chat/components inventory separately. They represent four existing outcome contracts across five failure paths because Canvas and MCP share the widget-registration contract.
ErroreddeclarationsLoadingdeclarationsLoading on=createMemocalls (one added async readiness observer)action, optimistic writes,affects,refresh,isPending,latestflush, component cleanupuntrackOne new
Erroreddeclaration serves both widget registration consumers. The other three protect independent native roots. Production grows by 81 lines to make five failures visible without a new state owner or loader abstraction. The two regression files exercise rejected registration/retry identity, decorative fallback, retained pet scene, and the native lightbox close contract from a clipped host. The existing lightbox suite covers delayed success and disposal.CI investigation
Run 39816013382 passed every UI unit shard, all nine ordinary UI E2E shards, types, lint, performance, and real-Gateway shard 2. Real-Gateway shard 1 failed only
Delegated task PRs through a real Gateway > shows three persisted descendant PRs while keeping the parent branch unpublished: the socket retained three receipt-only items after foreground admission, with two GitHub HTTP requests and no hydrated output observed.The exact named test passes locally on the CI base
13ab209569f7eb269fd9df5eec778727f94569c0(111.86 s total) and on its tested mergeeb005735febecab1af97c9dc3dec6fb8d22dfec9(109.61 s total). Both stages show the expected receipt-only → three hydrated details sequence. These passing attempts do not explain or fix the CI failure, and it is not classified as inherited. The additional test-only patch records completed Git operation kinds, error counts, elapsed time, and stage duration through the existing diagnostics channel. That helps distinguish Git reader work between branch inspection and metadata hydration from the already recorded compute-capacity facts. Assertions and deadlines are unchanged; no production diagnostic API was added. The original failure remains documented for the next full CI run. Head3e0db11456365714c9393af582b02a9522834c13merges current main to resolve the overlapping diagnostic additions, preserving both groups, all assertions, and deadlines. Its affected TypeScript leaf, targeted lint, formatting, and independent review pass. Full CI is attached as run 39826321053.Run 39826321053 passes the original descendant-PR scenario and all nine ordinary UI E2E shards. It exposes two test issues that are corrected in the replacement head: the Inbox retry test now explicitly awaits its real lazy import before waiting for Solid; the catalog test now checks the provider-row warning and recovers through the header Refresh action introduced by the Models-page change on main. Assertions about retained choices, explicit RPCs, acquisition counts, and recovered models remain intact; timeouts and production code are unchanged.
The Inbox file passes once before the correction and once after it; the first pass does not recreate hosted scheduling. The catalog test reproduces the same obsolete Retry-locator failure on exact merge base
df12fbcd6b2b57371d6cc4687a9a6133c6817257(74.43 s total), then passes with aligned expectations (65.05 s total). Both corrections have independent scoped-clean reviews; the catalog change also passes its TypeScript leaf and targeted lint and formatting. The combined replacement head9020a4d4d4ca5190664f2de97a0d9e0b102cdcf4passed full CI in run 39830953116.Synthetic before / after
The widgets retain their action controls. The native lightbox and pet error panels remain visible outside clipped hosts. The avatar keeps its normal 20 px slot and uses a decorative glyph.