Files
openclaw/apps/macos/Tests/OpenClawIPCTests/ChatSendStatusTests.swift
Peter Steinberger 1859cdb231 feat(mac): Quick Chat — global-shortcut floating composer for the main session (#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
2026-07-17 01:00:45 -07:00

20 lines
679 B
Swift

import Testing
@testable import OpenClaw
struct ChatSendStatusTests {
@Test(arguments: ["ok", " OK ", "\nok\t"])
func `ok is terminal success`(_ status: String) {
#expect(ChatSendStatus.acceptance(of: status) == .terminalSuccess)
}
@Test(arguments: ["error", " ERROR ", "timeout", " Timeout\n"])
func `errors are terminal failures`(_ status: String) {
#expect(ChatSendStatus.acceptance(of: status) == .terminalFailure)
}
@Test(arguments: ["started", "in_flight", "queued", "", " pending "])
func `other statuses remain in flight`(_ status: String) {
#expect(ChatSendStatus.acceptance(of: status) == .inFlight)
}
}