Repository navigation
refactor(macos): remove the custom menu bar hover card - #118116
Conversation
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.
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.
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 3:19 PM ET / 19:19 UTC. ClawSweeper reviewWhat this changesRemoves 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceOther -653. Total -653 across 10 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
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.
|
Merged via squash.
|
* 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.
Problem
The menu bar status item showed two hover affordances at once: the native
AppKit tooltip (
statusItem.button.toolTip, reading "OpenClaw") and a customSwiftUI 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
HoverHUDController/HoverHUDView(HoverHUD.swift).MenuBar.swiftand the twodismiss()calls in the status item click handlers.NSTrackingArea, theonHoverChangedparameter, and themouseEntered/mouseExitedoverrides come out ofStatusItemMouseRouter.Click routing (left = dashboard, right = menu) is unchanged.
WorkActivityStore.lastToolLabelhad no other reader.The anchored chat panel it fed
Tapping the card was the only caller of
WebChatManager.togglePanel(...), whichwas 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,presentAnchoredand its dismiss monitor, andWindowPlacement.anchoredBelowFrame.Chat itself is unaffected.
WebChatManager.show(...)— the windowpresentation — still backs
AppNavigationActions.openChat(), the Dock menu, the--chatflag, and deep links. Only the popover form of chat is gone, and it hadno 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 nowonChatWindowVisibilityChanged.Untouched on purpose: the native tooltip text,
applyStatusItemAppearance,CanvasManager/CanvasWindowController(separateCanvasPresentationandpresentAnchoredPanelmachinery),OverlayPanelFactory,NotifyOverlay, andQuickChatController.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) afterpnpm native:i18n:baseline; deleting Swift lines shifted recorded sourcelocations in
apps/.i18n/native-source.json. No strings added or removed.autoreview --mode branch(codexgpt-5.6-sol, high) — clean, no accepted findings.grep -r HoverHUD— no remaining references.Pre-existing failures, not from this change
BoundedCommandTests/BoundedProcessTestsare flaky on this machineindependent 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/sourcemismatches across zh-CN, zh-TW, pt-BR and others) fails identically on
pristine
origin/mainwith none of this branch applied. It is gated behindstrict_native_i18n.Neither was touched or worked around.
Test coverage
HoverHUDControllerTestsis deleted with its subject. TheStatusItemMouseRouterTestscase that covered hover retargeting was rewritten toassert 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.
WebChatSwiftUISmokeTestsloses only itspanel-specific cases.