Repository navigation
fix: keep expanded Swarm results clear of keyboard focus - #153168
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: needs maintainer review before merge. Reviewed September 19, 2026, 5:13 PM ET / 21:13 UTC. ClawSweeper reviewWhat this changesThe PR restores spacing below expanded completed Swarm cards’ keyboard focus outline and extends browser coverage across desktop and mobile layouts. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, narrowly scoped fix absent from inspected main and the latest release. No actionable correctness or security findings were found, and the before/after screenshots support the visual improvement. Priority: P3 Review scores
Verification
How this fits togetherControl UI’s Swarm cards display child-run progress supplied by Gateway session data. Expanding a completed card reveals its outcome and child details above the chat composer. flowchart TD
A[Gateway session data] --> B[Swarm progress card]
B --> C{Completed card expanded?}
C -->|No| D[Compact summary]
C -->|Yes| E[Summary with restored spacing]
F[Keyboard focus outline] --> E
E --> G[Readable outcome and child details]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +4, Tests +27. Total +31 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Preserve the compact collapsed card and visible keyboard focus while restoring space before expanded outcome text in the existing stylesheet. Do we have a high-confidence way to reproduce the issue? Yes: keyboard-expand a successfully completed Swarm card and compare its first outcome line with the summary’s focus outline. Current-main CSS and the inspected before screenshot support the mechanism; this review did not execute a fresh reproduction. Is this the best way to solve the issue? Yes: the open-state margin override repairs the existing layout owner without suppressing focus or changing collapsed interaction targets, and the regression assertion measures the visible failure directly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 695501b81158. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes the keyboard focus outline crossing the first result line when a completed Swarm card is expanded.
User Impact
Completed child-run results remain readable while the disclosure has keyboard focus, on desktop and mobile. The collapsed card stays compact and its 44-pixel target is preserved. No configuration changes or migrations are required.
Why This Change Was Made
The completed summary's negative bottom margin also applied when expanded, consuming the space before the outcome. Reset that margin only while open. The existing lifecycle test now checks actual text-to-outline clearance and covers both one and thirty children at desktop and mobile sizes.
Evidence
The new assertion fails against the original CSS with a 5-pixel overlap. All seven lifecycle cases and 34 related tests pass with the fix; nine scoped type, style, lint, format, and contract checks pass. Independent review found no actionable findings.
The inspected synthetic screenshots below show the actual registered Control UI flow before and after keyboard expansion. They are also attached in the originating QA chat. The existing shared-profile Chrome connection also verified keyboard expansion using the actual component and production styles: before clearance was -3.5 pixels; after clearance was +6.5 pixels, with focus visible in both states. The earlier Swarm CI timeout is a separate, still-unexplained observation; this spacing fix does not claim to resolve it.
Before
After