Skip to content

fix(ui): identity menu submenus flicker closed in the macOS app - #185579

Merged
steipete merged 1 commit into
mainfrom
fix/identity-submenu-flicker
Oct 27, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/identity-submenu-flicker

Conversation

@steipete

@steipete steipete commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: in the macOS app, the identity menu's Gateway switcher submenu (and the Help submenu) flickers and disappears before you can pick anything.

User Impact

User impact: hovering Gateway or Help in the identity menu opens a submenu that stays open while you move into it and choose an entry.

Why This Change Was Made

The identity menu rebuilds its entry list whenever any input it reads changes. That happens repeatedly while you move the pointer, and constantly on a busy Gateway. Each rebuild created brand-new separator and section-title nodes. Both submenus sit between two of those nodes, so Solid's keyed list reconciler detached and re-inserted the submenu's DOM on every rebuild. Re-inserting a node silently hides an open native popover (no toggle event), so the submenu vanished while the menu still believed it was open. The Gateway submenu only exists in the Mac app, which is why it showed up there first.

The separators and title are now created once per menu and reused across rebuilds, the same pattern the session menu already uses for its dividers. Rebuilds no longer move the open submenu. The Solid overlays guide now records this trap.

Evidence

  • Regression test keeps an open gateway submenu in place while the identity menu rebuilds (app-sidebar-native-gateways.test.ts): opens the Gateway submenu, forces a rebuild, and asserts the open branch is never detached. Red on the base (the open branch was among 14 detached nodes), green with the fix. The full file passes 6/6.
  • Playwright repro against the mock Gateway with the macOS native-gateway shim, in WebKit (the Mac app's engine) and Chromium. It hovers each submenu, then moves into it:
    • Before: with a cold cache, lazily registered copy rebuilt the menu mid-hover. The Gateway submenu then sat in open while its popover was no longer showing, and a DOM hook caught reconcileArrays replacing the open submenu's wrapper on each rebuild. Changing one menu input while the submenu is open (the capture below) reproduces this deterministically: phase=open, :popover-open false.
    • After: both submenus stay open through hover, a rebuild, and travel into the submenu in both engines, with zero wrapper replacements across repeated WebKit runs.
  • The other identity menu consumer tests (people, embedder gateways, rail menus, theme toggle, control theme), the compact identity menu E2E, format, lint, UI typecheck, and the Solid controller guard pass. Autoreview (Codex, P0–P2) is scoped-clean.
  • Investigated local failure, not caused by this change: app-sidebar-identity-keyboard.browser.test.ts ("traverses the actual item order…") fails on the base as well as this head on a heavily loaded host (base 4/5 failing, head 4/4). In both, Profile has focus after Enter but the menu machine holds no highlight, so the first ArrowDown stays on Profile. That's a focus-adoption timing race in the shared menu machine, left for a follow-up.
Before (WebKit, pointer resting on Gateway, after one menu input changes) After
Gateway submenu missing after a menu rebuild Gateway submenu stays open after a menu rebuild

Gap: verified in Playwright WebKit with the native shim, not in the signed Mac app itself.

Release-note context: Control UI identity menu submenus (Gateway switcher, Help) no longer flicker closed in the macOS app.

The identity menu rebuilt its separator and Gateway title entries as new
DOM nodes on every rebuild of its entry list. The Gateway switcher and Help
submenus each sit between two of those nodes, so Solid's keyed reconciler
detached and re-inserted the submenu on every rebuild. Re-inserting a node
silently hides an open native popover, so the submenu flickered closed while
the menu still considered it open.

Build the content entries once per menu, as the session menu already does,
and record the trap in the Solid overlays guide.

Release-note context: Control UI identity menu submenus (Gateway switcher,
Help) no longer flicker closed in the macOS app.
@clawsweeper

clawsweeper Bot commented Oct 27, 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.

@steipete
steipete marked this pull request as ready for review October 27, 2026 06:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T06:37:29.161577Z d4ecfff Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reuses identity-menu separators and its Gateway heading across rebuilds so open Gateway and Help submenus remain visible.

Example: Open the Team Gateway submenu, then change the menu's device-pairing availability.

  • Before: Reconciliation detaches the submenu wrapper and its native popover disappears.
  • After: The menu updates device-pairing availability while the Gateway submenu stays visible.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused root-cause repair supported by inspected visual evidence, a meaningful regression, and passing current-head checks.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots show the changed Control UI Gateway submenu absent before and visible after a menu-input rebuild; the accompanying report exercises Gateway and Help hover, rebuild, and pointer travel in WebKit and Chromium against a mock Gateway with the native shim, without claiming signed macOS app coverage.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Gateway and Help submenus disappear before users can move into them and choose an entry.
Reason: This maintainer-authored repair restores usable existing controls while preserving the compact menu design and current action contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for landing: it fixes a concrete submenu dismissal bug still present on current main, with no actionable findings and passing current-head CI gates.

Priority: P2
Reviewed head: d4ecfffefd5246f2ebe00783737eab32d83d5c80

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI identity-menu renderer turns live profile, Gateway, connection, and appearance inputs into entries for the shared Solid Menu; selections flow through existing navigation handlers and the native Gateway bridge.

flowchart LR
  A[Live sidebar inputs] --> B[Identity menu entries]
  C[Stable headings and separators] --> B
  B --> D[Shared Solid Menu]
  D --> E[Native submenu popovers]
  E --> F[Existing action handlers]
Loading

Technical review

Best possible solution:

Land the focused producer-side repair that preserves submenu DOM identity while retaining live menu bindings and the existing shared overlay owner.

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

Current-main source recreates content nodes around keyed submenu branches on menu-input changes; the supplied before capture and reported base-failing regression establish a concrete reproduction, although this read-only review ran no target code.

Is this the best way to solve the issue?

The patch repairs node identity at its producer using the existing session-menu pattern, preserves reactive entries and native actions, and adds one distinct regression without unnecessary machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Identity-menu content entries and shared overlay ownership keeps the original intent (f3e38df: The native-menu migration centralized visibility, dismissal, nested navigation, and focus in the shared Menu.)
  • Compact Gateway submenu keeps the original intent (b4c0f82: Gateway choices moved into a submenu so common account actions remain reachable with many saved Gateways.)
  • Renderer-owned reactive entry memo keeps the original intent (63aad5a: Memoized JSX-producing entries prevent native menu activation from allocating unowned effects.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source -13, Tests +22, Docs +1. Total +10 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 37 50 -13
Tests 1 22 0 +22
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 60 50 +10

Labels

Label changes:

  • add P2: Premature submenu dismissal obstructs Gateway switching and Help access, with a focused UI repair and limited blast radius.
  • 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 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Premature submenu dismissal obstructs Gateway switching and Help access, with a focused UI repair and limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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.

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 October 27, 2026, 2:51 AM ET / 06:51 UTC.

@steipete
steipete merged commit 5962ce7 into main Oct 27, 2026
159 of 165 checks passed
@steipete
steipete deleted the fix/identity-submenu-flicker branch October 27, 2026 08:20
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…185579)

The identity menu rebuilt its separator and Gateway title entries as new
DOM nodes on every rebuild of its entry list. The Gateway switcher and Help
submenus each sit between two of those nodes, so Solid's keyed reconciler
detached and re-inserted the submenu on every rebuild. Re-inserting a node
silently hides an open native popover, so the submenu flickered closed while
the menu still considered it open.

Build the content entries once per menu, as the session menu already does,
and record the trap in the Solid overlays guide.

Release-note context: Control UI identity menu submenus (Gateway switcher,
Help) no longer flicker closed in the macOS app.
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