Skip to content

fix: menus collapse near the top or bottom of the window - #196567

Merged
roboclaw-bot merged 4 commits into
mainfrom
openclaw/ui-rhythm-menu-fit
Nov 10, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
openclaw/ui-rhythm-menu-fit

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: menus can collapse into an unreadable strip when opened near the top or bottom of the window.

User Impact

Users can read and reach menu actions without first scrolling the trigger away from the window edge. No configuration changes or migrations.

Why This Change Was Made

The shared native overlay stylesheet now tries the preferred full-size placement and its flips before fitting an oversized menu across the viewport height. Existing consumer height limits and side-menu fallbacks remain intact; there is no new positioning state or JavaScript manager. When neither vertical side fits, the menu may overlap its trigger vertically rather than show a clipped strip.

Evidence

  • Actual Memory → Dreams → Review → More actions: 1400×1000 native-chrome simulation reproduced a 16.89px menu for 126px of actions on the base; the fix flips it above at full 126px height. ArrowDown/End reach the final action. The centered and 390×844 phone entries remain usable. No maintenance/configuration request was executed.
  • Native framing asserts both root classes, native flag/style, and the 52px titlebar inset. This is browser simulation, not physical macOS app proof. All captures use synthetic data.
  • New above/below-edge regressions fail on the base (8px instead of 126px), pass with the fix, preserve preferred placement/custom limits, and exercise 24 actions plus End/Home at 390×200.
  • Chromium and WebKit: 122/122 overlay/picker checks and 62/62 Popover/shadow/cross-root checks pass. Existing nested LTR/RTL side-menu scenarios pass. Chromium chat model/effort picker contracts also pass.
  • pnpm ui:build, UI typecheck, targeted oxlint/stylelint/format, diff checks, and exact test-line ratchet pass. Changed browser file: 12 cases per engine, approximately 5–8 seconds wall time; CI timing pending.
  • Fresh independent autoreview (Codex GPT-6.1 Sol, P0–P2), base 0b9114291429df561ed41340cdc035f51e0f163b → complete local candidate: scoped-clean, no actionable findings. The reviewer did not independently rerun browser tests. Local ClawSweeper is not provisioned; Hosted review acknowledged, pending. Original overlay publication 3ee811ab32a4a0700d92b5cbac9106da6a57340e is tree-identical to the reviewed candidate.
  • Simplification: shared viewport size policy replaces the side-only duplicate (production −6 lines); two parameterized regression scenarios add 45 test lines, with an exact 45-line allocation. Shared baseline scalars and all caps remain unchanged.

CI follow-up

Run 42792471564, checks-ui (1/3) failed the initial token-count assertion in chat-view.placement-cache.test.ts: the indicator was not mounted yet (undefined), not an incorrect updated count. The same failure was reproduced deterministically by queueing unrelated work through the production layout scheduler before mounting. settleChatMount deliberately leaves pre-existing frames to their caller. The test now waits for the actual initial 5.5k rendering; the subsequent 7.2k cache-update assertion remains synchronous and unchanged. No timeout increase, production change, test-line growth, or budget adjustment.

  • Identical pending-frame reproduction: original assertion red, repaired assertion green. The diagnostic stimulus was not added to production or retained test setup. Original CI predecessor/order was unavailable from the bounded log; this is not an inherited-failure attribution.
  • Final targeted tests: 3/3 Node, 3/3 pinned Bun; shared overlay contracts 24/24 Chromium + WebKit. Targeted chat test types, lint, format and diff checks pass.
  • Fresh independent Codex autoreview, P0–P2, 3ee811a → the two-line local test repair: scoped-clean, no actionable findings. Transcript repair head: ef33f44d9f5cddf393335a21539ff0495995ce5b. Existing build and screenshot evidence remains valid because production bytes are unchanged.

Slash-menu CI follow-up

Run 42797025154, checks-ui (3/3) failed the first slash-menu navigation test while its real lazy option renderer was still showing aria-busy="true". The navigation test now awaits the same option-module import started by SlashMenu before its existing bounded reactive-render assertion. It still asserts no loading fallback, every visual-order/wraparound selection, and the highlighted command’s draft and execution. No sleep, timeout increase, production change, or budget change.

  • Original focused Node and full Bun file passed locally; full-shard loading timing was not independently reproduced. CI’s failure remains classified new, not claimed inherited.
  • Repair validation: 22/22 Node, 22/22 pinned Bun, targeted chat-test typecheck and formatting pass; lint completes with one pre-existing warning in an untouched skill-state assertion. Fresh independent Codex P0–P2 delta review: scoped-clean.
  • Head 23c47d5b1bf7ea98ccca88a76c8c8baee220d1cf: test-only delta, zero net test-line growth. Existing Chromium/WebKit overlay, build, CSS-size, and media evidence is unchanged.

Before and after

Memory maintenance, 1400×1000 simulated native chrome. The animated mascot is unrelated to the menu geometry.

Before

Memory maintenance before

After

Memory maintenance after

Phone and nested-menu context

The phone placement stays preferred and all four actions remain visible.

BeforeAfter
Phone maintenance beforePhone maintenance after

Nested native gateway switcher retains its side placement and reachable final action.

Nested gateway switcher

Contributor credit: @vincentkoc requested and guided this Control UI repair.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 10, 2026 09:37
Try full-size native placements before a viewport-height fallback. Preserve consumer height budgets and side-menu placement while keeping oversized menus keyboard-scrollable.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 8d903e7b-6ce5-4989-adbf-c87b35bcdcb4
@clawsweeper

clawsweeper Bot commented Nov 10, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets shared menus flip at full height before using a scrollable viewport-height fallback.

Example: Open Memory → Dreams → Review → More actions in a 1400×1000 window with simulated native chrome.

  • Before: The four-action menu collapses to a 16.89px strip near the bottom edge.
  • After: The menu flips above its trigger and displays all four actions at 126px height.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, compact repair with direct visual proof and meaningful regressions; the failed required UI check still needs attribution before landing.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the actual Memory maintenance menu in the browser UI with synthetic data, showing the collapsed desktop menu becoming fully readable and phone placement remaining usable; physical macOS framing is explicitly outside this proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Menus opened near window edges can become unreadable and hide their actions.
Reason: The visible defect is demonstrated, the repair stays within shared overlay geometry, and this maintainer-authored PR already establishes direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides a focused fix for a current menu-layout defect, with convincing visual evidence and no actionable patch findings.

Priority: P2
Reviewed head: 3ee811ab32a4a0700d92b5cbac9106da6a57340e

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI menus and popovers pass an anchor, placement, and consumer size limits to shared overlay CSS, which controls their visible geometry while existing owners retain focus, keyboard navigation, and dismissal.

flowchart TD
  A[Control UI action trigger] --> B[Shared Menu or Popover]
  B --> C[Existing anchor owner]
  C --> D[Shared overlay CSS]
  D --> E[Preferred placement and flips]
  E --> F[Viewport fit and scrolling]
Loading

Technical review

Best possible solution:

Use the existing shared CSS positioning owner to try full-size placements before fitting oversized menus within the viewport.

Do we have a high-confidence way to reproduce the issue?

Current-main CSS can shrink the menu against its initial anchor region before overflow triggers a flip, matching the supplied desktop capture; no target code was executed during this review.

Is this the best way to solve the issue?

This is a small, complete repair using the existing geometry owner, preserving consumer limits and side-menu behavior without adding positioning state.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against efb5ee7e7e61.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Focused introduced change: The pinned introduction changes shared height sizing, adds a native viewport-fit fallback, removes the equivalent side-only height rule, and adds two parameterized browser regressions. (ui/src/components/solid/overlay.css:88, 3ee811ab32a4)
  • Current main still needs the fix: Fetched main retains the percentage-based height fallback and lacks the new viewport-fit position try. (ui/src/components/solid/overlay.css:88, efb5ee7e7e61)
  • Inspected visual proof: The downloaded desktop before/after images show the clipped strip becoming a readable four-action menu; both phone images retain a readable menu. The PR explicitly identifies the native framing as browser simulation and credits @vincentkoc for requesting and guiding the repair. (3ee811ab32a4)
  • Earlier side-menu intent preserved: fix(ui): fit side menus before clipping #179647 established viewport-based sizing before flipping, bounded keyboard scrolling, and consumer height precedence; this PR preserves those side-menu fallbacks while sharing their height policy. (ui/src/components/solid/overlay.css:143, f481daa407ff)
  • CI failure remains unattributed: The failed UI job annotates chat-view.placement-cache.test.ts:127, where chat token text is undefined; its WebKit overlay step passed. Full logs redirect to a blocked Azure host, and the inspected base run skipped UI tests, so neither diff causation nor an inherited failure is established. (ui/src/pages/chat/chat-view.placement-cache.test.ts:127, 3ee811ab32a4)
  • Policy and history inspection: Root and UI policies were applied, including shared ownership, visual proof, test value, and smallest-fix review; no maintainer-notes directory exists. Local follow-history stops at an unavailable creation-parent object, while the relevant introduction and side-menu repair blobs are readable. The installed Solid cheatsheet is absent; this patch changes no production Solid API usage. (ui/AGENTS.md:5, 3ee811ab32a4)

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 07fae10 adds ui/src/components/solid/overlay.css:57 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 07fae10c385a; files: ui/src/components/solid/overlay.css)

PR surface

Source -6, Tests +45, Other +2. Total +41 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 10 16 -6
Tests 1 45 0 +45
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 3 57 16 +41

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test LOC Production −6; tests +45 The shared CSS policy removes duplication, while the browser cases protect distinct top-edge, bottom-edge, and oversized keyboard-scroll behavior.

Labels

Label changes:

  • add P2: Collapsed menus hide actions near window edges, with a limited layout trigger and a focused repair.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • 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.

Label justifications:

  • P2: Collapsed menus hide actions near window edges, with a limited layout trigger and a focused repair.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Determine whether the chat token-usage assertion failure is inherited or caused by this PR before landing.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 10, 2026, 4:56 AM ET / 09:56 UTC.

roboclaw-bot and others added 2 commits November 10, 2026 10:10
The initial transcript mount may share an already-pending layout frame that the synchronous mount helper intentionally leaves to its caller. Wait for the first rendered token count, then retain the synchronous updated-count assertion.

Co-authored-by: vincentkoc <[email protected]>
Wait for the real lazy option module before the existing reactive busy-state assertion. Preserve visual order, wraparound selection and command execution checks without a loading-time deadline increase.

Co-authored-by: vincentkoc <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit c6fc5bd into main Nov 10, 2026
78 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/ui-rhythm-menu-fit branch November 10, 2026 10:49
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
…6567)

* fix: menus collapse near the top or bottom of the window

Try full-size native placements before a viewport-height fallback. Preserve consumer height budgets and side-menu placement while keeping oversized menus keyboard-scrollable.

Co-authored-by: vincentkoc <[email protected]>

* fix: menus collapse near the top or bottom of the window

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 8d903e7b-6ce5-4989-adbf-c87b35bcdcb4

* test: wait for initial transcript tokens before checking cache updates

The initial transcript mount may share an already-pending layout frame that the synchronous mount helper intentionally leaves to its caller. Wait for the first rendered token count, then retain the synchronous updated-count assertion.

Co-authored-by: vincentkoc <[email protected]>

* test: await slash option loading before checking navigation

Wait for the real lazy option module before the existing reactive busy-state assertion. Preserve visual order, wraparound selection and command execution checks without a loading-time deadline increase.

Co-authored-by: vincentkoc <[email protected]>

---------

Co-authored-by: vincentkoc <[email protected]>
steipete added a commit that referenced this pull request Nov 14, 2026
…ge (#198599)

The WebKit Secrets proof found the last row's Delete action clipped while
its menu-bounds check still passed. The clip came from the shared overlay
max-height resolving 100% against the cell beside the trigger, already
fixed on main by #196567. Measure item visibility against the menu
scrollport, cover a short bottom-edge row menu, and run the overlay style
tests in the WebKit lane so a regression fails in both engines.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…ge (openclaw#198599)

The WebKit Secrets proof found the last row's Delete action clipped while
its menu-bounds check still passed. The clip came from the shared overlay
max-height resolving 100% against the cell beside the trigger, already
fixed on main by openclaw#196567. Measure item visibility against the menu
scrollport, cover a short bottom-edge row menu, and run the overlay style
tests in the WebKit lane so a regression fails in both engines.
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 P2 Normal backlog priority with limited blast radius. 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: S 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