Repository navigation
fix: menus collapse near the top or bottom of the window - #196567
Conversation
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
|
🦞👀 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. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -6, Tests +45, Other +2. Total +41 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource 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
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 10, 2026, 4:56 AM ET / 09:56 UTC. |
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]>
|
Merged via squash.
|
…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]>
…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.
…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.
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
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.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 publication3ee811ab32a4a0700d92b5cbac9106da6a57340eis tree-identical to the reviewed candidate.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.settleChatMountdeliberately 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.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 bySlashMenubefore 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.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
After
Phone and nested-menu context
The phone placement stays preferred and all four actions remain visible.
Nested native gateway switcher retains its side placement and reachable final action.
Contributor credit: @vincentkoc requested and guided this Control UI repair.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by