Skip to content

fix: keep expanded Swarm results clear of keyboard focus - #153168

Merged
steipete merged 1 commit into
mainfrom
codex/fix-completed-swarm-focus-spacing
Sep 19, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-completed-swarm-focus-spacing

Conversation

@steipete

@steipete steipete commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

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

Before: focus outline overlaps the first result line

After

After: focus outline clears the result text

@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 19, 2026
@steipete
steipete marked this pull request as ready for review September 19, 2026 21:07
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 19, 2026
@clawsweeper

clawsweeper Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 5:13 PM ET / 21:13 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 2c849f73552b1b75974455cdbbf6b8442dc2e6ee

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable repair with convincing visual proof and meaningful regression coverage; no blocking findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.
Evidence reviewed 8 items Scoped production repair: The completed summary retains its 44-pixel minimum height and negative outer margins; the added open-state selector resets only its bottom margin. The component renders the successful outcome immediately after the summary.
Meaningful browser regression coverage: The complete lifecycle test opens the registered chat view, receives completion data, focuses the disclosure, presses Enter, and compares rendered outcome text against the computed focus-outline boundary. Four successful-completion cases cover one and thirty children on desktop and mobile; existing collapsed-height and keyboard-close assertions remain.
Inspected visual proof: Viewed both downloaded GitHub attachments: proof-image-1.png visibly places the focus line across the first outcome line; proof-image-2.png shows clear separation. The captured body, sourceRevision 07f28367932f6559593f9bace7921c3c7550c8b9505b0914a97589923de1abe6, identifies these as synthetic registered-Control-UI captures and reports additional Chrome measurements improving clearance from -3.5 to +6.5 pixels. It also records delivery to the originating QA chat.
Findings None None.
Security None None.

How this fits together

Control 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +4, Tests +27. Total +31 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 0 +4
Tests 1 27 0 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 31 0 +31

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a bounded visual accessibility repair that improves expanded-result readability without blocking chat.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.

Label justifications:

  • P3: This is a bounded visual accessibility repair that improves expanded-result readability without blocking chat.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots of the registered Control UI with synthetic session data directly show the changed stylesheet separating the expanded outcome from the keyboard focus line; reported Chrome measurements corroborate the visible improvement.

Evidence

What I checked:

  • Scoped production repair: The completed summary retains its 44-pixel minimum height and negative outer margins; the added open-state selector resets only its bottom margin. The component renders the successful outcome immediately after the summary. (ui/src/styles/chat/layout.css:1984, 2c849f73552b)
  • Meaningful browser regression coverage: The complete lifecycle test opens the registered chat view, receives completion data, focuses the disclosure, presses Enter, and compares rendered outcome text against the computed focus-outline boundary. Four successful-completion cases cover one and thirty children on desktop and mobile; existing collapsed-height and keyboard-close assertions remain. (ui/src/e2e/chat-swarm-lifecycle.e2e.test.ts:129, 2c849f73552b)
  • Inspected visual proof: Viewed both downloaded GitHub attachments: proof-image-1.png visibly places the focus line across the first outcome line; proof-image-2.png shows clear separation. The captured body, sourceRevision 07f28367932f6559593f9bace7921c3c7550c8b9505b0914a97589923de1abe6, identifies these as synthetic registered-Control-UI captures and reports additional Chrome measurements improving clearance from -3.5 to +6.5 pixels. It also records delivery to the originating QA chat. (2c849f73552b)
  • Still necessary on main: Inspected main retains margin: -10px -12px for completed summaries without the expanded-state bottom-margin reset. (ui/src/styles/chat/layout.css:1976, 695501b81158)
  • Latest-release comparison: GitHub’s v2026.9.5 source also retains the negative bottom margin without the expanded-state override; this repair is not already present there. (ui/src/styles/chat/layout.css:1979, ec9c1a13db89)
  • Verified merge scope: Raw test-merge parents match pinned main followed by the original PR head. Comparing that result with its main parent preserves the same CSS and browser-test changes; unrelated endpoint drift is not attributed to this PR. (04b74a828b41)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 20acdb6 into main Sep 19, 2026
146 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant