Repository navigation
refactor: bind sidebar subscriptions to component lifetimes - #176477
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. |
|
Codex review: needs changes before merge. What this changesThis PR binds sidebar and session subscriptions to Solid component lifetimes and reuses shared timer, listener, and Markdown primitives. Example: A session hovercard is open when its client property changes.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it is a useful, maintainer-approved lifecycle refactor, and source review found no actionable introduced defect. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherControl UI components consume application and Gateway owners, render sidebar and session views, and release subscriptions, timers, and overlays when their component or source retires. flowchart TD
Application[Application context] --> Owners[Gateway and session owners]
Owners --> Bindings[Component scoped bindings]
Bindings --> Sidebar[Sidebar and roster]
Bindings --> Hovercard[Session hovercard]
Bindings --> Progress[Progress and background views]
Bindings --> Cleanup[Source replacement and disposal]
Technical reviewBest possible solution: Keep domain state synchronous and use the existing component, projection, overlay, and Markdown owners for lifecycle work. Do we have a high-confidence way to reproduce the issue? This PR proposes a refactor rather than a reported product bug; source inspection confirms the lifecycle machinery it replaces. Is this the best way to solve the issue? The change follows existing ownership boundaries, removes superseded wiring, and preserves synchronous admission, source retirement, and lazy imports. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b1066a5c4910. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -20, Tests +168. Total +148 across 23 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 18, 2026, 5:28 PM ET / 21:28 UTC. |
7d37250 to
eb0c703
Compare
Evaluate disabled presentation in the card memo before menu setup can first instantiate its parent presentation getter inside onSettled. Complete hovercard row fixtures and preserve native MediaQueryList members in the mobile focus fixture. The existing Details browser regression passes after reproducing the reactive halt, and the production collapsed-desktop send, stream, and refresh case passes.
eb0c703 to
91ca5f0
Compare
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#176477) * refactor: bind sidebar subscriptions to component lifetimes * fix(ui): derive progress menu state before lifecycle setup Evaluate disabled presentation in the card memo before menu setup can first instantiate its parent presentation getter inside onSettled. Complete hovercard row fixtures and preserve native MediaQueryList members in the mobile focus fixture. The existing Details browser regression passes after reproducing the reactive halt, and the production collapsed-desktop send, stream, and refresh case passes. * refactor(ui): simplify sidebar roster admission and keyed identity
What Problem This Solves
Sidebar and session renderers still use effect-driven subscriptions and state copies that make their mounted ownership harder to maintain during the Solid 2 migration.
User Impact
User impact: no intended appearance or behavior change; sidebar selection and hovercard focus remain stable across owner updates.
Why This Change Was Made
Sidebar and session renderers used effects to copy owner state, bind subscriptions, and discover owned controls. This checkpoint binds subscriptions to component lifetimes, consumes existing owner projections, and uses shared timer and Markdown primitives. Owned gesture events move into JSX.
The synchronous sidebar owner now retains the last presented roster selection. Hovercard client replacement preserves its open portal and focused children; its remaining commit effect waits for Markdown reconciliation before restoring focus. Catalog and background loading keep their existing lazy boundaries. Tags, classes, routes, selectors, and appearance are preserved.
Head
91ca5f01f6ddis rebased ontofd2a6caa89df. The focused 17-file implementation retains the synchronous roster selection and native bridge contracts from current main.Evidence
pnpm tsgo:uipassed on rebased head; default tsrs, no override or branch dependency changes--fsModuleCache=falseafter cached workers stalled in SSD filesystem-cache rename; all interrupted attempts were joined. No runtime override was used in the refreshtsconfig.ui.jsonpnpm ui:buildcompleted on the same machine. Startup 337,719→337,718 B gzip (−1 B), 7 JS requests; CSS 38,500 B / 1 request both. Lazy boundaries preservedThe former root-help mock-export failure and prior CI budget failures are historical evidence, not inherited exceptions for this replacement head. Current failures have been compared with the actual new merge base or latest completed scheduled main by exact name. Earlier Details/composer captures emitted strict warnings and are not claimed warning-clean.
The full production Knip phase reports
settleInterruptedRestartRecovery,StateDatabaseAccessError, and theRequesterSettleWakeBatchCallbackstype identically on exact basefd2a6caa89dfand head91ca5f. These are recorded local failures, not a passing full scan.Counts and size
Counts compare
fd2a6caa89dfwith this candidate. The scope is directcomponents/app-sidebar*,sidebar-*, andsession-*, excluding tests/test-support and nestedsolid/; generic queries count.untrack17 files, +521/−442. The 14 production files shrink 5,730→5,710 lines (−20); three tests grow 381→480 (+99). Whole-lane production shrinks 36,121→36,101. The original lane began with 30 effects; the Inbox effect is already removed on main; focused follow-ups remove non-island DOM queries and remaining covered effect work.
Surviving effects synchronize external DOM/image/focus state or owner queries:
app-sidebar-render.tsx:302,app-sidebar-session-pr-indicators.ts:125,app-sidebar.tsx:259,session-background.tsx:214,session-menu-settings.ts:52,session-owner-filter.ts:107,session-progress-disclosure-binding.ts:507,session-progress-hovercard.runtime.tsx:459. Inbox overflow now uses the shared scroll primitive on main.Intentional initial snapshots:
app-sidebar-rail.tsx:182,533,app-sidebar-session-catalog-render.tsx:68,app-sidebar-session-list-render.tsx:112,227,sidebar-agent-roster.tsx:302,sidebar-outbox-item.tsx:28. The newinitialAgentIdsnapshot preserves the keyed pending-creation row identity; row metadata remains reactive.Remaining queries are assigned to focused title/lookup/layout/disclosure follow-ups:
app-sidebar-render.tsx:329,session-background-layout.ts:14,15,27,30,session-link-titling.ts:145,177,470,session-progress-disclosure-binding.ts:255,session-progress-hovercard-registration.ts:36,78,session-progress-hovercard.runtime.tsx:290.session-progress-card.ts:99is the deliberate Markdown island.Screenshots
Current CI failure attribution
The only failed runtime test is
ui/src/e2e/model-providers-help.e2e.test.ts > Control UI Models help mocked Gateway E2E > explains the utility model with accessible pointer, keyboard, and narrow-layout behavior. Both this PR and completed scheduled main 39195750293 fail at238:66: expectedclosest option supported by the selected model, received the revised closest-supported-option copy. Each shard reports 434 passed and 1 failed. This is an exact-name/assertion match, not a shard-level attribution.The mock-export ratchet reports
test/scripts/ci-node-test-plan.test.ts:3297: ../../scripts/lib/ci-test-timings.mts; the same command fails with that exact diagnostic on merge basefd2a6caa89df. CI measures Chat boot JS at 1,491,463→1,491,379 B (−84 B), both above the unchanged 1,490,000 B limit. New Session stays within its limit at 1,049,642→1,049,523 B. No failed check is reported as passing.