Skip to content

fix(ui): size agent menu grid to content - #127969

Merged
vyctorbrzezowski merged 2 commits into
openclaw:mainfrom
vyctorbrzezowski:fix/agent-menu-grid-height
Aug 22, 2026
Merged

vyctorbrzezowski merged 2 commits into
openclaw:mainfrom
vyctorbrzezowski:fix/agent-menu-grid-height

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

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

  • One through six agents use only the height their rows need.
  • Seven or more agents show two complete rows with internal scrolling.
  • No roster size shows a visible “Find agent…” input.
  • Keyboard navigation and typeahead remain available.

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.

Roster Dark Light
3 agents Dark agent menu with three agents and no empty grid space Light agent menu with three agents and no empty grid space
6 agents Dark agent menu with six agents and no filter or empty grid space Light agent menu with six agents and no filter or empty grid space
8 agents, scrolled Dark agent menu scrolled to the third row of an eight-agent roster Light agent menu scrolled to the third row of an eight-agent roster

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'
  • OpenCode /review, gpt-5.6-sol high: 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.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 22, 2026
@clawsweeper

clawsweeper Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 22, 2026 16:21
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 22, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 22, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/agent-menu-grid-height branch from 7bbf726 to ba7697d Compare August 22, 2026 16:36
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 22, 2026
@clawsweeper

clawsweeper Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 22, 2026, 12:42 PM ET / 16:42 UTC.

ClawSweeper review

What this changes

This 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 provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep 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
Reviewed head: ba7697dcb2441503effb99489e98d4815f140e12

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused grid evidence is useful, but the patch removes a documented large-roster workflow and needs that behavior restored or explicitly re-decided.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its supplied screenshots and measurements are supplemental and do not resolve the large-roster regression.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its supplied screenshots and measurements are supplemental and do not resolve the large-roster regression.
Evidence reviewed 6 items Documented large-roster contract: The Control UI documentation says rosters above ten agents have a filter field and pinned agents first; this branch leaves the documentation unchanged.
Changed menu behavior: The branch now sorts and renders every agent directly into the scrollable grid; the former filter state and filtering branch were removed in the supplied PR diff.
Regression test now encodes removed behavior: The 12-agent test asserts that no filter exists, so it cannot preserve the documented large-roster search path.
Findings 1 actionable finding [P1] Keep the documented large-roster filter
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per agent'

Result: PASS (completed)

node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per agent'
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127969-eOgBYE/target$ node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per a
gent'
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per agent'
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-127969-eOgBYE/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127969-eOgBYE/target

 ✓  ui-e2e  ui/src/e2e/sidebar-interactions.e2e.test.ts (6 tests | 5 skipped) 10853ms
     ✓ shows one row per agent and reaches agent switches with menu keys  4797ms

 Test Files  1 passed (1)
      Tests  1 passed | 5 skipped (6)
   Start at  16:43:23
   Duration  21.87s (transform 117ms, setup 128ms, import 334ms, tests 10.85s, environment 0ms)

[test] passed 1 Vitest shard in 26.90s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127969-eOgBYE/target$ node scripts/run-vitest.mjs ui/src/e2e/sidebar-interactions.e2e.test.ts -t 'one row per a
gent'
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts















Assertions:

  • PASS expect_output: 1 passed

How this fits together

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

Before merge

  • Keep the documented large-roster filter (P1) - This removes the only visible search control for large rosters: the menu now renders all agents into the scrolling grid, and the updated 12-agent test asserts that the filter is absent. Current Control UI docs promise a filter above ten agents; keyboard typeahead is not an equivalent discoverable mouse/touch path. Retain the filter while applying the grid-height fix, or obtain explicit direction and update the documented interaction. See https://docs.openclaw.ai/web/control-ui.
  • Resolve merge risk (P1) - Merging as-is removes the documented, discoverable filter from large agent rosters; keyboard typeahead does not preserve the mouse and touch search path.
  • Complete next step (P2) - The member-authored PR carries a protected maintainer label and needs normal maintainer handling after the documented menu behavior is restored or explicitly re-decided.

Findings

  • [P1] Keep the documented large-roster filter — ui/src/components/app-sidebar-agent-menu.ts:212-227
Agent review details

Security

None.

PR surface

Source -119, Tests +24, Other 0. Total -95 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 6 12 131 -119
Tests 2 28 4 +24
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 9 41 136 -95

Review metrics

Metric Value Why it matters
Production versus test delta production -92, tests -3, assertion baseline -1 The repair is net-negative; the blocker is the removed documented behavior rather than code growth.
Large-roster search behavior 1 documented filter path removed Existing Control UI documentation promises a filter for rosters above ten agents, making this a compatibility change rather than layout-only cleanup.

Merge-risk options

Maintainer options:

  1. Restore large-roster search before merge (recommended)
    Keep the layout fix while restoring the documented filter behavior and regression coverage for a roster above the supported threshold.
  2. Approve a deliberate search-model change
    If typeahead-only discovery is intended, obtain explicit product approval and update the public Control UI documentation with accessible mouse and touch guidance.

Technical review

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

  • [P1] Keep the documented large-roster filter — ui/src/components/app-sidebar-agent-menu.ts:212-227
    This removes the only visible search control for large rosters: the menu now renders all agents into the scrolling grid, and the updated 12-agent test asserts that the filter is absent. Current Control UI docs promise a filter above ten agents; keyboard typeahead is not an equivalent discoverable mouse/touch path. Retain the filter while applying the grid-height fix, or obtain explicit direction and update the documented interaction. See https://docs.openclaw.ai/web/control-ui.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 31ce436b5f69.

Labels

Label changes:

  • add P1: The patch silently replaces an existing documented agent-discovery workflow for larger rosters.
  • add merge-risk: 🚨 compatibility: Existing users with large rosters lose the visible filter they are documented to use.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its supplied screenshots and measurements are supplemental and do not resolve the large-roster regression.
  • remove P3: Current review triage priority is P1, so this older priority label is no longer current.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The patch silently replaces an existing documented agent-discovery workflow for larger rosters.
  • merge-risk: 🚨 compatibility: Existing users with large rosters lose the visible filter they are documented to use.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its supplied screenshots and measurements are supplemental and do not resolve the large-roster regression.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This MEMBER-authored PR is exempt from the external-contributor proof gate; its supplied screenshots and measurements are supplemental and do not resolve the large-roster regression.

Evidence

What I checked:

  • Documented large-roster contract: The Control UI documentation says rosters above ten agents have a filter field and pinned agents first; this branch leaves the documentation unchanged. Public docs: docs/web/control-ui.md. (docs/web/control-ui.md:263, ba7697dcb244)
  • Changed menu behavior: The branch now sorts and renders every agent directly into the scrollable grid; the former filter state and filtering branch were removed in the supplied PR diff. (ui/src/components/app-sidebar-agent-menu.ts:212, ba7697dcb244)
  • Regression test now encodes removed behavior: The 12-agent test asserts that no filter exists, so it cannot preserve the documented large-roster search path. (ui/src/test-helpers/app-sidebar-cases/agent-menu.ts:536, ba7697dcb244)
  • Feature provenance: The linked merged agent-switcher feature is commit 4371090, authored by Vyctor H. Brzezowski; its supplied PR context describes large rosters as searchable. (ui/src/components/app-sidebar-agent-menu.ts:212, 43710901ae78)
  • Review-environment limitation: The detached partial checkout lacks the PR parent and a merge base with supplied main; direct base diff and local test execution could not be independently completed. The documented contract and current branch source still establish the filter regression.
  • Docs-list launcher limitation: The required docs-list command could not start because Corepack attempted to create its cache on the read-only filesystem; no repository files were modified.

Likely related people:

  • vyctorbrzezowski: Introduced the merged agent-switcher feature and authored this follow-up branch. (role: feature introducer and recent area contributor; confidence: high; commits: 43710901ae78, ba7697dcb244; files: ui/src/components/app-sidebar-agent-menu.ts, ui/src/styles/layout.css)
  • Peter Steinberger: Recent history shows repeated ownership of sidebar agent-menu and adjacent Control UI work. (role: long-running sidebar-area contributor; confidence: medium; commits: c1987081c7d8, c780d8b1c02a; files: ui/src/components/app-sidebar-agent-menu.ts, ui/src/styles/layout.css)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the visible large-roster filter and its interaction coverage while retaining the grid-height fix.
  • Rerun the focused browser checks with a roster above the documented filter threshold and attach redacted after-fix evidence.
  • Let exact-head UI checks finish after the behavior is corrected.

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.

@vyctorbrzezowski
vyctorbrzezowski merged commit 70c2be7 into openclaw:main Aug 22, 2026
180 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the fix/agent-menu-grid-height branch August 22, 2026 16:50
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 23, 2026
* fix(ui): size agent grid to content

* chore(ci): shrink agent menu assertion baseline
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant