Repository navigation
improve(ui): make agent switching faster and more visual - #126968
vyctorbrzezowski merged 4 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 22, 2026, 9:52 AM ET / 13:52 UTC. ClawSweeper reviewWhat this changesThis PR makes the Control UI agent switcher open after deliberate hover and replaces its row list with a visual, scrollable agent grid. Merge readinessKeep open: the current head still hides unpinned agents in large pinned rosters, and the protected feature needs maintainer product direction after that repair. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe Control UI sidebar receives the configured agent roster and renders an agent chip. Opening that chip produces the existing agent-selection menu, whose chosen agent is passed back into the sidebar’s canonical switch flow. flowchart LR
A[Configured agent roster] --> B[Sidebar agent chip]
B --> C[Hover or click interaction]
C --> D[Agent switcher menu]
D --> E[Agent selection]
E --> F[Active agent workspace]
Decision needed
Why: This is a deliberate default interaction change, and the linked feature issue remains marked for maintainer product direction. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +480, Tests +8, Other -1. Total +487 across 9 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt one complete pinned-first roster for large menus, with the grid viewport providing compactness rather than suppressing agents, after a maintainer confirms the hover-and-grid interaction direction. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence path: configure more than six agents, pin at least one non-active agent, and open the menu without filtering; only pins and the active agent render. Is this the best way to solve the issue? No—the current patch keeps the prior pinned-only shortcut despite changing the intended design to a scrollable full roster; a pinned-first complete list is the narrower canonical fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ea1cd39d6c9a. 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 (6 earlier review cycles)
|
36cd536 to
b656b8c
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
b656b8c to
de51d71
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…6968) * improve(ui): refine agent switching * test(ui): cover agent switcher behavior * fix(ui): preserve agent menu keyboard navigation * fix(ui): keep full agent roster reachable
Closes #126672
What Problem This Solves
Switching agents from the sidebar requires an explicit click into a row-oriented menu whose entries have similar visual weight. With several configured agents, the active agent is harder to recognize and the roster is slower to scan than this frequent action should be.
Why
In this PR, the existing sidebar agent card opens after 300 ms of fine-pointer hover intent while retaining immediate click, touch, Enter, and Space behavior. The menu uses an explicit
closed/hover-pending/open-hover/open-clickinteraction state so click never competes with hover timers: click-open menus stay pinned, hover-open menus allow a 200 ms trigger-to-menu grace period, and clicking a hover-open menu pins it.The existing agent-menu owner now presents the canonical agent list as a compact three-column grid. It gives the active avatar a subtle accent ring, mutes inactive avatars until hover or keyboard focus, keeps one- and two-line labels aligned, filters larger rosters, and limits the roster viewport to two complete rows before internal scrolling. Selection still uses the existing agent-switch path; this does not add a second selector or a parallel source of agent state.
Before the final push,
technical-deslopconsolidated avatar state through shared CSS properties, derived the grid viewport from shared tile metrics, removed redundant roster coverage, and eliminated assertion debt. The focused behavior remained unchanged and was rerun after cleanup.User Impact
Fine-pointer users can pause over the agent chip and scan a visual roster without an extra click. Click, touch, and keyboard users keep an immediate, deterministic open path; large rosters remain compact and searchable; custom photos, emoji avatars, initials, long names, hover, focus, and active state share the same geometry.
Evidence
de51d71e842bb008ff0784c26b349601adc8823a, rebased onea1cd39d6c9ac880eaa531e57c98219d8c559e57.node scripts/run-vitest.mjs run ui/src/components/app-sidebar.test.ts -t 'AppSidebar agent chip'— 38 passed, 249 skipped.node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per agent'— 1 passed, 5 skipped; verified active-item focus, ArrowDown navigation into the nested grid, and Enter selection./chat, the Vite client, and the dynamic module with no console or page errors during capture.check:changedcompleted its pre-typecheck stages, then was terminated during the full typecheck stage. Full typecheck and lint are intentionally left to the external lander.Three-agent roster
Active Molty, hovered Atlas, and inactive long-name Forge in both themes:
Eight-agent roster
The filter appears above a two-complete-row scroll viewport; the remaining agents stay available through internal scrolling.
Custom photo states
Hover intent
The short capture shows delayed hover opening, pointer travel into the menu, and grace-close after leaving both surfaces: