Repository navigation
refactor(ui): derive tab selection and focus in Solid - #174254
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: 6f355e8f7d
ℹ️ 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".
| return ( | ||
| <button | ||
| {...item().attributes} | ||
| ref={ref} |
There was a problem hiding this comment.
Compose the caller ref with the tab-list ref
Because the new ref={ref} follows {...item().attributes}, it replaces rather than composes any caller-supplied ref. The Worktrees tab supplies attributes.ref to initialize worktreesTab, which is then passed to reclaimHubTabFocus; after keyboard navigation from Sessions to Worktrees, that variable remains unset and the destination page cannot restore focus. Compose the internal and caller refs so both receive the button.
AGENTS.md reference: ui/AGENTS.md:L5-L7
Useful? React with 👍 / 👎.
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces imperative tab selection and focus controllers with one shared Solid helper. Example: In a manually activated tab list, press ArrowRight from Alpha to Beta, then Enter.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep this maintainer-authored refactor open: it consolidates tab ownership, and source review found no actionable introduced bug. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared Tabs primitive and panel strip consume caller-owned items and selection, then produce accessible buttons, selection callbacks, keyboard navigation, and focus effects. flowchart LR
A[Caller items and selection] --> B[Shared tab helper]
B --> C[Solid tab buttons]
C --> D[Pointer and keyboard events]
D --> B
B --> E[Caller selection callback]
B --> F[Keyed DOM focus targets]
Technical reviewBest possible solution: Retain the single Solid tab owner and complete the existing required UI checks before landing. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor; source tracing disproves the existing ref-overwrite report, and no target code was executed during this read-only review. Is this the best way to solve the issue? The approach fits the repository's Solid ownership guidance by deriving presentation state and deleting the superseded controller across both consumers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c5aabc24a6ed. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -39, Tests +42. Total +3 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 16, 2026, 9:51 AM ET / 13:51 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Tabs had two selection writers: Solid rendered ARIA and tab order, then an imperative controller queried and rewrote the same buttons. Replace that controller in both the shared primitive and panel strip with one owner-scoped Solid helper. Selection and roving focus derive from current items; JSX owns attributes and handlers, and keyed refs own keyboard focus targets and cleanup.
Preserves controlled rejection, uncontrolled defaults, explicit null selection, manual/automatic activation, disabled tabs, RTL/vertical navigation, activation vetoes, keyed movement, and detached-node teardown. Styles and geometry remain external synchronization. No visual design, CSS, tag, selector, route, dependency, or lazy-boundary changes. The boot-module manifest was regenerated through its owner; it also drops stale entries from previously landed migrations.
Evidence
The remaining effects synchronize shadow styles and measured/focused DOM. The two new untracked reads snapshot stable keyed identities; they do not freeze changing item data. Browser layout, retention, and full UI integration proof run in PR CI with
ci:full; no local E2E or parity batteries were run. This is a behavior-preserving state refactor, so proof uses DOM selection/focus contracts rather than visual redesign captures.Touched production-file metrics (including removed and replacement helper):
Production LOC falls by 19; the existing test file grows by 42 lines for the local-selection/default-reset boundary. The imperative DOM-controller implementation and its registration/teardown wiring are gone. No release-note behavior change.
CI attribution: full run 38909177146 completed with 65 terminal jobs. All selected jobs passed except the two real-Gateway shards and their downstream gate. The exact two failing tests pass in scheduled main run 38908699969; this is source-unrelated attribution, not a matching-main-failure claim.
Control UI command palette search with a real Gateway > finds a grouped spawned conversation beyond the roster and treats a full result page as successfails during readiness, before the shell or tabs render. All seven Gateway handshakes return UNAVAILABLE; the Gateway/client/fixture sources are unchanged.Control UI real Gateway reconnect continuity > reconstructs one streamed turn after browser socket loss, then aborts and follows up cleanlymatches two reply paragraphs after the provider finishes but before the generating control detaches. The transcript/history/Gateway sources are unchanged; tabs has no write path to those states and this plain-text scenario does not use the tool-card tab selector. The precise duplicate-node cause is unknown.Native admin evidence binds the actual tested merge 532f0b7ed3103b77b7db3a6d36233910dde77605, its ordered main/head parents, unchanged source trees, exact job logs, full job accounting and passing security-fast. Landing uses the coordinator-authorized source-unrelated exception.