Skip to content

feat(ios): Talk lives in the composer card, with mute, camera, End and a language choice - #206685

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/ios-talk
Nov 28, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/ios-talk

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

This is one of a series of pull requests that brings the iOS app in line with the Control UI. On iPhone, turning on Talk (the live voice conversation) used to stack a separate "Listening" strip with its own mute button above the composer, while the composer underneath kept the text field, the + button, a tinted camera disc and a waveform button. The state was said in two places, the composer grew taller, and there was no way to choose the language Talk listens in.

User Impact

With this change alone, on iPhone:

  • Talk now lives inside the composer card. While Talk is on, the card shows one row: a microphone button (Mute), a live level mark, one status phrase (Connecting…, Listening, Muted, Waiting for a reply, Speaking, or a short problem such as No mic access or Offline), the camera switch, and a red End button with a close mark. The card keeps its resting height, and there is no separate strip above it.
  • The End button ends Talk in every state, including while the agent is thinking, instead of turning into an inert Stop.
  • Mute reads as a selected button and leaves Talk on. When microphone or speech access is missing, the row offers a Settings button.
  • If Talk starts while a draft is typed, the keyboard goes away and the draft is held under the Talk row.
  • Settings › Voice & Talk gains a Language row. It opens a list with Automatic first, then the phone's own languages, then every other language speech recognition supports, each named in its own language. Talk reads the choice each time it starts listening.
  • On a device without voice support, a voice switch that is already on can still be turned off.
  • Talk is no longer restored on launch: a fresh launch starts with Talk off and doesn't ask for the microphone. Explicit requests (Siri's live voice, the Watch, the Gateway) still start it.
  • The header avatar's VoiceOver label uses the same status phrase as the composer.
  • The camera switch is a plain glyph like the composer's other secondary controls.

Nothing else in the app changes look with this pull request. The connection strip and the app toast come from the pull requests just before this one; onboarding still uses its old setup steps until the next one.

Why This Change Was Made

Talk said its state twice and made the composer jump between two layouts. Folding Talk into the composer card gives it one place, one phrase and one exit. The Language choice lets someone talk in a language other than the phone's first one without changing the phone's settings.

Evidence

  • Builds for the iOS Simulator (app, unit tests and UI tests) with the SwiftFormat lint and strict SwiftLint build phases; both lint phases report no findings over the app's file list.
  • native-app-i18n verify reports no changes after regenerating the catalogs; git diff --check is clean.
  • iOS unit tests: NodeAppModelInvokeTests, TalkChatPhaseTests, TalkMicrophoneMuteTests, TalkSpeechLocaleTests: 289 passed, 0 failed.
  • OpenClawKit tests (swift test on macOS): ChatComposerPrimaryRoleTests and ChatTalkPresentationTests: 15 passed, 0 failed.
  • UI tests: testTalkStartsInTheComposerAndEndsBackToIt, testTalkSaysEachStateInOnePlace and testMuteReadsAsSelectedAndLeavesTalkOn pass. testTalkOverADraftKeepsTheDraft fails: after Talk starts over a typed draft, tapping End doesn't end Talk within three seconds. It fails the same way, at the same line, on the full approved build that this series adds up to, so it isn't caused by how this change was split. The cause is in the test, not the app: while Talk is on, the held draft keeps a hidden copy of the main button with the same identifier, and the test taps that copy. Once a draft is typed, the copy sits about 40 pt below the visible row, so the tap lands on nothing. Tapping the End button on the Talk row ends Talk over a draft in about 1.5 seconds and brings the draft back. A fix that changes only the test goes in before this lands; with it, all four Talk UI tests pass.
  • Screenshots below come from the app's built-in demo chat and Talk fixture in the iPhone 17 Pro Simulator, with no Gateway or account. "Before" is the app with the earlier pull requests in this series applied, not main. The Simulator can't run Talk on that build, so the Before Talk screens set Talk on with a temporary debug hook that is not part of this change; the muted Before screen shows that build's own "Microphone muted" line.

Talk on, listening (light and dark), Before | After:

Talk on and listening, light. Before: a separate "Listening" strip with its own mute icon above the composer, which keeps the + button, the text field, a tinted camera disc and a red waveform button. After: one row inside the composer card with a microphone button, a level mark, "Listening", a plain camera glyph and a red End button.

Talk on and listening, dark. Same comparison as the previous image.

Talk on, muted (light), Before | After:

Talk on and muted, light. Before: the strip reads "Listening" with "Microphone muted" in orange under it. After: the row shows a crossed-out microphone and "Muted".

Settings › Voice & Talk (light), Before | After:

Settings, Voice & Talk, light. Before: five switches, with the two that are on dimmed. After: the same switches, the two that are on at full strength, and a new Language row that reads Automatic.

Settings › Voice & Talk › Language (light), After only:

The Language page, light, After only: Automatic with a checkmark, then English (United States), then the other languages, each named in its own language.

Not checked: Talk with a real microphone, voice provider or Gateway (the Simulator has neither microphone access nor voice support); a real device; iPad and macOS layouts; Dynamic Type sizes other than the default; VoiceOver by ear, including whether it can reach the held draft's hidden controls while Talk is on (the UI test framework can see them, although the code marks them hidden).

🦞 Made with OpenClaw

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 27, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR moves iOS Talk controls into the composer, adds a recognition-language preference, and stops restoring Talk on launch.

Example: Start Talk on an iPhone with an empty draft.

  • Before: A separate Listening strip appears above the text composer.
  • After: The composer contains Mute, the voice status, camera switching, and End.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, approved direction with inspected visual evidence, but actionable presentation regressions and incomplete runtime and upgrade proof prevent a pass.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 4 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Talk duplicates its status above the composer, expands the input area, and lacks a local recognition-language choice.
Reason: A compact voice surface with an accessible exit has clear value, and maintainer authorship supplies the direction decision.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 6 items remain

Keep this maintainer-authored draft open: the composer direction is approved, but the new presentation hides existing recovery information and needs focused repairs.

Reviewed head: 31da59193e61f92900088cc62ef6a037397385ec

Before merge

  • [P2] Preserve repeat instructions when relay audio is dropped (P2) - When pending relay input exceeds its three-second budget, RealtimeTalkRelaySession drops microphone frames and emits a notice asking the user to repeat the last part. TalkModeManager deliberately maps this notice and its recovery notice to the listening phase. This new branch replaces both with “Listening,” and the old status strip is removed on iOS, so the user receives no indication that speech was lost. Preserve a typed recovery notice alongside the phase and render its instruction, retaining the contract established by fix(apple): a two-second Gateway stall ends realtime Talk #180572.
  • [P2] Classify recognition failures before mapping idle to connecting (P2) - handleRecognitionUpdate still records a non-silence recognition error with phase idle and no issue. If restartRecognitionAfterError then fails to reopen recognition, it stops capture and leaves that status in place. The new projection turns this terminal error into “Connecting…” indefinitely, hiding the failure previously displayed by the activity strip. Set an explicit failure state at these existing error owners and reserve connecting for an actual startup or recovery attempt.
  • [P2] Explain when the Language selection does not apply (P2) - The Language picker is offered for every Talk configuration, but its saved value is read only by native startRecognition. Successful OpenAI WebRTC and Gateway-relay starts return before that method and never receive the phone selection. A realtime Talk user can therefore choose Portuguese and get no change or explanation. Scope and label this control as a native-recognition preference, or propagate the selection through supported realtime configuration before presenting it as the language Talk listens in.
  • [P2] Leave generated string catalogs to the locale publisher (P2) - This PR commits generated Localizable.xcstrings entries here and in the macOS catalog. apps/ios/AGENTS.md explicitly requires native string changes to commit only apps/.i18n/native-source.json and leaves catalog regeneration to the locale refresh publisher. Restore both catalog files to their base contents and retain the source inventory changes.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.
  • Explain or restore the original intent of Talk recovery notices - f85897e: Keep relay Talk alive through short stalls while explicitly asking the user to repeat dropped audio.

Findings

  • [P2] [P2] Preserve repeat instructions when relay audio is dropped — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTalkComposerRow.swift:43-46
  • [P2] [P2] Classify recognition failures before mapping idle to connecting — apps/ios/Sources/Voice/TalkModeManager.swift:323-329
  • [P2] [P2] Explain when the Language selection does not apply — apps/ios/Sources/Settings/DeviceSettings/LocalDeviceSettingsScreen.swift:185-190

Provenance

  • Talk recovery notices changes intended behavior without addressing why it exists (f85897e: Keep relay Talk alive through short stalls while explicitly asking the user to repeat dropped audio.)
Agent review details

How this fits together

The iOS Talk manager owns microphone capture, realtime sessions, transcription, and playback; shared SwiftUI controls project its state and send user actions back to that owner.

flowchart LR
  A[iPhone user] --> B[Chat composer]
  B --> C[Node app model]
  C --> D[Talk manager]
  E[Language preference] --> D
  D --> F[Native speech or realtime transport]
  F --> G[Gateway and voice provider]
  D --> B
Loading

Technical review

Best possible solution:

Keep TalkModeManager authoritative, preserve recovery notices and failure states in its composer projection, and make the Language control accurately describe its supported runtime.

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

Source establishes the hidden recovery notices and unclassified failure path; no target code was run, and the reported draft-to-End failure remains undiagnosed.

Is this the best way to solve the issue?

Reusing the existing Talk owner and composer is appropriate, but reducing its presentation to phases loses meaningful runtime information.

Full review comments:

  • [P2] [P2] Preserve repeat instructions when relay audio is dropped — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTalkComposerRow.swift:43-46
    When pending relay input exceeds its three-second budget, RealtimeTalkRelaySession drops microphone frames and emits a notice asking the user to repeat the last part. TalkModeManager deliberately maps this notice and its recovery notice to the listening phase. This new branch replaces both with “Listening,” and the old status strip is removed on iOS, so the user receives no indication that speech was lost. Preserve a typed recovery notice alongside the phase and render its instruction, retaining the contract established by fix(apple): a two-second Gateway stall ends realtime Talk #180572.
    Confidence: 0.99
  • [P2] [P2] Classify recognition failures before mapping idle to connecting — apps/ios/Sources/Voice/TalkModeManager.swift:323-329
    handleRecognitionUpdate still records a non-silence recognition error with phase idle and no issue. If restartRecognitionAfterError then fails to reopen recognition, it stops capture and leaves that status in place. The new projection turns this terminal error into “Connecting…” indefinitely, hiding the failure previously displayed by the activity strip. Set an explicit failure state at these existing error owners and reserve connecting for an actual startup or recovery attempt.
    Confidence: 0.97
  • [P2] [P2] Explain when the Language selection does not apply — apps/ios/Sources/Settings/DeviceSettings/LocalDeviceSettingsScreen.swift:185-190
    The Language picker is offered for every Talk configuration, but its saved value is read only by native startRecognition. Successful OpenAI WebRTC and Gateway-relay starts return before that method and never receive the phone selection. A realtime Talk user can therefore choose Portuguese and get no change or explanation. Scope and label this control as a native-recognition preference, or propagate the selection through supported realtime configuration before presenting it as the language Talk listens in.
    Confidence: 0.95
  • [P2] [P2] Leave generated string catalogs to the locale publisher — apps/ios/Resources/Localizable.xcstrings:530
    This PR commits generated Localizable.xcstrings entries here and in the macOS catalog. apps/ios/AGENTS.md explicitly requires native string changes to commit only apps/.i18n/native-source.json and leaves catalog regeneration to the locale refresh publisher. Restore both catalog files to their base contents and retain the source inventory changes.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6ef75084bd2d.

Provenance checked

  • Talk controls in chat keeps the original intent (1ca6b6f: Unify typing and voice within Chat while retaining the existing runtime owners.)
  • Recognition-language selection changes intended behavior with a stated reason (02f3e9c: Honor the configured speech locale; this PR explicitly adds a higher-priority phone selection and preferred-language fallback.)
  • Saved Talk enabled state changes intended behavior with a stated reason (20d7882: Saved-state restoration accompanied the original cross-node Talk implementation; this PR explicitly replaces it with launch-off behavior to avoid automatic microphone startup.)
  • Native Talk prompt construction changes intended behavior with a stated reason (f86772f: The shared builder preserves spoken-style guidance and interruption context; this PR's source comment intentionally omits both to keep chat history limited to the spoken transcript.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm ios:test TalkChatPhaseTests
  • pnpm ios:test TalkSpeechLocaleTests
  • pnpm ios:test TalkMicrophoneMuteTests
  • swift test --package-path apps/shared/OpenClawKit --filter ChatTalkPresentationTests
  • scripts/lint-swift.sh ios

What I checked:

  • Pinned change and current PR state: Reviewed the introduced base-to-head diff; GitHub confirms the same head remains a mergeable draft targeting brzezowski/ios-toasts, with the Swift check still running. (31da59193e61)
  • Dropped-audio notices are suppressed: The relay deliberately drops over-budget microphone frames and emits repeat instructions; the existing iOS adapter preserves those notices in the listening phase, but the new presentation replaces them with Listening. (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTalkComposerRow.swift:43, 31da59193e61)
  • Recovery notice provenance: The merged fix(apple): a two-second Gateway stall ends realtime Talk #180572 explicitly traded dropped audio during a stall for keeping the call alive with a visible repeat instruction; its discussion records a real Gateway-stall reproduction. (apps/ios/Sources/Voice/TalkModeManager.swift:3814, f85897e7730b)
  • Unclassified recognition failure: Recognition errors still set an idle status without an issue; if recognition restart fails, the new idle-to-connecting projection remains visible despite capture having stopped. (apps/ios/Sources/Voice/TalkModeManager.swift:327, 31da59193e61)
  • Language preference boundary: The new talk.recognitionLanguage preference is consumed by native startRecognition; successful WebRTC and Gateway-relay starts return before that path and do not receive this selection. (apps/ios/Sources/Voice/TalkModeManager.swift:1502, 31da59193e61)
  • Visual evidence and declared limitations: Inspected all four prepared comparison images: listening in light and dark, muted, and Voice & Talk settings. They show the intended layout using a demo fixture. The body explicitly excludes real microphone/provider/Gateway testing and reports the draft-to-End UI test failing. The additional Language-page image could not be saved locally because curl returned write error 23; no conclusion relies on it. (31da59193e61)

Likely related people:

  • Peter Steinberger: Raw commit 02f3e9c adds apps/ios/Sources/Voice/TalkModeManager.swift:90 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 02f3e9cfa25f; files: apps/ios/Sources/Voice/TalkModeManager.swift)
  • Vincent Koc: Raw commit f64ecbb adds apps/ios/Sources/Voice/TalkSpeechLocale.swift:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f64ecbb76ee3; files: apps/ios/Sources/Voice/TalkSpeechLocale.swift)
  • kybrcore: Raw commit f85897e adds apps/ios/Sources/Voice/TalkModeManager.swift:3665 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f85897e7730b; files: apps/ios/Sources/Voice/TalkModeManager.swift)

PR surface

Source +657, Tests +309. Total +966 across 23 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 16 740 83 +657
Tests 7 333 24 +309
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 23 1073 107 +966

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Persisted preference changes 1 new preference; 1 retired preference Adds talk.recognitionLanguage and deletes talk.enabled on launch; fresh-install and stable-upgrade behavior need validation.

Labels

Label changes:

No label changes.

Label justifications:

  • merge-risk: 🚨 compatibility: The maintainer-authored direction intentionally changes saved Talk restoration and recognition-locale precedence; upgrade compatibility remains unproven.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 27, 2026, 8:16 AM ET / 13:16 UTC.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 27, 2026 23:18
Base automatically changed from brzezowski/ios-toasts to main November 28, 2026 06:01
@vyctorbrzezowski
vyctorbrzezowski merged commit 034ec24 into main Nov 28, 2026
14 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/ios-talk branch November 28, 2026 06:01
@openclaw-barnacle openclaw-barnacle Bot removed the app: macos App: macos label Nov 28, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant