Repository navigation
feat(ios): add Listen action speaking assistant messages via gateway TTS - #100771
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 2:25 PM ET / 18:25 UTC. Summary PR surface: Docs +2, Other +869. Total +871 across 13 files. Reproducibility: yes. for the review finding from source inspection: Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the iOS Listen direction, but bind Do we have a high-confidence way to reproduce the issue? Yes for the review finding from source inspection: Is this the best way to solve the issue? No, not yet. The feature shape is otherwise plausible, but the client should use the existing route-lease contract and include route-switch coverage plus real playback proof before this is the best merge path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 962d1096d492. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Docs +2, Other +869. Total +871 across 13 files. View PR surface stats
Security concerns:
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
Review history (2 earlier review cycles)
|
4a60d15 to
fb7db88
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb7db88fc3
ℹ️ 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".
fb7db88 to
3cfcadd
Compare
8babb16 to
906f51b
Compare
c7a7fa7 to
ee1196b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee1196bc27
ℹ️ 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".
| try await gateway.request( | ||
| method: method, | ||
| paramsJSON: paramsJSON, | ||
| timeoutSeconds: timeoutSeconds) |
There was a problem hiding this comment.
Bind Listen TTS requests to the current gateway route
When a user starts Listen during a gateway reconnect or switch, this request is made without an ifCurrentRoute lease, so the actor can dispatch the full assistant text to whichever operator channel is current by the time gateway.request runs. The chat transport already passes ifCurrentRoute for message/history RPCs (apps/ios/Sources/Chat/IOSGatewayChatTransport.swift:170-190), and GatewayNodeSessionRoute exists to prevent retargeting to replacement gateways (apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift:45-47). Capture the current route and pass it here, falling back locally if the route is nil or stale.
Useful? React with 👍 / 👎.
|
Land-ready after rebase and hardening.
Known proof gap: no physical iOS device is attached to this host, so audible configured-Gateway and on-device fallback playback remains manual release evidence. The code paths, state transitions, metadata boundary, simulator build/test, and hosted platform lanes are proven here. One unrelated lifecycle-admission shard failed once under the first full run; its exact test passed twice focused on Testbox and the failed CI shard passed on rerun without code changes. |
|
Merged via squash.
|
…TTS (openclaw#100771) * test(gateway): shift advertised-method window for tts.speak * feat(ios): add Listen action speaking assistant messages via gateway TTS * docs(ios): document the chat Listen action * style(ios): keep outbox label doc comment attached and give speech chip its own * fix(ios): harden chat Listen playback * docs(changelog): note iOS chat Listen * fix(ios): unwrap speech MIME before classification * docs(changelog): keep Listen note app-scoped
What Problem This Solves
iOS users cannot hear an assistant reply from the chat transcript (tracking issue: #100708). Gateway dependency #100770 is landed and provides the
tts.speakmethod consumed here.Why This Change Was Made
OpenClawChatSpeechControllerin OpenClawChatUI): one message speaks at a time; gateway clip first via an injected synthesis closure,AVSpeechSynthesizeron-device fallback whenever the gateway can't render (unconfigured provider, offline, older gateway, undecodable or unsupported headerless clip). Output format, MIME, and extension metadata reachAVAudioPlayer; raw PCM/mulaw/alaw falls back because the RPC does not expose the sample-rate/channel metadata needed to decode it safely. A generation token and player/utterance identity guards keep stale callbacks from clearing newer state.ChatMessageVisibleTexthelper used by both the transcript exporter and Listen (tool calls/results and non-text blocks excluded)..playback+.spokenAudiowith.duckOthersonly while speaking (explicit user-initiated playback), and deactivates with.notifyOthersOnDeactivation. Playback stops on session switch, scene background, and view disappearance.ChatMessageSpeechClientcallstts.speakthrough the generatedTtsSpeakParams/TtsSpeakResultprotocol types;ChatProTabinjects the controller (hosts that don't inject one — e.g. macOS — see no UI change).User Impact
New "Listen" context-menu action on assistant messages in the iOS chat transcript with inline playing state; speech uses the operator's configured TTS voice and falls back to the on-device voice when the gateway can't render audio.
Evidence
swift test --package-path apps/shared/OpenClawKit --filter 'ChatSpeechControllerTests|ChatMessageVisibleTextTests'— 10/10 passed on macOS with Swift 6.2 (controller state machine, metadata/raw-format classification, fallback/supersede/stop paths, visible-text extraction).ChatMessageSpeechClientTests1/1 passed, includingtts.speakrequest decoding and playback-metadata preservation.tbx_01kww9ebc3wprwsap4snc52jx8— native i18n inventory green (entries=2758 changed=false); gateway method-order regression green in both configs (16/16).swiftc -frontend -parsegreen.macos-swiftandios-buildare merge gates. No physical iOS device is attached to this host, so audible gateway/fallback playback remains a release-evidence gap rather than a claimed automated proof.