Skip to content

iOS Watch: bridge mirrored notification actions into quick replies#22123

Merged
mbelinky merged 2 commits intomainfrom
pr/ios-watch-mirrored-actions
Feb 20, 2026
Merged

iOS Watch: bridge mirrored notification actions into quick replies#22123
mbelinky merged 2 commits intomainfrom
pr/ios-watch-mirrored-actions

Conversation

@mbelinky
Copy link
Copy Markdown
Contributor

@mbelinky mbelinky commented Feb 20, 2026

Summary

  • add iOS notification bridge plumbing for mirrored watch prompt actions
  • route approve/decline actions tapped from mirrored notifications into NodeAppModel quick-reply flow
  • queue pending notification actions until app model is available

Files

  • apps/ios/Sources/OpenClawApp.swift
  • apps/ios/Sources/Model/NodeAppModel.swift

Validation

  • targeted behavior validated via manual e2e flow during watch approval testing
  • note: full xcodebuild -project apps/ios/OpenClaw.xcodeproj -scheme OpenClaw -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO build currently fails on existing baseline issue in GatewayConnectionController.swift (ntohl symbol), not introduced by this PR

Greptile Summary

Implemented iOS notification bridge to route mirrored watch prompt actions into the quick-reply flow. When watch notifications fail immediate delivery, the system schedules equivalent iOS notifications with actionable buttons, queuing actions until NodeAppModel is available.

  • Added UNUserNotificationCenterDelegate protocol conformance to handle notification actions
  • Created WatchPromptNotificationBridge enum with notification scheduling and category management
  • Implemented pending action queue pattern that mirrors existing APNs token pattern
  • Extended NodeAppModel with handleMirroredWatchPromptAction to bridge actions into WatchQuickReplyEvent flow

Confidence Score: 4/5

  • Safe to merge with one logic fix required
  • Code follows established patterns and integrates cleanly with existing notification and quick-reply infrastructure. One critical force-unwrap bug needs addressing before merge. The queueing mechanism correctly mirrors the existing APNs token pattern. Extensive input validation with whitespace trimming throughout.
  • Check apps/ios/Sources/OpenClawApp.swift line 439 for the force unwrap fix

Last reviewed commit: 06c1ca1

@openclaw-barnacle openclaw-barnacle bot added app: ios App: ios size: M maintainer Maintainer-authored PR labels Feb 20, 2026
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile


let event = WatchQuickReplyEvent(
replyId: UUID().uuidString,
promptId: (normalizedPromptID?.isEmpty == false) ? normalizedPromptID! : "unknown",
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.

force unwrap on normalizedPromptID! will crash if normalizedPromptID is empty string (since empty check happens after optional check)

Suggested change
promptId: (normalizedPromptID?.isEmpty == false) ? normalizedPromptID! : "unknown",
promptId: normalizedPromptID.flatMap { $0.isEmpty ? nil : $0 } ?? "unknown",
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/Sources/OpenClawApp.swift
Line: 439

Comment:
force unwrap on `normalizedPromptID!` will crash if `normalizedPromptID` is empty string (since empty check happens after optional check)

```suggestion
            promptId: normalizedPromptID.flatMap { $0.isEmpty ? nil : $0 } ?? "unknown",
```

How can I resolve this? If you propose a fix, please make it concise.

@mbelinky mbelinky self-assigned this Feb 20, 2026
@mbelinky mbelinky force-pushed the pr/ios-watch-mirrored-actions branch from 06c1ca1 to 401fbe8 Compare February 20, 2026 19:04
@mbelinky mbelinky merged commit f52476f into main Feb 20, 2026
14 checks passed
@mbelinky mbelinky deleted the pr/ios-watch-mirrored-actions branch February 20, 2026 19:05
@mbelinky
Copy link
Copy Markdown
Contributor Author

Merged via squash.

Thanks @mbelinky!

MisterGuy420 pushed a commit to MisterGuy420/openclaw-dev that referenced this pull request Feb 20, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
rodrigogs pushed a commit to rodrigogs/openclaw that referenced this pull request Feb 20, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Hansen1018 added a commit to Hansen1018/openclaw that referenced this pull request Feb 21, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
…22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
dgarson pushed a commit to dgarson/clawdbot that referenced this pull request Feb 21, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
obviyus pushed a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
mreedr pushed a commit to mreedr/openclaw-custom that referenced this pull request Feb 24, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky

(cherry picked from commit f52476f)

# Conflicts:
#	apps/ios/Sources/OpenClawApp.swift
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky

(cherry picked from commit f52476f)

# Conflicts:
#	apps/ios/Sources/OpenClawApp.swift
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…penclaw#22123)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 401fbe8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant