#23636: iOS: normalize watch quick actions and fix test signing
app: ios
agents
maintainer
size: M
## Summary
- normalize `watch.notify` payloads in iOS before delivery (trim fields, cap actions, derive priority/risk, add default quick actions for prompt flows)
- extend mirrored iPhone watch-prompt notifications to support up to 4 quick actions and parse indexed action taps
- fix iOS build/test blockers encountered during verification (`ntohl` usage, missing test-target signing config, missing `OpenClawKit` import in gateway security test)
## Testing
- `cd apps/ios && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination 'id=00008130-000630CE0146001C' -only-testing:OpenClawTests/NodeAppModelInvokeTests test`
- suite runs, but currently fails in existing test assertions unrelated to this PR scope (`handleInvokeCanvasCommandsUpdateScreen`, `watchReplyQueuesWhenGatewayOffline`)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR normalizes `watch.notify` payloads before delivery and extends iPhone watch-prompt notifications to support up to 4 quick actions. The changes include:
- Replaced deprecated `ntohl` usage with Swift's `UInt32(bigEndian:)` initializer for network byte order conversion
- Added comprehensive normalization for watch notification parameters (trimming fields, capping actions at 4, deriving priority/risk bidirectionally)
- Implemented default quick actions for prompt flows (approval-specific and general defaults)
- Extended notification action handling from 2 to 4 actions with indexed action identifier parsing
- Fixed test target signing configuration by adding code signing settings to `OpenClawTests`
- Added missing `OpenClawKit` import in gateway security tests
The implementation maintains backward compatibility by preserving legacy primary/secondary action keys while adding indexed keys for actions 0-3.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The changes are well-structured with comprehensive test coverage for the new normalization logic and action handling. The implementation correctly handles edge cases (empty strings, whitespace, nil values), maintains backward compatibility with legacy action keys, and properly caps actions at the platform limit of 4. The `ntohl` replacement is the correct Swift idiom, and the test signing configuration fix resolves a legitimate build issue.
- No files require special attention
<sub>Last reviewed commit: 8fd4518</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#22773: fix(ios): support Xcode 16+ team detection and fix ntohl build error
by brianleach · 2026-02-21
73.6%
#22271: feat(watchos): implement liquid glass UI and voice-first orb
by Rocuts · 2026-02-20
72.9%
#15909: Guard notifications on macOS; fix focus issue and build fixes
by jasonkneen · 2026-02-14
72.2%
#11974: [FEATURE] feat: integrate systemd WatchdogSec for gateway hang dete...
by mcaxtr · 2026-02-08
71.4%
#19828: feat: reply notifications for macOS and web UI
by fal3 · 2026-02-18
70.8%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
70.7%
#11208: fix(config): prevent __OPENCLAW_REDACTED__ corruption on config writes
by janckerchen · 2026-02-07
69.8%
#8260: fix(macOS): gateway readiness detection + reversible Configure later
by xksteven · 2026-02-03
69.7%
#17878: Refactor: share allowlist normalization
by iyoda · 2026-02-16
69.5%
#20475: fix(macos): resolve 120%+ CPU regression and gateway stability
by teknomage8 · 2026-02-19
69.3%