Skip to content

fix(ui): dismiss topbar menus when their anchors disappear#103508

Merged
steipete merged 1 commit into
mainfrom
codex/fix-topbar-transient-menus
Jul 10, 2026
Merged

fix(ui): dismiss topbar menus when their anchors disappear#103508
steipete merged 1 commit into
mainfrom
codex/fix-topbar-transient-menus

Conversation

@steipete

@steipete steipete commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Closes #103500
Related: #103426

What Problem This Solves

Fixes an issue where desktop Control UI users could leave the topbar More or pin-editor menu floating over the drawer layout after resizing below the 1100px breakpoint. Keyboard users also lost focus after More → Edit pinned items → Escape, and the elements exposed as ARIA menus did not support arrow/Home/End movement or a clean Tab exit.

Why This Change Was Made

The topbar now owns the complete lifetime of its fixed-position menus: any viewport resize dismisses them before their anchor geometry can become stale, and all dismissal listeners are removed together. Opening the pin editor from More carries the durable More button forward as its focus-restoration target instead of retaining the disappearing Edit menu item.

Menu items are removed from the page tab order and the topbar implements the declared menu keyboard contract: ArrowUp/ArrowDown with wraparound, Home/End, Escape back to the durable trigger, and Tab dismissal followed by normal browser traversal.

Landing coordination: rebased again only because the repo-native merge wrapper detected an E2E overlap after #103501 landed; both independent test blocks were retained and the stable patch id is unchanged. Current head is 427b1af. Keep this PR as the sole active UI merge until it lands.

User Impact

Responsive layout changes no longer leave an orphaned menu over the narrow drawer UI. Keyboard users keep their place when leaving the pin editor and can move predictably through both topbar menus.

Evidence

  • Exact current-main red proof: real Chromium mocked-Gateway E2E on Blacksmith Testbox had 2 existing passes and 3 focused failures:
    • More menu count remained 1 after resizing from 1440px to 900px.
    • More did not regain document.activeElement after pin-editor Escape.
    • ArrowDown did not move focus to the next menu item.
  • Rebased exact-head real Chromium: head 427b1af; Testbox-through-Crabbox passed 6/6, including the retained fix(ui): preserve desktop lobster run outcomes #103501 lobster case plus all three menu regressions.
  • Rebased exact-head hosted changed gate: path-scoped check:changed passed core/coreTests typechecks, lint, guards, and import-cycle checks in 2m52s.
  • Formatting: format:check passed for both changed files.
  • Independent review: fresh branch Codex autoreview clean, confidence 0.91.
  • Exact-head CI: 58 successful checks, 20 expected skips, no failures or pending checks.
  • Testbox: tbx_01kx5epmyq4ja1s1mw5hpnt676; hosted run https://github.com/openclaw/openclaw/actions/runs/29076665424; stopped after proof.
Desktop More menu open at 1440px Drawer after resize to 900px
Desktop More menu open Drawer with the transient menu dismissed

Visual artifact manifest: https://raw.githubusercontent.com/steipete/openclaw-pr-assets/main/topbar-transient-menus/artifact-manifest.json

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 10, 2026
@steipete
steipete force-pushed the codex/fix-topbar-transient-menus branch from 3fe49f8 to 9fc7b9e Compare July 10, 2026 07:09
@steipete
steipete force-pushed the codex/fix-topbar-transient-menus branch from 9fc7b9e to 427b1af Compare July 10, 2026 07:24
@steipete
steipete merged commit 66bcfea into main Jul 10, 2026
78 checks passed
@steipete
steipete deleted the codex/fix-topbar-transient-menus branch July 10, 2026 07:33
@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 size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Topbar transient menus outlive their anchors and break keyboard focus

1 participant