Repository navigation
refactor(watch): share legacy status decoding - #139941
Conversation
Give the shared Watch status type one legacy decoder implementation. Preserve snapshot wire and persistence shapes, semantic status precedence, localized fallback text, and staggered iPhone/Watch compatibility.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 4:41 AM ET / 08:41 UTC. ClawSweeper reviewWhat this changesMoves legacy gateway, Talk, and chat status decoding into the shared Swift status type so the iPhone and Watch snapshot implementations use one implementation. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored refactor remains useful because current main retains the duplicated decoders. The introduced patch preserves their behavior, and no actionable correctness defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe iPhone sends application snapshots to its paired Watch, which also restores saved snapshots. Status decoding turns older text and flags into structured statuses for Watch-local presentation. flowchart TD
A[iPhone snapshot] --> C[Snapshot decoding]
B[Saved Watch snapshot] --> C
C --> D{Structured status available?}
D -->|Yes| F[Structured status]
D -->|No| E[Shared legacy decoder]
E --> F
F --> G[Watch localized presentation]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceOther -55. Total -55 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one shared legacy decoder implementation while retaining the existing snapshot formats, fallback precedence, and Watch-local localization. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes duplicated implementation rather than fixing a reported runtime defect; source inspection confirms the duplication on current main. Is this the best way to solve the issue? Yes: moving identical helpers onto the existing shared status type removes competing implementations without changing their inputs, outputs, or callers' precedence rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fe33b727b9fd. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Give the shared Watch status type one legacy decoder implementation. Preserve snapshot wire and persistence shapes, semantic status precedence, localized fallback text, and staggered iPhone/Watch compatibility.
What Problem This Solves
The Watch app and shared iPhone/Watch snapshot type each maintained the same legacy gateway, Talk, and chat status decoders. Compatibility changes had to keep both copies aligned.
Why This Change Was Made
The existing shared status type now owns the three unchanged decoders, and all twelve callers use that owner. This removes 52 production code lines (55 physical lines), with no test changes or new package/project wiring.
User Impact
No intended behavior change. Semantic status precedence, unknown verbatim text, Watch-local localization, persisted snapshot shape, and the legacy wire fields needed for staggered iPhone/Watch upgrades remain unchanged.
Evidence