Repository navigation
feat(mac): Quick Chat — global-shortcut floating composer for the main session - #109720
Conversation
- Spotlight-style non-activating key panel on Option+Space (KeyboardShortcuts 3.0.1 exact-pinned, recorder row in Settings -> General) plus a menu bar item - shows the main-session agent identity via agent.identity.get with a 'main session' chip; Return sends via chat.send reusing the idempotency key on ambiguous retries; Cmd+Return also opens full chat; Shift+Return newline - targeted permission strip (notifications/accessibility/screen recording) with a scoped 1s status poll while visible; grant flow keeps the bar alive and avoids PermissionMonitor's AppleScript probe - extract shared ChatSendStatus acceptance mapping; TalkModeRuntime adopts it - rename anchored-panel 'quick chat' wording to 'compact chat panel'; docs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b41294916a
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let response = try await GatewayConnection.shared.chatSend( | ||
| sessionKey: sessionKey, | ||
| message: message, | ||
| thinking: nil, | ||
| idempotencyKey: idempotencyKey, | ||
| attachments: []) |
There was a problem hiding this comment.
Bind Quick Chat sends to the captured route
When Quick Chat sends while the Gateway route is changing, or after the first chat.send is admitted but its ACK is lost, this plain chatSend call uses the mutable retrying request path rather than a captured route. GatewayConnection.request can reconnect/fallback and reissue the same draft on another route, while the existing WebChat sender captures route and passes ifCurrentRoute/expectedSessionRoutingContract to avoid retargeting or duplicate delivery. Quick Chat should use the same route-bound send path before reporting the message as accepted.
Useful? React with 👍 / 👎.
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(mac): Quick Chat — global-shortcut floating composer for the main session This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43bfd6087b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| static let toggleQuickChat = Self( | ||
| "toggleQuickChat", | ||
| initial: .init(.space, modifiers: [.option])) |
There was a problem hiding this comment.
Do not ship Option-Space as the default global hotkey
For fresh installs this initial value registers Option-Space as a system-wide shortcut as soon as Quick Chat starts. That chord is also used for text entry in other macOS apps (for example inserting a non-breaking space), so OpenClaw will intercept normal typing and open Quick Chat until the user discovers and clears the setting; the KeyboardShortcuts docs also recommend prompting instead of assigning an initial shortcut for public apps. Please leave the shortcut unset by default or ask during onboarding/settings before registering it.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. Reviewed July 17, 2026, 3:28 AM ET / 07:28 UTC. Summary PR surface: Docs +10, Other +1768. Total +1778 across 52 files. Reproducibility: yes. for the review defects: the source shows an unbound mutable-route send path and an immediately registered Option-Space default. The shortcut conflict is directly reproducible on a fresh macOS installation. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Reuse the established captured-route WebChat send contract and leave Quick Chat's shortcut unset until the user explicitly records one in onboarding or Settings. Do we have a high-confidence way to reproduce the issue? Yes for the review defects: the source shows an unbound mutable-route send path and an immediately registered Option-Space default. The shortcut conflict is directly reproducible on a fresh macOS installation. Is this the best way to solve the issue? No in its current form. The composer is a maintainable native feature, but its send path should preserve the existing route invariant and its global shortcut should require explicit enrollment. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e01027dd28a8. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Docs +10, Other +1768. Total +1778 across 52 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Merged via squash.
|
…n session (openclaw#109720) * feat(mac): add Quick Chat floating composer with global shortcut - Spotlight-style non-activating key panel on Option+Space (KeyboardShortcuts 3.0.1 exact-pinned, recorder row in Settings -> General) plus a menu bar item - shows the main-session agent identity via agent.identity.get with a 'main session' chip; Return sends via chat.send reusing the idempotency key on ambiguous retries; Cmd+Return also opens full chat; Shift+Return newline - targeted permission strip (notifications/accessibility/screen recording) with a scoped 1s status poll while visible; grant flow keeps the bar alive and avoids PermissionMonitor's AppleScript probe - extract shared ChatSendStatus acceptance mapping; TalkModeRuntime adopts it - rename anchored-panel 'quick chat' wording to 'compact chat panel'; docs * chore(mac): regenerate docs map and native i18n inventory for Quick Chat * ci: retrigger checks after stalled push event * chore(mac): refresh native locale artifacts for Quick Chat strings * chore(android): regenerate locale strings for refreshed shared translations
…n session (openclaw#109720) * feat(mac): add Quick Chat floating composer with global shortcut - Spotlight-style non-activating key panel on Option+Space (KeyboardShortcuts 3.0.1 exact-pinned, recorder row in Settings -> General) plus a menu bar item - shows the main-session agent identity via agent.identity.get with a 'main session' chip; Return sends via chat.send reusing the idempotency key on ambiguous retries; Cmd+Return also opens full chat; Shift+Return newline - targeted permission strip (notifications/accessibility/screen recording) with a scoped 1s status poll while visible; grant flow keeps the bar alive and avoids PermissionMonitor's AppleScript probe - extract shared ChatSendStatus acceptance mapping; TalkModeRuntime adopts it - rename anchored-panel 'quick chat' wording to 'compact chat panel'; docs * chore(mac): regenerate docs map and native i18n inventory for Quick Chat * ci: retrigger checks after stalled push event * chore(mac): refresh native locale artifacts for Quick Chat strings * chore(android): regenerate locale strings for refreshed shared translations
What Problem This Solves
Sending a quick message to the main-session agent on macOS currently requires opening the full chat window (menu bar → Open Chat) or the dashboard. There is no fast, keyboard-first way to fire off a thought and get back to what you were doing.
Why This Change Was Made
Adds a Quick Chat bar to the macOS app: a Spotlight-style floating composer summoned by a configurable global shortcut (default ⌥Space) or the menu bar item.
agent.identity.get, with a "main session" chip so the routing is explicit.chat.sendpath (UUID idempotency key, reused verbatim on ambiguous transport retries so an admitted run is never duplicated). Command-Return sends and opens the full chat window; Shift-Return inserts a newline; Escape, clicking outside, resigning key, or re-pressing the shortcut dismisses.PermissionMonitor(its 1s poll executes an AppleScript probe against Terminal) and instead does a cheap targeted status poll of just those three capabilities while the bar is visible, so the strip clears live as permissions are granted. Dismissal is suppressed mid-grant so the TCC dialogs don't kill the bar..nonactivatingPanel+canBecomeKey) so typing works without activating the app — appears on the cursor's screen, top-third, with material background, shadow, and fade+rise animation in / fade-drop out. Panel height animates as the permission strip or multi-line text appears.ChatSendStatusacceptance mapping extracted;TalkModeRuntimenow uses it instead of private duplicates.Follow-up (out of scope here): the same bar cross-platform via the Tauri app.
User Impact
New opt-out-free feature: press ⌥Space (or record another chord in Settings → General, or use the menu bar item) to get a floating composer that sends to the main session. Replies land in the regular chat window. No new TCC permission surface; no config/schema changes; no gateway changes.
Release-note context:
feat(mac): Quick Chat — global-shortcut floating composer for the main session with agent identity and permission guidance.Evidence
Live-tested in a clean macOS 26.5 VM (fresh TCC state, npm-installed gateway, hypervisor-injected keyboard input, host-side screen captures):
Full-desktop context shot: quickchat-desktop.png
Verified end to end in the VM:
quick chat present visible={{0, 78}, {1666, 585}} target={{523, 476.3}, {620, 58}}).chat.sendaccepted → user turn persisted in the main session store with the bar's idempotency key:{"role":"user","content":"Ship the release notes draft","idempotencyKey":"04885027-…:user"}in~/.openclaw/agents/main/sessions/<id>.jsonl.quick chat dismiss immediate=false); re-press toggles.Local gates (Swift 6.4 toolchain):
swift build --package-path apps/macos --product OpenClaw --configuration release— pass./scripts/lint-swift.sh macos— 0 violations./scripts/format-swift.sh macos— 0 files need formattinggit diff --check— cleanUnit tests added (placement math, send acceptance mapping, model send/idempotency/permission logic, controller lifecycle + grant-flow dismissal suppression, view smoke).
swift testfor the wholeapps/macostarget does not compile locally on this machine's Xcode-beta (Swift 6.4) due to pre-existing region-isolation errors in untouchedGatewayChannel*test files — the macos-swift CI lane on the stable toolchain is the authoritative test run for this PR.