Skip to content

refactor(macos): remove the custom menu bar hover card - #118116

Merged
steipete merged 5 commits into
mainfrom
fix/remove-hover-hud
Aug 2, 2026
Merged

steipete merged 5 commits into
mainfrom
fix/remove-hover-hud

Conversation

@steipete

@steipete steipete commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The menu bar status item showed two hover affordances at once: the native
AppKit tooltip (statusItem.button.toolTip, reading "OpenClaw") and a custom
SwiftUI card that rendered "Idle / No recent activity" anchored below the icon.
The custom card also appeared far more often than intended in practice.

Change

Keep the native tooltip, remove the custom hover card — and the code that only
existed to serve it.

The card itself

  • Delete HoverHUDController / HoverHUDView (HoverHUD.swift).
  • Remove the four HUD suppression call sites in MenuBar.swift and the two
    dismiss() calls in the status item click handlers.
  • The card was the only consumer of the status item's hover tracking, so the
    NSTrackingArea, the onHoverChanged parameter, and the
    mouseEntered/mouseExited overrides come out of StatusItemMouseRouter.
    Click routing (left = dashboard, right = menu) is unchanged.
  • WorkActivityStore.lastToolLabel had no other reader.

The anchored chat panel it fed
Tapping the card was the only caller of WebChatManager.togglePanel(...), which
was in turn the only thing that created the menu-bar-anchored chat popover. CI's
Periphery gate flagged it, so that presentation path goes too: togglePanel /
panelHidden, the panel controller state, WebChatPresentation, WebChatPanel,
presentAnchored and its dismiss monitor, and WindowPlacement.anchoredBelowFrame.

Chat itself is unaffected. WebChatManager.show(...) — the window
presentation — still backs AppNavigationActions.openChat(), the Dock menu, the
--chat flag, and deep links. Only the popover form of chat is gone, and it had
no reachable entry point left.

The status item highlight that tracked chat window visibility is deliberately
preserved. It was previously wired through the confusingly named
onPanelVisibilityChanged; it is now onChatWindowVisibilityChanged.

Untouched on purpose: the native tooltip text, applyStatusItemAppearance,
CanvasManager / CanvasWindowController (separate CanvasPresentation and
presentAnchoredPanel machinery), OverlayPanelFactory, NotifyOverlay, and
QuickChatController.

Behavior after this change

Hovering the menu bar icon shows only the standard macOS tooltip. Clicking is
unchanged. No visual replacement is introduced.

Proof

  • periphery scan --config .periphery.yml --strict — No unused code detected.
  • swift build --package-path apps/macos — succeeds.
  • swift test --package-path apps/macos — 1597 tests / 177 suites. See note below.
  • ./scripts/format-swift.sh macos — 0/26 files require formatting.
  • pnpm native:i18n:verify — passes (entries=5385 changed=false) after
    pnpm native:i18n:baseline; deleting Swift lines shifted recorded source
    locations in apps/.i18n/native-source.json. No strings added or removed.
  • autoreview --mode branch (codex gpt-5.6-sol, high) — clean, no accepted findings.
  • grep -r HoverHUD — no remaining references.

Pre-existing failures, not from this change

  • BoundedCommandTests / BoundedProcessTests are flaky on this machine
    independent of this branch: three consecutive runs of just those two suites on
    identical code gave pass / fail / pass (pid-file and process-spawn timing).
  • pnpm native:i18n:check (locale parity, entries[4695..4702] id/source
    mismatches across zh-CN, zh-TW, pt-BR and others) fails identically on
    pristine origin/main with none of this branch applied. It is gated behind
    strict_native_i18n.

Neither was touched or worked around.

Test coverage

HoverHUDControllerTests is deleted with its subject. The
StatusItemMouseRouterTests case that covered hover retargeting was rewritten to
assert the same invariant — retargeting the tracked button without reinstalling
the event monitor — via click routing instead of hover callbacks, so the coverage
is preserved rather than dropped. WebChatSwiftUISmokeTests loses only its
panel-specific cases.

The status item showed two hover affordances at once: the native AppKit
tooltip and a custom SwiftUI panel rendering an "Idle / No recent activity"
card. Keep the native tooltip and drop the custom HUD.

The HUD was the only consumer of the status item's hover tracking, so the
NSTrackingArea and onHoverChanged plumbing in StatusItemMouseRouter goes
with it; click routing is unchanged. WorkActivityStore.lastToolLabel had no
other reader either.
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: M maintainer Maintainer-authored PR labels Aug 2, 2026
Deleting HoverHUD.swift shifted the MenuBar.swift line numbers that
apps/.i18n/native-source.json records. Regenerated with
`pnpm native:i18n:baseline`; only line numbers change, no strings added
or removed.
@steipete steipete self-assigned this Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 3:19 PM ET / 19:19 UTC.

ClawSweeper review

What this changes

Removes the macOS menu-bar hover card and its unused hover-tracking and anchored-chat-popover implementation while retaining the native tooltip, status-item click routing, and normal chat window.

Merge readiness

⛔ Blocked until real behavior proof is added - 3 items remain

Keep this PR open for the existing real-behavior-proof gate. The branch’s removal scope matches the current ownership graph: the hover HUD is the only current caller of the anchored chat panel, while normal chat opens through the window path; however, the PR body contains validation claims rather than inspectable after-fix macOS evidence.

Priority: P3
Reviewed head: 0714f1475e8fcd1891dc7408c7325316ca326fba

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The deletion appears coherent and bounded, but missing real macOS behavior proof remains a merge gate.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR lists static and test validation but no inspectable after-fix macOS interaction evidence; add redacted screenshot, recording, terminal output, or runtime logs showing the changed hover and click behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR lists static and test validation but no inspectable after-fix macOS interaction evidence; add redacted screenshot, recording, terminal output, or runtime logs showing the changed hover and click behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current owner graph: On current main, the hover HUD calls the anchored chat toggle, while the app navigation, Dock menu, cron rows, and CLI auto-open paths call the standard Web Chat window path. The PR’s proposed removal therefore follows the existing owner boundary rather than replacing normal chat presentation.
Current click routing: The current status-item router separately consumes left and right mouse-down events before AppKit menu tracking; the PR preserves this routing while removing hover-only tracking.
Existing regression coverage: Current tests cover status-item click routing and a panel-specific Web Chat smoke path; the PR replaces the former hover-retargeting test with click retargeting and removes coverage only for deleted panel behavior.
Findings None None.
Security None None.

How this fits together

The macOS menu-bar status item routes left and right clicks and previously also drove a custom hover HUD. That HUD could open an anchored Web Chat panel, while other app entry points use the standard Web Chat window.

flowchart LR
  A[Menu bar status item] --> B[Click and hover routing]
  B --> C[Custom hover card]
  C --> D[Anchored chat popover]
  A --> E[Native macOS tooltip]
  B --> F[Dashboard and menu clicks]
  G[App and Dock chat actions] --> H[Standard chat window]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR lists static and test validation but no inspectable after-fix macOS interaction evidence; add redacted screenshot, recording, terminal output, or runtime logs showing the changed hover and click behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - No inspectable after-fix macOS run yet demonstrates that hover now shows only the native tooltip and that left/right status-item clicks remain unchanged.
  • Complete next step (P2) - This protected-label PR needs contributor-supplied real macOS interaction proof; there is no discrete mechanical repair for an automated fix lane.
Agent review details

Security

None.

PR surface

Other -653. Total -653 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 10 128 781 -653
Total 10 128 781 -653

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: apps/macos/Tests/OpenClawIPCTests/HoverHUDControllerTests.swift. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Add a redacted macOS screenshot or short recording showing native-tooltip-only hover plus both unchanged click outcomes, then merge the focused deletion if the exact-head checks remain green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Add a redacted macOS screenshot or short recording showing native-tooltip-only hover plus both unchanged click outcomes, then merge the focused deletion if the exact-head checks remain green.

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

Yes, from source: current main shows the hover HUD feeding the anchored panel and separate click/window-chat paths; the remaining proof gap is an after-fix macOS interaction capture, not uncertainty about the affected code path.

Is this the best way to solve the issue?

Yes. Removing the HUD and its now-single-use anchored presentation path is the narrowest maintainable solution because current source routes all ordinary chat entry points through the standard window.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 82540adc476c.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove merge-risk: 🚨 other: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: This is a focused macOS presentation cleanup with no evidence of a broken default workflow once normal click routing and window chat remain intact.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR lists static and test validation but no inspectable after-fix macOS interaction evidence; add redacted screenshot, recording, terminal output, or runtime logs showing the changed hover and click behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current owner graph: On current main, the hover HUD calls the anchored chat toggle, while the app navigation, Dock menu, cron rows, and CLI auto-open paths call the standard Web Chat window path. The PR’s proposed removal therefore follows the existing owner boundary rather than replacing normal chat presentation. (apps/macos/Sources/OpenClaw/HoverHUD.swift:85, 82540adc476c)
  • Current click routing: The current status-item router separately consumes left and right mouse-down events before AppKit menu tracking; the PR preserves this routing while removing hover-only tracking. (apps/macos/Sources/OpenClaw/MenuBar.swift:256, 82540adc476c)
  • Existing regression coverage: Current tests cover status-item click routing and a panel-specific Web Chat smoke path; the PR replaces the former hover-retargeting test with click retargeting and removes coverage only for deleted panel behavior. (apps/macos/Tests/OpenClawIPCTests/StatusItemMouseRouterTests.swift:7, 82540adc476c)
  • Feature provenance: Blame attributes the current menu-bar HUD state and Web Chat panel state to the same recent macOS feature commit, making Shakker the strongest current-main routing candidate for this surface. (apps/macos/Sources/OpenClaw/MenuBar.swift:20, 0d5472b8f182)
  • PR proof state: The PR body reports build, tests, formatting, dead-code scanning, and i18n checks, but supplies no inspectable screenshot, recording, terminal capture, runtime log, or linked artifact demonstrating tooltip-only hover and unchanged clicks after the change. (0714f1475e8f)

Likely related people:

  • Shakker: Current-main blame attributes both the status-item HUD state and the Web Chat panel state to the same recent implementation commit. (role: current feature author; confidence: high; commits: 0d5472b8f182; files: apps/macos/Sources/OpenClaw/MenuBar.swift, apps/macos/Sources/OpenClaw/WebChatManager.swift, apps/macos/Sources/OpenClaw/HoverHUD.swift)

Rank-up moves

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

  • Add a redacted screenshot or short recording that shows the native tooltip on hover and the unchanged left/right click outcomes.
  • Update the PR body with the evidence; it should trigger a fresh ClawSweeper review automatically, or a maintainer can comment @clawsweeper re-review.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-02T18:41:29.799Z sha a74c937 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T19:09:04.826Z sha 3728768 :: needs real behavior proof before merge. :: [P2] Remove the release-owned changelog entry

Removing the hover card left WebChatManager.togglePanel() without a caller,
and it was the only thing that created the menu-bar-anchored chat popover.
Delete that presentation path: togglePanel/panelHidden, the panel controller
state, WebChatPresentation, WebChatPanel, presentAnchored and its dismiss
monitor, and WindowPlacement.anchoredBelowFrame.

Chat is unaffected as a window - WebChatManager.show() still backs the Dock
menu, --chat and deep links. The status item highlight that tracked chat
window visibility is preserved, renamed to onChatWindowVisibilityChanged
now that no panel exists to confuse it with.

Periphery reports no unused code.
AGENTS.md: CHANGELOG.md is release-only and release generation derives it
from merged PRs. Release-note context lives in the PR body instead.
Correct the previous commit, which restored CHANGELOG.md from current
origin/main and so pulled in an unrelated entry added after this branch
forked. Reset to the merge-base content: this PR now touches no changelog.
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 2, 2026
@steipete
steipete merged commit b8a6ea1 into main Aug 2, 2026
98 of 102 checks passed
@steipete
steipete deleted the fix/remove-hover-hud branch August 2, 2026 20:10
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* refactor(macos): remove the custom menu bar hover card

The status item showed two hover affordances at once: the native AppKit
tooltip and a custom SwiftUI panel rendering an "Idle / No recent activity"
card. Keep the native tooltip and drop the custom HUD.

The HUD was the only consumer of the status item's hover tracking, so the
NSTrackingArea and onHoverChanged plumbing in StatusItemMouseRouter goes
with it; click routing is unchanged. WorkActivityStore.lastToolLabel had no
other reader either.

* chore(i18n): refresh native i18n inventory after hover card removal

Deleting HoverHUD.swift shifted the MenuBar.swift line numbers that
apps/.i18n/native-source.json records. Regenerated with
`pnpm native:i18n:baseline`; only line numbers change, no strings added
or removed.

* refactor(macos): drop the orphaned anchored chat panel

Removing the hover card left WebChatManager.togglePanel() without a caller,
and it was the only thing that created the menu-bar-anchored chat popover.
Delete that presentation path: togglePanel/panelHidden, the panel controller
state, WebChatPresentation, WebChatPanel, presentAnchored and its dismiss
monitor, and WindowPlacement.anchoredBelowFrame.

Chat is unaffected as a window - WebChatManager.show() still backs the Dock
menu, --chat and deep links. The status item highlight that tracked chat
window visibility is preserved, renamed to onChatWindowVisibilityChanged
now that no panel exists to confuse it with.

Periphery reports no unused code.

* chore: drop CHANGELOG edit from this PR

AGENTS.md: CHANGELOG.md is release-only and release generation derives it
from merged PRs. Release-note context lives in the PR body instead.

* chore: restore CHANGELOG to the branch base

Correct the previous commit, which restored CHANGELOG.md from current
origin/main and so pulled in an unrelated entry added after this branch
forked. Reset to the merge-base content: this PR now touches no changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant