Repository navigation
refactor: give sidebar controls explicit ownership - #176405
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 replaces sidebar DOM searches and imperative wiring with owned references, shared menu operations, and scoped reactive projections. Example: Open the session menu for the synthetic “Visual parity” conversation.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain Keep open for focused repairs: the ownership refactor has approved direction, but leaves a constructor consumer unmigrated, introduces strict reactive-read failures, and adds an assertion that violates the safety ratchet. Priority: P3 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherThe Control UI sidebar consumes Gateway session, agent, presence, and navigation state and renders navigation, hovercards, and session actions. flowchart LR
Gateway[Gateway state] --> Owners[Session and navigation owners]
Owners --> Projections[Solid projections]
Projections --> Sidebar[Sidebar components]
Sidebar --> Controls[Owned refs and menu handles]
Controls --> Actions[Existing action owners]
Technical reviewBest possible solution: Keep the existing owners and reference cutover, migrate the constructor fixture, preserve intentional setup snapshots, and explicitly type the optional focus callback. Do we have a high-confidence way to reproduce the issue? The constructor mismatch and unsupported assertion are directly source-reproducible, and exact-head CI independently records the constructor errors and strict-read warnings; no target code was executed. Is this the best way to solve the issue? Owned references and the existing Menu focus owner are appropriate, but removing intentional lifetime snapshots is unnecessary and the constructor cutover must include its test consumer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 01a806546943. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +174, Tests +28. Total +202 across 42 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, 4:28 PM ET / 20:28 UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3761bbe27f
ℹ️ 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".
| const createAgentLinkRef = (card: () => { id: string }) => { | ||
| // The keyed row keeps this identity until its branch is removed. | ||
| const id = untrack(() => card().id); | ||
| const id = card().id; |
There was a problem hiding this comment.
Keep keyed roster IDs as explicit snapshots
When an agent roster row renders, this helper is called from a keyed <For> callback, so reading card() here occurs at the top of a flow owner rather than in a tracking computation and produces Solid's STRICT_READ_UNTRACKED diagnostic. The ID is intentionally fixed for the keyed row's lifetime, so retain the explicit untrack snapshot (and do the same for the new direct card().id argument in the pinned-row loop) instead of turning the snapshot into an accidental untracked read; otherwise ordinary roster rendering can fail strict diagnostic checks.
AGENTS.md reference: ui/AGENTS.md:L3-L5
Useful? React with 👍 / 👎.
|
Merged via squash.
|
* refactor: give sidebar controls explicit ownership * fix: preserve sidebar parking and control focus
What Problem This Solves
Sidebar and session menus still discovered their own controls through DOM searches and carried redundant tracking suppression after the Solid migration. This checkpoint gives menu controls, section headers, rail pins, presence facepiles, and person triggers renderer-owned refs. The existing Menu focus owner exposes
focusFirst()anditemElement(id)so callers retain control identity.User Impact
Existing navigation, keyboard focus, host tags, classes, routes, selectors, and lazy boundaries are preserved. Authoritative sidebar reads stay synchronous in plain TypeScript owners; Solid consumers receive live owner accessors and scoped projections.
Current Candidate
Head
ca4bf52f226e0b07d068c0424133f2df4179abd7merges current mainc8c8e886daae866027b976d606e83a8ceb6c114cto resolve repeated GitHub mergeability computation timeouts. The five overlapping files now retain main's mounted-row and Inbox focus ownership. Three files match main exactly; the session row keeps main's settled mount/focus callback plus live host accessors, and Inbox keeps main's focus registry plus route-derived open state.The initial CI exposed section-reorder focus, hidden landscape startup, and two catalog retry regressions. This PR fixes those at their owners: retain the reorder trigger in a component-owned lifetime; allow shell startup inputs while later hidden owner updates stay parked; and keep reactive view reads separate from synchronous owner callbacks. This is one checkpoint; the remaining effect, timer, focus, and measurement conversions continue in the follow-up sidebar PRs.
Evidence
ci:full.reply-admission-ticket.tsandreply-turn-admission-owner.ts; no UI findings. Local failure is retained, not relabeled green or used as a CI exemption.The two focused files still emit previously disclosed
STRICT_READ_UNTRACKEDdiagnostics forrenderSessionSection.groupandobserveHost.revision; passing assertions are not described as warning-free. No full local E2E suite or repeat test loop was run.CI Attribution
The former inherited-media exception is retired. Latest completed scheduled main 39172446197, head
4812f059427b2db240fbefd3af4411c9d701538a, passed both real-Gateway jobs and the three previously failing media cases. Fresh current-head CI 39175445655 passed; it tested merged69a24e0a1ab942e1760d107a2cb84efbb36d2f3against base65fdda51d7d87d8bfbdebf97e3ccea16a92cb457. Old run 39168070659 does not authorize this head's landing. Prior-head performance and media failures remain historical evidence only.Size and Checklist Counts
Compared with pinned main, this candidate changes 46 files, +766/−478 lines. Changed production files: 16,107 → 16,323 LOC (+216). Whole sidebar/session production scope: 35,839 → 36,023 LOC (+184). The growth pays for explicit refs, cleanup, the shared focus contract, and the synchronous-owner/parked-view repair; this checkpoint does not claim the final wave-zero targets.
createEffectcreateRenderEffectuntrackaddEventListenerflushRemaining counts are follow-up work, not comment-based exceptions. The known owned-island query is the sanitized Markdown template; mixed Markdown/Solid discovery, cross-owner geometry, row membership, and filter controls still require explicit ownership conversions. Mounted reactive identities retain named initial snapshots.
Current remaining patterns by category
Locations are on
ca4bf52f226e; follow-up conversions are not claimed complete. Test-support modules are excluded. Thesession-progress-card.ts:99query owns a sanitized Markdown island. The rosterreadCollapsedsuppression is pending removal; other listeduntrackcalls capture named mounted identities.ui/src/components/app-sidebar-owner.tsx:399;ui/src/components/app-sidebar-render.tsx:302;ui/src/components/app-sidebar-session-pr-indicators.ts:125;ui/src/components/app-sidebar.tsx:254;ui/src/components/session-attention.ts:76;ui/src/components/session-background-view.tsx:32;ui/src/components/session-background.tsx:128, 207;ui/src/components/session-menu-settings.ts:52;ui/src/components/session-owner-filter.ts:107;ui/src/components/session-progress-card-solid.tsx:52, 241;ui/src/components/session-progress-card-view.tsx:18;ui/src/components/session-progress-disclosure-binding.ts:504;ui/src/components/session-progress-hovercard.runtime.tsx:448, 503, 513, 528;ui/src/components/sidebar-agent-roster.tsx:140, 149;ui/src/components/sidebar-attention.tsx:216;ui/src/components/sidebar-people.ts:55;ui/src/components/sidebar-update-card.tsx:80, 89ui/src/components/app-sidebar-rail.tsx:182, 533;ui/src/components/app-sidebar-session-catalog-render.tsx:68;ui/src/components/app-sidebar-session-list-render.tsx:112, 227;ui/src/components/session-hovercard-solid.tsx:192, 248, 280, 309, 441, 490;ui/src/components/sidebar-agent-roster.tsx:139;ui/src/components/sidebar-outbox-item.tsx:28ui/src/components/session-progress-disclosure-binding.ts:275, 276, 277, 278, 279, 280, 281, 285, 288;ui/src/components/sidebar-session-filter-popover.tsx:89ui/src/components/app-sidebar-render.tsx:329;ui/src/components/session-background-layout.ts:14, 15, 27, 30;ui/src/components/session-link-titling.ts:145, 177, 470;ui/src/components/session-progress-card.ts:99;ui/src/components/session-progress-disclosure-binding.ts:254;ui/src/components/session-progress-hovercard-registration.ts:36, 78;ui/src/components/session-progress-hovercard.runtime.tsx:287;ui/src/components/sidebar-session-filter-popover.tsx:12, 52Screenshots
The following before/after captures contain synthetic fixtures only and were inspected in full. Repaired normal-capture PNG hashes match these uploaded assets, so no duplicate upload was needed.