Skip to content

feat(ios): unify chat and voice experience - #107879

Merged
Solvely-Colin merged 34 commits into
mainfrom
ios-unified-chat-voice
Jul 18, 2026
Merged

Solvely-Colin merged 34 commits into
mainfrom
ios-unified-chat-voice

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #107804

What Problem This Solves

iOS split conversational input across Chat and a separate Talk destination. Moving between typing, dictation, attachments, voice notes, and realtime voice therefore felt like changing modes, while connection, tool, and voice activity could outlive the chat session that started it.

Why This Change Was Made

This makes Chat the single conversational destination. One composer mic handles tap-to-dictate and long-press/menu Record Voice Note, while realtime Talk remains a chat action backed by the existing runtime. The separate Talk tab and its obsolete UI state are removed; shipped talk / voice launch aliases now route to Chat.

The same ownership model now covers dictation, Photo Library, file import, camera encoding, voice-note staging, and Live Activity updates. Each asynchronous path captures its originating view model plus full session/routing snapshot, rejects stale completion, and balances audio/attachment ownership. One Live Activity arbiter prioritizes attention, tools, voice, connection, and hydrated fallback state for the avatar and Dynamic Island.

User Impact

  • Chat, dictation, voice notes, attachments, and realtime voice live in one surface with one microphone affordance.
  • Voice memo is preserved: tap the mic for dictation; long-press or use its menu to record a voice note; the composer switches to the recording row while capture is active.
  • The agent avatar carries compact connection status and ambient audio feedback; the Dynamic Island shows system-native voice/tool/attention activity without drawing a fake or split island around the camera cutout.
  • Switching sessions, agents, gateways, or routing while async work is suspended cannot publish text, media, errors, or activity into the new owner.

New locale source entries intentionally remain source-equal in generated artifacts; .github/workflows/native-app-locale-refresh.yml owns post-merge translation refresh.

AI assistance was used for implementation and review. The behavior and proof were manually directed and verified.

Evidence

Unified Chat composer

Unified Chat composer with attachment, dictation, realtime voice, and four-tab navigation

Attachment menu

Attachment menu opening from the unified composer

Voice-note menu and live recording waveform

Long-press voice-note menu transitioning into the live recording row

Real Gateway avatar status and audio activity

Real Gateway avatar status expanding from its compact dot

Real Gateway avatar showing ambient audio activity

Dynamic Island voice activity

Dynamic Island showing the real Gateway avatar and live voice waveform

Full-resolution stills: attachment menu, voice-note recording, avatar status, avatar audio, and Dynamic Island.

Visual proof is stored outside the OpenClaw source branch in Solvely-Colin/pr-proof-assets@00c2222. The sequence paired fresh to the real LAN Gateway and passed end to end on the iOS 26.2 simulator; no screenshot/demo fixture was used.

  • Physical iPhone + real Gateway QA: unified composer, voice note, realtime voice, avatar waveform/status, and Dynamic Island behavior exercised successfully.
  • iPhone 17 Pro simulator (OpenClaw Island QA, iOS 26.2): 289/289 focused iOS tests passed, including Live Activity arbitration, app-model invoke/audio ownership, Talk config, and root-tab presentation.
  • Shared Swift routing/ownership suite: 8/8 passed; unified mic contract tests: 2/2 passed.
  • Full VoiceNoteRecorderTests: 14/14 passed.
  • UI test target build-for-testing: succeeded.
  • Native locale inventory: 4,570 entries, no drift; Apple i18n check passed (iosKeys=1390, 21 locales).
  • git diff --check: passed.
  • Structured autoreview completed. Accepted picker-ownership findings were fixed across Photo Library, file import, and camera; remaining partitioned findings were rejected with full-path cancellation/session proof and successful macOS compilation.

Copilot AI review requested due to automatic review settings July 15, 2026 00:54
@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios gateway Gateway runtime labels Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Jul 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0e346b946

ℹ️ 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".

@Solvely-Colin
Solvely-Colin force-pushed the ios-unified-chat-voice branch from c5d9e53 to bddfca2 Compare July 15, 2026 04:08
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Jul 15, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jul 16, 2026
@clawsweeper

clawsweeper Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 1:54 PM ET / 17:54 UTC.

Summary
The PR removes the standalone iOS Talk destination, unifies dictation, voice notes, attachments, and realtime voice in Chat, and adds session-aware Live Activity and Dynamic Island presentation.

Reproducibility: not applicable. This PR proposes a new consolidated iOS interaction model rather than reporting a current-main defect to reproduce. The supplied media and stated physical-device Gateway exercise demonstrate the proposed behavior after the change.

Review metrics: 1 noteworthy metric.

  • Navigation contract: 1 root destination removed; 2 shipped launch aliases repointed. This is a visible upgrade change that requires an owner decision beyond green tests and media proof.

Stored data model
Persistent data-model change detected: migration/backfill/repair: apps/ios/Tests/GatewayConnectionControllerTests.swift, migration/backfill/repair: apps/ios/Tests/NodeAppModelInvokeTests.swift, persistent cache schema: apps/ios/Sources/Design/RootTabsPhoneChrome.swift, persistent cache schema: apps/ios/Tests/RootTabsSourceGuardTests.swift, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Obtain explicit owner approval for replacing the Talk destination and the alias migration.
  • [P2] Complete the normal required macOS validation for the exact reviewed head.

Risk before merge

  • [P1] Removing the standalone Talk destination and repointing existing talk/voice launch aliases changes established iOS navigation; maintainers need to explicitly accept that upgrade contract.
  • [P1] The PR centralizes dictation, attachment, realtime voice, and Live Activity ownership around session snapshots, so a regression could associate late async output or activity with the wrong chat session despite the focused coverage.

Maintainer options:

  1. Approve the navigation migration (recommended)
    Confirm that existing iOS users should reach the unified Chat surface from Chat, Talk, and Voice entry points, then merge after normal required checks complete.
  2. Preserve the Talk contract
    Pause this branch and request a smaller proposal that retains the Talk destination while isolating any independently approved safety fixes.

Next step before merge

  • [P2] The remaining blocker is a protected-label, owner-level decision about the permanent iOS navigation and upgrade contract; there is no narrow mechanical repair for automation to apply.

Maintainer decision needed

  • Question: Should iOS permanently replace the standalone Talk destination with Chat as the single text-and-voice conversation surface, including redirecting the existing talk and voice launch aliases to Chat?
  • Rationale: The implementation is substantial and proof-backed, but choosing the canonical mobile navigation and upgrade behavior is a maintainer product decision that cannot be inferred from test results alone.
  • Likely owner: steipete — The PR review workflow explicitly routed the unresolved navigation and upgrade decision to this participant.
  • Options:
    • Approve unified Chat (recommended): Accept Chat as the single iOS conversation surface and keep the alias routing as the supported upgrade path after owner sign-off.
    • Retain a separate Talk destination: Keep the existing Talk navigation contract and request a narrower branch that preserves it while carrying only independently desired session-safety work.

Security
Cleared: The reviewed diff is limited to native iOS/shared Swift UI, localization, and tests; no dependency, workflow, publishing, permission, secret, or artifact-execution change presents a concrete security or supply-chain concern.

Review details

Best possible solution:

Adopt one documented iOS conversational destination only if the responsible owner confirms that Chat replacing Talk is the intended upgrade path, then land the branch with its session-ownership safeguards and existing aliases preserved as Chat entry points.

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

Not applicable: this PR proposes a new consolidated iOS interaction model rather than reporting a current-main defect to reproduce. The supplied media and stated physical-device Gateway exercise demonstrate the proposed behavior after the change.

Is this the best way to solve the issue?

Unclear pending product approval: centralizing session ownership is a maintainable direction, but only an iOS owner can decide whether removing the separate Talk destination is the best supported upgrade path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e04ea7916c5b.

Label changes

Label justifications:

  • P2: This is a meaningful but non-emergency iOS product and compatibility decision with bounded platform impact.
  • merge-risk: 🚨 compatibility: The branch removes the standalone Talk destination and redirects established talk and voice entry points to Chat.
  • merge-risk: 🚨 session-state: The branch changes async ownership boundaries for dictation, attachments, realtime voice, and Live Activity updates across session changes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. The idea unifies text, voice, attachments, and contextual activity into one coherent mobile conversation surface while explicitly addressing session ownership across async UI paths.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR provides directly relevant recorded visual proof for the unified Chat composer, attachment and voice-note interactions, avatar status, and Dynamic Island behavior, alongside a stated physical-iPhone and real-Gateway run; redact any private Gateway details if further evidence is posted.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR provides directly relevant recorded visual proof for the unified Chat composer, attachment and voice-note interactions, avatar status, and Dynamic Island behavior, alongside a stated physical-iPhone and real-Gateway run; redact any private Gateway details if further evidence is posted.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR provides directly relevant recorded visual proof for the unified Chat composer, attachment and voice-note interactions, avatar status, and Dynamic Island behavior, alongside a stated physical-iPhone and real-Gateway run; redact any private Gateway details if further evidence is posted.
Evidence reviewed

What I checked:

  • Canonical work item: The PR explicitly closes the canonical iOS product issue, which requests Chat as the single conversation surface with session-aware dictation, attachment, tool, and voice activity. (b7a42b7aaf2f)
  • Navigation and alias migration: The branch removes the talk root-tab/destination and intentionally routes the shipped talk and voice launch aliases to Chat, so this is a deliberate upgrade-facing product decision rather than a narrow implementation fix. (apps/ios/Sources/RootTabs.swift, b7a42b7aaf2f)
  • Session-ownership coverage: The branch adds focused tests for root-tab presentation, gateway status behavior, Live Activity arbitration, Talk configuration, and app-model invoke/audio ownership; the earlier remote-PTT/dictation finding was addressed in a follow-up commit and regression test. (apps/ios/Tests/LiveActivityPresentationArbiterTests.swift, b7a42b7aaf2f)
  • Real behavior proof: The PR body provides before/after media for the unified composer, attachment and voice-note flows, avatar state, and Dynamic Island, plus a stated physical-iPhone and real-Gateway exercise. This directly supports the visible iOS behavior claimed by the branch. (b7a42b7aaf2f)
  • Repository policy: Root review policy requires owner review for larger product, behavior, compatibility, and ownership changes; it also treats session/auth/setup and fallback changes as compatibility-sensitive. (AGENTS.md:6, e04ea7916c5b)

Likely related people:

  • steipete: Explicitly mentioned on the PR after the earlier ClawSweeper review identified iOS navigation and upgrade behavior as the remaining decision. (role: product-review routing candidate; confidence: medium; files: apps/ios/Sources/RootTabs.swift, apps/ios/Sources/Design/ChatProTab.swift)
  • ngutman: Explicitly mentioned alongside the owner-review request for this iOS feature decision. (role: product-review routing candidate; confidence: low; files: apps/ios/Sources/Model/NodeAppModel.swift, apps/ios/Sources/Voice/TalkModeManager.swift)
  • mbelinky: Explicitly mentioned with the iOS review group; the changed surface includes shared chat UI and native application presentation. (role: adjacent review routing candidate; confidence: low; files: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposer.swift, apps/ios/Sources/LiveActivity/LiveActivityManager.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-16T14:57:08.011Z sha 1f65d57 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-17T21:35:46.462Z sha 8709c0a :: needs maintainer review before merge. :: none
  • reviewed 2026-07-17T21:49:59.642Z sha 96f0d79 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-17T22:31:51.671Z sha 96f0d79 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T14:37:26.610Z sha d88ca8f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T16:18:34.036Z sha b180061 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T16:32:04.286Z sha 925ca73 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T17:11:11.493Z sha b7a42b7 :: needs maintainer review before merge. :: none

@Solvely-Colin
Solvely-Colin merged commit 1ca6b6f into main Jul 18, 2026
95 checks passed
@Solvely-Colin
Solvely-Colin deleted the ios-unified-chat-voice branch July 18, 2026 18:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 19, 2026
* feat(ios): unify chat and voice experience

* refactor(ios): finish unified chat ownership

* fix(ios): unify chat and voice capture ownership

* fix(ios): serialize Talk permission hydration

* fix(ios): clear voice CI regressions

* fix(ios): clear remaining unified chat CI failures

* chore(i18n): sync native source inventory

* refactor(ios): defer provider-only realtime voice

* fix(ios): clean unified chat voice PR

* fix(ios): localize unified voice controls

* fix(ios): serialize composer audio controls

* fix(ios): isolate dictation preparation lifecycle

* fix(ios): key chat tab icons by appearance

* fix(ios): preserve talk upgrade handshakes

* fix(ios): refresh native i18n inventory

* fix(ios): reconcile shared locale artifacts

* fix(ios): satisfy chat view lint limit

* fix(ios): reconcile shared composer implementation

* test(apple): avoid XCTest actor deinit crash

* fix(ios): satisfy SwiftFormat scope spacing

* fix(ios): remove duplicate merged helper declarations
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* feat(ios): unify chat and voice experience

* refactor(ios): finish unified chat ownership

* fix(ios): unify chat and voice capture ownership

* fix(ios): serialize Talk permission hydration

* fix(ios): clear voice CI regressions

* fix(ios): clear remaining unified chat CI failures

* chore(i18n): sync native source inventory

* refactor(ios): defer provider-only realtime voice

* fix(ios): clean unified chat voice PR

* fix(ios): localize unified voice controls

* fix(ios): serialize composer audio controls

* fix(ios): isolate dictation preparation lifecycle

* fix(ios): key chat tab icons by appearance

* fix(ios): preserve talk upgrade handshakes

* fix(ios): refresh native i18n inventory

* fix(ios): reconcile shared locale artifacts

* fix(ios): satisfy chat view lint limit

* fix(ios): reconcile shared composer implementation

* test(apple): avoid XCTest actor deinit crash

* fix(ios): satisfy SwiftFormat scope spacing

* fix(ios): remove duplicate merged helper declarations
steipete added a commit that referenced this pull request Oct 13, 2026
* refactor(apple): simplify old shared and macOS bookkeeping

Replace redundant generations with existing cancellation or actual owner
identity, consolidate parallel fallback/policy paths, and remove test-only
forwarding layers. Preserve authority, FIFO, durable state, resource bounds,
public protocol/config shapes, signing, permissions, and visible rendering.

Reuse canonical session-key normalization for Voice Wake delivery selection:
opaque Signal group IDs remain case-sensitive and main aliases are not added.
Use canonical IP-literal policy for discovery labels and remote CLI validation.

Best-effort tradeoffs accepted

- Palette generation (#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain.
- Link preview generation (#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain.
- Sidebar preview generation (#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain.
- Source-preview producer revision (#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain.
- Mermaid generations (#135470/#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted.
- Camera JPEG UUID (#107879): duplicates exact task cancellation; #107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain.
- Discovery generation (#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate.
- FSEvents generation (#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain.
- Menu generations (#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain.
- Cron generation (#131466/#137502): #138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits.
- WebChat visibility acknowledgement/retry (#113634/#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain.
- WebChat cleanup UUID (#113634/#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle.
- Child-exit polling (#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain.
- Realtime iterator borrowing trap (#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain.
- Receipt projection admission (#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice.
- Recap attribution heuristics (#112188/#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain.
- PortGuardian per-write schema scans (#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain.
- Unread queue counter (#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged.

Review dispositions: the claimed Task compilation failure is disproved by the
selected SDK's Equatable conformance and native builds. Repeated receipt
identity admission is unnecessary at its internal projector because both real
callers retain it immediately before projection. Per-write schema revalidation
was declined under the explicit best-effort policy above.

Proof and scope

Net production reduction: 369 lines (148 added, 517 deleted), excluding tests.
Fresh seven-day census permits all substantive production edits; the only
recent caller change is the unavoidable one-line fallback-to-parse rename.

Shared Swift build passed. Final focused shared tests passed 396 cases in six
suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and
isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all
products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed
(89.60s and 120.87s wall), without signing changes or app launches.

Canonical Apple lint/format checks passed; the initial iOS format failure in
WatchCommands was ours and corrected, with no gate weakened. Lint-suppression
tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0;
the TypeScript graph is unchanged. Native localization stayed at 4476 entries.
The 45 original packaging/elevation timeout cases passed one focused retry
(94.79s wall), with no assertion/budget change and no claim of a diagnosed fix.

Known gaps: seven issues remained in the earlier ChatStreamReplayTests
narration=false package cases; causality/current-main attribution is unproven.
App-hosted macOS tests were not executed on the operator desktop. No hosted CI
or PR was started: the explicit BELOW-500 rule requires a branch-only handoff.

* refactor(ui): consolidate old UI owners and validation

Share route decoding, attachment retention, gallery preparation, transient
identity encoding, override copying, and extension classification. Remove
duplicate admission/schema mirrors and obsolete supported-browser fallbacks.
Both Lit and Solid paths remain; no rendering change is intended. No config,
protocol, persisted shape, dependency, or public SDK change.

Best-effort tradeoffs accepted

- Malformed internal native requests (#140988): all callers are typed and
  native hosts validate at the effect; their error replaces the renderer mirror.
- Worker replacement during an identity query (#140484): added for synthetic
  autoreview interleavings, not a human incident. Return false; normal worker
  announcements and foreground recovery observe the next active worker.
- Native readiness changing between synchronous checks (#140484/#109719):
  rely on queued events. A broken native event can require another worker event
  or reload; camera readiness retains its existing five-second error deadline.
- Overlapping application-root health reporters (#152638): startup mounts one
  root. Unsupported overlapping roots are last-publication-wins; the actual
  reported health/status feature and native trusted-document checks remain.
- Polling after stop (#139704): its sole owner retires eligibility first.
  Scheduling now uses that owner admission, not a separate read-only generation.
- Resetting an observer without retiring its connection (#116887): no production
  caller does this. Canonical connection epochs remain the sole retirement owner;
  unsupported direct live-scope reset no longer fences an old response separately.
- Upload policy changing during local reads (#158567): decoded/hash work can
  finish. Draft publication and every upload request retain live policy checks.
- Missing supported browser primitives (#105240/#151388/#100024/#102745):
  unsupported runtimes error instead of code-point initials, skipped input yield,
  wall-clock timing, or approximate microtask paint. The human progress-card fix
  in #151386 keeps its browser yield and durable FIFO handoff unchanged.
- URL APIs disappearing after URL creation (#100024/#149330): supported browsers
  keep paired APIs. An unsupported replaced global can throw during cleanup;
  undefined URLs, creation fallback, cancellation and release ordering remain.
- Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK
  still rejects malformed wire blocks before dispatch, proved over real in-memory
  App/AppBridge transport. UI content, authority, confirmation and custody policy
  remain. The introducing PR cites no human incident for the second mirror.

Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30.
Focused owner/sibling tests, targeted types/lint/format, lint-suppression and
independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle
proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery
renderer runs did not reach assertions, while its owning controller suite passed.

* refactor(ui): remove obsolete Fetch capability branch

The supported Control UI browser floor includes Fetch. Start attachment
metadata reads directly rather than leaving an unsupported runtime in a
permanent checking state.

Best-effort tradeoffs accepted

- Missing global Fetch: the guard originated in #64104, whose feature report
  cites no human missing-Fetch incident. An unsupported runtime that replaces
  Fetch now reaches the existing rejected-request/unavailable path. Metadata
  validation, auth/tickets, allow POST, cancellation, resource admission,
  expiry and bounded retry remain unchanged. No intended rendering change.

Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment
siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression
checks pass. This cut removes five production lines including formatter
reflow, bringing the lane to 223 net production lines removed.
Fresh independent P0-P2 review is scoped-clean with no actionable findings.

* fix(ui): use global frame scheduling APIs

Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…#170823)

* refactor(apple): simplify old shared and macOS bookkeeping

Replace redundant generations with existing cancellation or actual owner
identity, consolidate parallel fallback/policy paths, and remove test-only
forwarding layers. Preserve authority, FIFO, durable state, resource bounds,
public protocol/config shapes, signing, permissions, and visible rendering.

Reuse canonical session-key normalization for Voice Wake delivery selection:
opaque Signal group IDs remain case-sensitive and main aliases are not added.
Use canonical IP-literal policy for discovery labels and remote CLI validation.

Best-effort tradeoffs accepted

- Palette generation (openclaw#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain.
- Link preview generation (openclaw#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain.
- Sidebar preview generation (openclaw#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain.
- Source-preview producer revision (openclaw#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain.
- Mermaid generations (openclaw#135470/openclaw#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted.
- Camera JPEG UUID (openclaw#107879): duplicates exact task cancellation; openclaw#107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain.
- Discovery generation (openclaw#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate.
- FSEvents generation (openclaw#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain.
- Menu generations (openclaw#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain.
- Cron generation (openclaw#131466/openclaw#137502): openclaw#138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits.
- WebChat visibility acknowledgement/retry (openclaw#113634/openclaw#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain.
- WebChat cleanup UUID (openclaw#113634/openclaw#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle.
- Child-exit polling (openclaw#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain.
- Realtime iterator borrowing trap (openclaw#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain.
- Receipt projection admission (openclaw#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice.
- Recap attribution heuristics (openclaw#112188/openclaw#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain.
- PortGuardian per-write schema scans (openclaw#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain.
- Unread queue counter (openclaw#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged.

Review dispositions: the claimed Task compilation failure is disproved by the
selected SDK's Equatable conformance and native builds. Repeated receipt
identity admission is unnecessary at its internal projector because both real
callers retain it immediately before projection. Per-write schema revalidation
was declined under the explicit best-effort policy above.

Proof and scope

Net production reduction: 369 lines (148 added, 517 deleted), excluding tests.
Fresh seven-day census permits all substantive production edits; the only
recent caller change is the unavoidable one-line fallback-to-parse rename.

Shared Swift build passed. Final focused shared tests passed 396 cases in six
suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and
isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all
products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed
(89.60s and 120.87s wall), without signing changes or app launches.

Canonical Apple lint/format checks passed; the initial iOS format failure in
WatchCommands was ours and corrected, with no gate weakened. Lint-suppression
tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0;
the TypeScript graph is unchanged. Native localization stayed at 4476 entries.
The 45 original packaging/elevation timeout cases passed one focused retry
(94.79s wall), with no assertion/budget change and no claim of a diagnosed fix.

Known gaps: seven issues remained in the earlier ChatStreamReplayTests
narration=false package cases; causality/current-main attribution is unproven.
App-hosted macOS tests were not executed on the operator desktop. No hosted CI
or PR was started: the explicit BELOW-500 rule requires a branch-only handoff.

* refactor(ui): consolidate old UI owners and validation

Share route decoding, attachment retention, gallery preparation, transient
identity encoding, override copying, and extension classification. Remove
duplicate admission/schema mirrors and obsolete supported-browser fallbacks.
Both Lit and Solid paths remain; no rendering change is intended. No config,
protocol, persisted shape, dependency, or public SDK change.

Best-effort tradeoffs accepted

- Malformed internal native requests (openclaw#140988): all callers are typed and
  native hosts validate at the effect; their error replaces the renderer mirror.
- Worker replacement during an identity query (openclaw#140484): added for synthetic
  autoreview interleavings, not a human incident. Return false; normal worker
  announcements and foreground recovery observe the next active worker.
- Native readiness changing between synchronous checks (openclaw#140484/openclaw#109719):
  rely on queued events. A broken native event can require another worker event
  or reload; camera readiness retains its existing five-second error deadline.
- Overlapping application-root health reporters (openclaw#152638): startup mounts one
  root. Unsupported overlapping roots are last-publication-wins; the actual
  reported health/status feature and native trusted-document checks remain.
- Polling after stop (openclaw#139704): its sole owner retires eligibility first.
  Scheduling now uses that owner admission, not a separate read-only generation.
- Resetting an observer without retiring its connection (openclaw#116887): no production
  caller does this. Canonical connection epochs remain the sole retirement owner;
  unsupported direct live-scope reset no longer fences an old response separately.
- Upload policy changing during local reads (openclaw#158567): decoded/hash work can
  finish. Draft publication and every upload request retain live policy checks.
- Missing supported browser primitives (openclaw#105240/openclaw#151388/openclaw#100024/openclaw#102745):
  unsupported runtimes error instead of code-point initials, skipped input yield,
  wall-clock timing, or approximate microtask paint. The human progress-card fix
  in openclaw#151386 keeps its browser yield and durable FIFO handoff unchanged.
- URL APIs disappearing after URL creation (openclaw#100024/openclaw#149330): supported browsers
  keep paired APIs. An unsupported replaced global can throw during cleanup;
  undefined URLs, creation fallback, cancellation and release ordering remain.
- Malformed internal MCP calls bypassing AppBridge (openclaw#161747): may throw. The SDK
  still rejects malformed wire blocks before dispatch, proved over real in-memory
  App/AppBridge transport. UI content, authority, confirmation and custody policy
  remain. The introducing PR cites no human incident for the second mirror.

Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30.
Focused owner/sibling tests, targeted types/lint/format, lint-suppression and
independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle
proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery
renderer runs did not reach assertions, while its owning controller suite passed.

* refactor(ui): remove obsolete Fetch capability branch

The supported Control UI browser floor includes Fetch. Start attachment
metadata reads directly rather than leaving an unsupported runtime in a
permanent checking state.

Best-effort tradeoffs accepted

- Missing global Fetch: the guard originated in openclaw#64104, whose feature report
  cites no human missing-Fetch incident. An unsupported runtime that replaces
  Fetch now reaches the existing rejected-request/unavailable path. Metadata
  validation, auth/tickets, allow POST, cancellation, resource admission,
  expiry and bounded retry remain unchanged. No intended rendering change.

Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment
siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression
checks pass. This cut removes five production lines including formatter
reflow, bringing the lane to 223 net production lines removed.
Fresh independent P0-P2 review is scoped-clean with no actionable findings.

* fix(ui): use global frame scheduling APIs

Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: ios App: ios feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify iOS chat and voice activity

2 participants