Repository navigation
refactor(ui): give core board widgets one Solid loading boundary - #181314
Conversation
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. |
|
🦞👀 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46387f6c85
ℹ️ 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".
| let connected = true; | ||
| onSettled(() => () => { | ||
| connected = false; | ||
| }); |
There was a problem hiding this comment.
Cancel stale-chunk recovery when the widget retires
When a core widget import fails with a recognized stale-chunk error, the global vite:preloadError listener can already have started scheduleStaleChunkReload; this cleanup only marks the fallback disconnected and never cancels that recovery. If the user hides the board or navigates away while the Gateway is still unreachable, the recovery can therefore reload the document later after the widget is inactive or disposed. The removed createLazyCustomElementRequests.abandon() path called cancelStaleChunkRecovery() for this case, so the new boundary needs equivalent cancellation on deactivation/disposal.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesThis PR replaces registration polling for four built-in board widgets with native Solid loading and error boundaries. Example: A session:report widget fails, then the user hides and reopens its dashboard.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: the maintainer-directed Solid cutover is useful, but it drops cancellation of automatic stale-chunk recovery when a failed widget retires. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherBoard cells receive saved widget data, session context, activity, and advertised widget kinds, then render a built-in component while existing owners retain frame and Gateway responsibilities. flowchart TD
A[Saved board widget] --> B[Board cell]
C[Advertised widget metadata] --> B
B --> D[Core Solid boundary]
D --> E[Lazy widget component]
D --> F[Error and Retry surface]
F --> G[Shared stale chunk recovery]
Technical reviewBest possible solution: Keep the native Solid boundary and retire stale-chunk recovery through its existing owner whenever a failed widget deactivates or disposes. Do we have a high-confidence way to reproduce the issue? The introduced regression is traceable from a recognized import failure through the global preload listener to an uncanceled reload after widget retirement; no target code was executed. Is this the best way to solve the issue? The focused Solid cutover uses existing renderers and removes the replaced registration path, but its lifetime handling must preserve the existing recovery cancellation contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6675ec826609. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +44, Tests +48. Total +92 across 6 files. Added test files: 0. 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 23, 2026, 12:35 AM ET / 04:35 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…nclaw#181314) * refactor(ui): give core board widgets one Solid loading boundary * fix(ui): retire stale board recovery when hidden * test(ui): document isolated stale widget renderer
What Problem This Solves
Core board widgets still use a registration-request controller instead of the Solid component loading boundary.
User Impact
Reports, session progress, websites, and browser dashboards keep their existing hosts and appearance. Initially hidden widgets stay cold, and successfully loaded widgets retain their controls through hide/show.
Why This Change Was Made
Move the four built-in renderers to named
lazy()components with local loading and error boundaries. The widget registry now contains only metadata, and the cell no longer maintains a second request controller or registration polling. Canvas/MCP leases, frame admission, and cancellation remain with their existing owners.A failed widget keeps its visible Retry action after hide/show instead of automatically retrying merely because it became visible. Retry remains available after returning; an outstanding stale-chunk reload cannot complete from an inactive or disposed widget.
Evidence
Acceptance: compare production builds of the merge base and head on this machine with fixed build metadata. Startup, chat, and New Session bytes must not grow beyond the 64 B build-variance allowance; startup keeps one CSS request. Capture the same synthetic report state before and after. Run UI typechecking, the focused changed tests, the controller guard, and production Knip; broad UI proof comes from
ci:full.pnpm tsgo:uigit diff --checkcleanpnpm check:control-ui-controllers --prunepnpm deadcode:knipextensions/telegram/src/telegram-ingress-worker.context.test-support.mjs; no new findingsThe registry test's first attempt stalled during Bun filesystem/cache setup before assertions; the recorded passing attempt used the same pinned Bun runtime with its transpiler cache disabled. No runtime fallback or full local E2E suite was used. PR CI uses
ci:fullfor broader coverage. The stale-recovery regression drives the real global preload-error listener and a held document reachability request: the unfixed code navigated after hiding the widget, and the repaired code cancels on hide and disposal. The test explicitly supplies session storage so navigation is genuinely armed.Same-machine asset comparison
Base:
279015b0578ee497695120b2c682a8154fc520abafter integrating current main, including the shared confirmation-dialog repair. Both builds use identical fixed release metadata. Values below are gzip bytes.All JS changes are inside the 64 B build-variance band. Every CSS surface and request count is unchanged.
Responsibility and size
The 44-line production increase gives the four renderers one local activation/error/retry boundary while removing registry loader callbacks and request polling. The boundary is in a sibling component so the cell remains below its file-length limit. The syntactic manual-import guard does not count the removed registry descriptor callbacks, so its global allowance file is unchanged. The remaining MCP host registration is separate follow-up work; this change does not alter its frame, lease, or teardown contracts.
Visual proof
Inspected synthetic-only before/after captures are attached below.
Final CI attribution
Full CI run39909839428 completed on
901013a48946f5f1a9e8d969f2e23963025aae6e. Selected static checks, UI units, performance andsecurity-fastpassed. Five E2E jobs contain 16 failing test names, and every one also fails in completed scheduled main run39906351041 at6e4f76bc9f92891851ab0415393a41b2683f1d17. The native inherited-failure route retains CI as failed.Exact failing test names matched to main
checks-ui-e2e-real-gateway (1/2)
ui/src/e2e/provider-browser-login.real-gateway.e2e.test.ts > Provider browser login through real HTTPS Gateway > rejects cancelled and stale callbacks, then saves a fresh sign-in and serves an existing sessionchecks-ui-e2e (1/9)
ui/src/e2e/mobile-sidebar-session-menu.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps mobile sidebar titles and menus usable with a coarse pointerui/src/e2e/mobile-sidebar-session-menu.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps mobile sidebar titles and menus usable with a fine pointerui/src/e2e/cloud-workspace-conflict.e2e.test.ts > Control UI cloud workspace conflict recovery > exposes the full request diagnostic with keyboard and clipboard accessui/src/e2e/session-management.rename.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps a duplicate rename in the dialog (concurrent failure: false)checks-ui-e2e (6/9)
ui/src/e2e/browser-dictation-status.e2e.test.ts > Control UI browser dictation status > dictates during a running turn and sends explicitly (wait for completion: true)ui/src/e2e/browser-dictation-status.e2e.test.ts > Control UI browser dictation status > preserves the draft through caret insertionui/src/e2e/browser-dictation-status.e2e.test.ts > Control UI browser dictation status > preserves the draft through selection replacementchecks-ui-e2e (7/9)
ui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps dark child rows stable through loading and refresh at 1440 px with a fine pointer and 100% textui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps light child rows stable through loading and refresh at 1440 px with a fine pointer and 100% textui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps dark child rows stable through loading and refresh at 390 px with a fine pointer and 100% textui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps light child rows stable through loading and refresh at 390 px with a coarse pointer and 100% textui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps light child rows stable through loading and refresh at 390 px with a fine pointer and 100% textui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps dark child rows stable through loading and refresh at 390 px with a coarse pointer and 100% textui/src/e2e/sidebar-session-stability.e2e.test.ts > Control UI session management mocked Gateway E2E > keeps dark child rows stable through loading and refresh at 1440 px with a fine pointer and 140% textchecks-ui-e2e (5/9)
ui/src/e2e/session-management.filtered-errors.e2e.test.ts > Control UI session management mocked Gateway E2E > clears the visible All sidebar error after its failed roster recovers or retires