Repository navigation
refactor(ui): simplify sidebar hover stability - #128973
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 11:40 PM ET / August 26, 2026, 03:40 UTC. ClawSweeper reviewWhat this changesThis PR consolidates Control UI sidebar hover, catalog-row focus/menu handoff, marquee measurement, and collapsed-group identity handling while reducing duplicated test scaffolding. Merge readinessNo discrete correctness defect was found in this refactor. Keep it open because the legacy collapsed-section collision remains an explicit upgrade-visible compatibility choice requiring maintainer confirmation, and the PR is maintainer-labeled. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway catalog and live-session data feed the Control UI sidebar, where keyed rows can reorder or change from catalog-only to live sessions. The row lifecycle preserves focus, menu anchors, hover scrolling, and collapsed group state across those transitions. flowchart LR
A[Gateway catalog data] --> B[Sidebar catalog projection]
B --> C[Keyed catalog rows]
C --> D[Focus and menu handoff]
C --> E[Hover marquee measurement]
C --> F[Collapsed group preferences]
D --> G[Live session row]
E --> G
F --> G
Decision needed
Why: The persisted legacy key contains no group-kind provenance, so only maintainers can choose the desired upgrade semantics for the ambiguous prior state. Before merge
Agent review detailsSecurityNone. PR surfaceSource +20, Tests -985, Other 0. Total -965 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make the collapse-state owner atomically split a colliding legacy key on first toggle so the target changes state while the sibling remains collapsed, unless maintainers explicitly accept the current transition. Do we have a high-confidence way to reproduce the issue? Not applicable as a behavior-preserving refactor review; the upgrade behavior is source- and regression-test demonstrable rather than an unverified user report. Is this the best way to solve the issue? Unclear: the lifecycle consolidation is coherent, but the best upgrade semantics for colliding legacy collapsed-section keys require maintainer direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 20b453f1550c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
04768b5 to
95c504d
Compare
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
# Conflicts: # ui/src/e2e/session-management.trailing-state.e2e.test.ts # ui/src/styles/components.css
|
Merged via squash.
|
* refactor(ui): simplify sidebar hover lifecycle * refactor(ui): reduce sidebar hover machinery * fix(ui): preserve sidebar row lifecycle invariants * fix(ui): refresh adopted row marquee badges * fix(ui): preserve collapsed project sections * fix(ui): isolate catalog collapse identities * fix(ui): remeasure resized session marquees * fix(ui): migrate legacy catalog collapse groups * fix(ui): keep trailing glyphs inside sidebar endcap
Related: #125820
What Problem This Solves
PR #125820 stopped sidebar rows from moving under the pointer, but the implementation added substantially more lifecycle code and test scaffolding than the behavior requires.
Why This Change Was Made
Keep the invariants that own the behavior: catalog groups and rows render through stable keyed lists, hover actions reserve space on the title line, and the small amount of mutable DOM state remains attached to its catalog identity.
The cleanup retains narrow handling for:
One row-level ref owns both focus and menu handoff instead of the prior per-control ref plumbing. Custom groups, filesystem projects, and people use type-specific collapse IDs, so same-text groups remain independent. Existing generic collapse IDs for custom groups, filesystem projects, and people are still read and migrate to type-specific IDs on the next toggle, so collapsed groups stay collapsed across the upgrade.
The final current-main integration preserves
SidebarSessionProjection, the newer single owner for sticky membership, created ordering, child expansion, and subtitle stability. The cleanup layers catalog-row lifecycle and hover behavior on that owner instead of replacing it.User Impact
Sidebar rows remain in place while hover actions appear. Running/unread state stays visible, titles do not shift or overlap at 140% text scale, hovered titles remeasure as viewers and badges change, keyboard focus survives catalog reorder/adoption, and an open catalog menu dismisses back to its connected adopted-row trigger.
This follow-up reduces #125820 by 1,011 net lines:
Combined with #125820, the complete hover/reorder change is now +226 net production lines and +393 net test lines relative to its pre-PR base—619 total instead of the original 1,630.
Evidence
sidebar-session-text-scale-140.pngshows separate title and detail lines.ClawSweeper's latest rank-up move is addressed: the branch was refreshed onto current main after overlapping sidebar projection and style changes landed, the newer projection owner was retained, and the saved-collapse, lifecycle, marquee, 140% text-scale, build, and changed-file evidence was rerun. The adopted menu receives a connected replacement trigger and open state; Escape returns focus to it, and the test asserts the popup now owns that trigger (the same owner used by Tab dismissal). A second Tab-only browser matrix was intentionally not restored:
DropdownMenuControllerreads this same trigger for both dismissal paths, while the retained component regression proves the owner transfer and exercises focus return without recreating the deleted browser harness.No changelog entry: #125820 is not contained by a release tag, and this is its pre-release cleanup.