Repository navigation
fix(ui): size agent menu grid to content - #127969
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
7bbf726 to
ba7697d
Compare
|
Codex review: found issues before merge. Reviewed August 22, 2026, 12:42 PM ET / 16:42 UTC. ClawSweeper reviewWhat this changesThis PR makes the Control UI agent grid shrink to populated rows, caps larger rosters at two scrolling rows, and removes the visible agent filter. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep this protected maintainer PR open: its layout repair is focused, but it also removes the documented large-roster filter without evidence of an approved product change. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Control UI sidebar opens an agent menu from the active agent card. It orders configured agents, presents selectable grid tiles, and sends a selected agent through the existing switching flow. flowchart LR
A[Configured agents] --> B[Sidebar agent card]
B --> C[Agent switcher menu]
C --> D[Ordering and filter]
D --> E[Grid sizing and scrolling]
E --> F[Agent switch flow]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -119, Tests +24, Other 0. Total -95 across 9 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the content-sized grid and two-row viewport, but restore the documented large-roster filter and its focused coverage unless maintainers explicitly choose and document a different agent-discovery design. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: opening the agent menu with more than ten agents renders every entry in a scrollable grid and the current branch has no filter element, contrary to the documented path. Is this the best way to solve the issue? No: changing the grid flex sizing is the narrow layout repair, but deleting the large-roster filter changes established behavior rather than fixing the empty-space defect. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 31ce436b5f69. LabelsLabel changes:
Label 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
|
|
Merged via squash.
|
* fix(ui): size agent grid to content * chore(ci): shrink agent menu assertion baseline
What Problem This Solves
The agent switcher introduced in #126968 reserved space for two grid rows even when only one row existed. Rosters with one to three switchable agents therefore showed a large empty band before the actions. Larger rosters also exposed a visible filter that is no longer part of the intended menu.
Why
The grid used a fixed two-row flex basis as both its preferred and maximum size. This PR lets the grid size to its content and applies the two-row value only as a maximum, so scrolling begins with the third row. The cap follows Control UI text scaling.
The visible filter and its controller state, render plumbing, styles, copy, and obsolete test fixture were removed. Pinned-agent ordering and keyboard typeahead remain on the canonical menu path.
User Impact
Evidence
The regression assertion reproduced a 105 px gap on
main; the repaired three-agent grid measures 0 px. Browser evidence also measured 3 agents at 104/104 px, 6 at 212/212 px, and 8 at 212/320 px (viewport/scroll height), with no console errors.Focused validation:
node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per agent'node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts -t 'agent chip'node scripts/run-vitest.mjs ui/src/components/form-controls.browser.test.ts -t 'mobile sidebar variants'/review,gpt-5.6-solhigh: Approve, no actionable findings.Technical deslop removed the obsolete filter path end to end and dropped redundant CSS and test fixtures without changing the remaining keyboard behavior. Production code is net -92 lines; test code is net -3 lines.
Full typecheck and lint were intentionally left to the external lander.