Skip to content

feat(ios): add watch action surface#93387

Merged
joshavant merged 4 commits into
openclaw:mainfrom
Solvely-Colin:s/watch-action-surface
Jun 16, 2026
Merged

feat(ios): add watch action surface#93387
joshavant merged 4 commits into
openclaw:mainfrom
Solvely-Colin:s/watch-action-surface

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Real behavior proof

Connected gateway watch chat delivery

Connected gateway watch chat sent

  • Behavior addressed: watchOS now behaves like a mini control/support surface for the iOS app: quick status on launch, swipeable Today/Inbox/Approvals flow, chat page with bottom message pill, app snapshot sync from iPhone, and watch-to-gateway chat command routing through the paired iPhone.
  • Real environment tested: iPhone 17 Pro Simulator paired with watchOS Simulator 9C50FB20-5231-42F7-ADCD-4CEBED3FB31A, both installed from the built OpenClaw iOS/watch schemes, paired to a live local OpenClaw gateway at ws://127.0.0.1:18789.
  • Exact steps or command run after this patch:
    • Generated a fresh local gateway setup code with pnpm openclaw qr --setup-code-only --url ws://127.0.0.1:18789, entered it in the iPhone simulator Gateway setup UI, and connected the iPhone simulator as a gateway node/operator device.
    • Verified the gateway device record for iPhone 17 Pro had roles node, operator, operator scopes, and fresh lastSeenReason=connect.
    • Opened watch chat, tapped the bottom Message OpenClaw pill, entered Hi through the native watch keyboard, tapped Done, and captured watch/iPhone/gateway logs.
  • Evidence after fix:
  • Observed result after fix: the watch chat page displayed the sent Hi, the phone forwarded it to the connected gateway chat session, the agent run completed, and the phone pushed the completed chat snapshot back to the watch.
  • What was not tested: physical Apple Watch hardware for this final connected-gateway chat proof; the run used paired iPhone/watch simulators against a real local OpenClaw gateway.
  • Proof limitations or environment constraints: provider behavior was exercised through the local gateway path available to the simulator; App Store/TestFlight device proof should still be run separately before release.

Connected watch snapshot after final reviewed build

Connected watch snapshot

Watch chat page with bottom message pill and sent status

Watch chat sent

Before/after visual comparison

Watch before after

Swipe and scroll proof

Watch swipe scroll

  • Additional steps and commands run after this patch:
    • Rebuilt OpenClawWatchApp after review-comment fixes through XcodeBuildMCP profile watch-proof; result: SUCCEEDED with no build errors.
    • Ran xcodebuild test -project apps/ios/OpenClaw.xcodeproj -scheme OpenClaw -destination 'platform=iOS Simulator,name=iPhone 17 Pro' -only-testing:OpenClawTests/NodeAppModelInvokeTests -derivedDataPath /tmp/openclaw-watch-proof/ios-test-derived -skipPackagePluginValidation -skipMacroValidation; result: 66 tests in 1 suite passed.
    • Ran .agents/skills/autoreview/scripts/autoreview --mode local after the final fixes; result: autoreview clean: no accepted/actionable findings reported.
    • Built OpenClawWatchApp with Xcode against the paired watch simulator.
    • Installed the rebuilt iPhone and watch apps with xcrun simctl install.
    • Launched iPhone app, launched watch app, dismissed the watch notification prompt, captured screenshots/logs.
  • Additional evidence after fix:
    • Latest review-comment fix commit: 7921672da6
    • Focused iOS test result: NodeAppModelInvokeTests passed with 66 tests.
    • Watch build result: OpenClawWatchApp simulator build succeeded on watchOS simulator 9C50FB20-5231-42F7-ADCD-4CEBED3FB31A.
    • Final autoreview result: clean, no accepted/actionable findings.
    • Runtime log: /tmp/openclaw-watch-proof/logs/openclaw-gateway-final-reviewed.log
    • Chat command log: /tmp/openclaw-watch-proof/logs/openclaw-gateway-chat-final-reviewed.log
    • Connected gateway app log: /tmp/openclaw-watch-proof/logs/phone-openclaw-gateway.log
    • Local proof bundle: /tmp/openclaw-watch-proof
  • Additional observed result after fix:
    • Watch home screen left fallback state and rendered the actual phone snapshot: Reconnect on iPhone, Offline, Ready for quick actions.
    • Watch logs showed paired/reachable state; phone gateway logs showed paired=true appInstalled=true reachable=true and watch.app.snapshotRequest handling.
    • Watch chat page opened from Talk to Claw; native watch input accepted text and showed Chat: sent.
  • Before evidence: included above as the before/after comparison.

Summary

  • Modernizes the watchOS app into a compact OpenClaw action surface instead of a single long-scroll notification view.
  • Adds phone-backed app snapshots for status, agent identity/avatar, approval count, and chat preview state.
  • Adds a dedicated chat page with a bottom message pill and native watch text input.
  • Adds watch-to-iPhone app commands for refresh, open chat, talk controls, and send chat.
  • Keeps approvals fast by sending approval snapshots before slower chat preview refreshes.

Linked context

Requested by maintainer in the watch action-surface iteration.

Tests and validation

  • git diff --check
  • xcodebuild build -project apps/ios/OpenClaw.xcodeproj -scheme OpenClawWatchApp -destination 'platform=watchOS Simulator,id=9C50FB20-5231-42F7-ADCD-4CEBED3FB31A' -derivedDataPath /tmp/openclaw-watch-proof/current-derived -skipPackagePluginValidation -skipMacroValidation
  • xcodebuild test -project apps/ios/OpenClaw.xcodeproj -scheme OpenClaw -destination 'platform=iOS Simulator,name=iPhone 17 Pro' -only-testing:OpenClawTests/NodeAppModelInvokeTests -skipPackagePluginValidation -skipMacroValidation
  • Connected gateway watch chat proof against local OpenClaw gateway ws://127.0.0.1:18789; proof excerpt asset linked above.
  • .agents/skills/autoreview/scripts/autoreview --mode local clean after addressing two accepted findings.

Risk checklist

  • Did user-visible behavior change? Yes.
  • Did config, environment, or migration behavior change? No.
  • Did security, auth, secrets, network, or tool execution behavior change? Watch commands now route through the existing iPhone app/gateway command surface; no new secrets.
  • Highest-risk area: watch/iPhone sync timing and chat command routing.
  • Mitigation: connected-gateway simulator proof, direct WatchConnectivity logs, targeted app-model tests, and autoreview clean closeout.

Current review state

Ready for maintainer review. Proof media is hosted as fork release assets so screenshots/GIFs/log excerpts are not committed into the OpenClaw branch.

@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios scripts Repository scripts size: XL proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 4:28 PM ET / 20:28 UTC.

Summary
Adds a watchOS action surface with app snapshots, swipeable status/chat/approval UI, watch-to-phone app commands, queued watch chat delivery, shared watch payload models, Swift protocol codegen support, assets, and focused iOS tests.

PR surface: Other +2811. Total +2811 across 18 files.

Reproducibility: not applicable. this is a feature PR, not a current-main bug report. The reviewed evidence is after-fix behavior proof for a paired watch/iPhone simulator flow against a live local gateway.

Review metrics: 2 noteworthy metrics.

  • Watch protocol surface: 3 payload types added, 5 app commands added. This creates a new iPhone/watch command contract that maintainers should notice before merge.
  • Persisted watch state: 1 existing store extended, 1 new queue key added. Upgrade and reconnect behavior now depends on optional old-state decoding plus gateway-scoped queued chat commands.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Risk before merge

  • [P1] Watch-originated chat delivery is a new message path from a paired watch through the phone; simulator proof covers a live local gateway, while physical Apple Watch/TestFlight proof remains a release follow-up if maintainers require it before ship.
  • [P1] Queued watch chat commands are now persisted and gateway-scoped in UserDefaults; tests cover restore/scoping/dedupe, but merging still changes reconnect and session-state behavior for existing watch users.

Maintainer options:

  1. Land after iOS/watch owner sign-off (recommended)
    Accept the remaining transport risk if maintainers are satisfied that the simulator, local-gateway logs, and visual proof cover the new watch action surface for merge.
  2. Require release-device proof first
    Ask for a physical Apple Watch or TestFlight smoke before merge if maintainers want the hardware release path proven before landing.
  3. Split chat send from the UI surface
    If watch-originated chat delivery feels too risky, land the lower-risk snapshot and approval surface separately and defer or gate send-chat.

Next step before merge

  • [P2] iOS/watch owners need to accept the new watch chat and session-state contract; there is no narrow automated repair to queue from this review.

Security
Cleared: No concrete security or supply-chain concern was found; the diff adds watch UI, WatchConnectivity command routing, generated Swift models, and assets without new dependencies, workflows, secrets, credential storage, or broader permissions.

Review details

Best possible solution:

Land after iOS/watch owner sign-off on the new command contract, keeping physical-device or TestFlight proof as a pre-release validation item if maintainers want that bar.

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

Not applicable: this is a feature PR, not a current-main bug report. The reviewed evidence is after-fix behavior proof for a paired watch/iPhone simulator flow against a live local gateway.

Is this the best way to solve the issue?

Yes: the implementation extends the existing NodeAppModel, WatchConnectivity, and shared OpenClawKit watch payload seams instead of creating a parallel transport. The remaining question is maintainer acceptance of the new watch command and queued-chat contract.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a substantial user-visible iOS/watch feature with focused blast radius and normal maintainer urgency.
  • merge-risk: 🚨 message-delivery: The PR adds watch-originated chat command routing through the paired phone, so merge risk includes dropped, delayed, or misleadingly reported messages.
  • merge-risk: 🚨 session-state: The PR persists app snapshot state and queued watch chat commands, so stale or mis-scoped state could affect reconnect behavior.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. A wrist-level OpenClaw status, approval, and chat surface is an unusually useful iOS workflow improvement with clear user-visible proof.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Sufficient: inspected proof includes logs showing watch send-chat through the phone to the gateway plus screenshots showing the visible watch chat and sent message state.
  • proof: sufficient: Contributor real behavior proof is sufficient. Sufficient: inspected proof includes logs showing watch send-chat through the phone to the gateway plus screenshots showing the visible watch chat and sent message state.
Evidence reviewed

PR surface:

Other +2811. Total +2811 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 18 3029 218 +2811
Total 18 3029 218 +2811

What I checked:

Likely related people:

  • mbelinky: Live file history shows this handle authored the Apple Watch companion MVP and actionable watch approvals/quick replies that this PR extends. (role: feature introducer; confidence: high; commits: 57083e4220e3, 738b011624c7; files: apps/ios/WatchExtension/Sources/WatchInboxView.swift, apps/shared/OpenClawKit/Sources/OpenClawKit/WatchCommands.swift)
  • ngutman: Live file history shows watch exec approval hardening across the shared watch command model and WatchConnectivity transport. (role: recent watch-flow contributor; confidence: medium; commits: 6f566585d84f; files: apps/shared/OpenClawKit/Sources/OpenClawKit/WatchCommands.swift, apps/ios/Sources/Services/WatchConnectivityTransport.swift)
  • Solvely-Colin: Beyond authoring this PR, live history shows prior merged iOS control-surface and foreground gateway reconnect work in NodeAppModel, which is central to this PR's watch-to-phone routing. (role: recent adjacent iOS contributor; confidence: medium; commits: bf89552e6783, e58310b000bd; files: apps/ios/Sources/Model/NodeAppModel.swift)
  • joshavant: Live history shows same-day iOS app model and configuration work adjacent to the changed NodeAppModel and project surfaces. (role: recent adjacent contributor; confidence: medium; commits: 377f6181a91b, c932bf377b54, 1ffda5d3ca22; files: apps/ios/Sources/Model/NodeAppModel.swift, apps/ios/project.yml, apps/ios/Sources/Services/WatchConnectivityTransport.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.

@Solvely-Colin Solvely-Colin marked this pull request as ready for review June 15, 2026 17:49
Copilot AI review requested due to automatic review settings June 15, 2026 17:49
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR expands the watch/iOS WatchConnectivity protocol to support “app snapshot” syncing and watch-driven app commands (refresh/open chat/send chat/start/stop talk), and updates the watch UI to a multi-page control surface that shows live status, approvals, and chat.

Changes:

  • Extend the Swift protocol generator to emit Swift string enums from oneOf/anyOf literal unions (not just enum).
  • Add watch payload types/models for app snapshots + commands, plus encode/decode and transport wiring on both iOS and watch.
  • Replace the watch inbox UI with a tabbed “control surface” including snapshot-driven status and a watch chat composer; add watch assets and iOS tests for new watch flows.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/protocol-gen-swift.ts Enhances Swift codegen to detect string-enum cases from more schema shapes.
apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift Adds newly generated protocol enums.
apps/shared/OpenClawKit/Sources/OpenClawKit/WatchCommands.swift Adds shared watch payload/command models for snapshot + commands.
apps/ios/project.yml Includes WatchExtension asset catalog in build sources.
apps/ios/WatchExtension/Sources/WatchInboxView.swift Implements new watch control-surface UI (status/inbox/approvals + chat).
apps/ios/WatchExtension/Sources/WatchInboxStore.swift Stores new snapshot state and composes app commands/replies.
apps/ios/WatchExtension/Sources/WatchConnectivityReceiver.swift Adds request/parse/send for snapshot + commands; consumes app context on activation.
apps/ios/WatchExtension/Sources/OpenClawWatchApp.swift Triggers snapshot refresh and sends app commands/chat from watch UI.
apps/ios/WatchExtension/Assets.xcassets/** Adds the watch icon asset used by the new UI.
apps/ios/Tests/NodeAppModelInvokeTests.swift Adds tests covering watch snapshot requests and app commands (talk/open chat/send chat + queueing).
apps/ios/Sources/Services/WatchMessagingService.swift Wires new callbacks and adds syncAppSnapshot.
apps/ios/Sources/Services/WatchMessagingPayloadCodec.swift Encodes app snapshots; parses snapshot requests and app commands.
apps/ios/Sources/Services/WatchConnectivityTransport.swift Routes new payload types and adds application-context sender helper.
apps/ios/Sources/Services/NodeServiceProtocols.swift Adds new watch event types + protocol surface.
apps/ios/Sources/Model/WatchReplyCoordinator.swift Adds WatchChatCoordinator for queuing/deduping watch chat commands.
apps/ios/Sources/Model/NodeAppModel.swift Implements snapshot creation, chat preview fetch, watch command handling, and queued chat flushing.

Comment thread scripts/protocol-gen-swift.ts
Comment thread apps/ios/WatchExtension/Sources/WatchInboxView.swift
Comment thread apps/ios/Sources/Model/WatchReplyCoordinator.swift
Comment thread apps/ios/Sources/Model/NodeAppModel.swift Outdated

@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: 2b1fda6620

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

Comment thread apps/ios/Sources/Model/NodeAppModel.swift Outdated
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 15, 2026
@clawsweeper clawsweeper Bot added 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. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed proof: supplied External PR includes structured after-fix real behavior proof. proof: sufficient ClawSweeper judged the real behavior proof convincing. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 15, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 15, 2026
@joshavant joshavant self-assigned this Jun 16, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 16, 2026
@joshavant joshavant merged commit c45c87a into openclaw:main Jun 16, 2026
146 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 17, 2026
* feat(ios): add watch action surface

* fix: harden watch action surface

* fix: clean watch codegen lint

* fix(ios): scope watch chat commands to gateway

---------

Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
crh-code pushed a commit to crh-code/openclaw that referenced this pull request Jun 18, 2026
* feat(ios): add watch action surface

* fix: harden watch action surface

* fix: clean watch codegen lint

* fix(ios): scope watch chat commands to gateway

---------

Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. 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: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts 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.

3 participants