fix(polls): render full selection snapshots [AI-assisted] - #198
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 2:27 AM ET / 06:27 UTC. ClawSweeper reviewWhat this changesUpdates plain Merge readinessThis PR remains necessary and is ready to land once its in-progress Linux and macOS checks finish: current main still formats only the compatibility projection Priority: P2 Review scores
Verification
How this fits togetherIMsgCore decodes native Apple Messages poll rows from the local Messages database into flowchart LR
A[Messages poll row] --> B[Poll decoder]
B --> C[Poll event with vote entries]
C --> D[History and watch output]
D --> E[Snapshot display decision]
E --> F[Human-readable CLI text]
C --> G[JSON poll object]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused formatter, regression tests, and documentation after required checks pass, keeping JSON fields unchanged and treating Do we have a high-confidence way to reproduce the issue? Yes. The PR includes redacted real native-Messages proof on macOS for a multi-select update and a subsequent deselection case, and current main source confirms it formats only the first decoded vote. Is this the best way to solve the issue? Yes. Rendering the already-exposed authoritative AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 02644cb5713b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (23 earlier review cycles; latest 8 shown)
|
|
Updated the PR body with redacted real-behavior proof from the current head. The live Messages UI produced a two-selection snapshot, then a one-selection snapshot after deselection. Head @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer repair is on the branch at The functional fix remains the contributor’s: plain output now renders the authoritative Proof on macOS arm64:
No message or poll mutation was performed during maintainer verification. |
Co-authored-by: clawSean <260045960+clawSean@users.noreply.github.com>
Summary
history/watchoutputpoll.votesas authoritative andpoll.voteas a compatibilityprojection
Why
Apple's native poll vote rows carry a participant's full selected-option set,
not a single delta.
pollDisplayTextcurrently renders onlypoll.vote, whichis documented as the first decoded entry. Selecting a second option therefore
prints only the first option; removing one of two options can falsely describe
the remaining option as a new vote.
The JSON schema remains compatible. This change only makes human-readable
output follow the already-exposed
poll.votessnapshot.Evidence
The regression failed on current
mainwith:for a snapshot containing both
LobsterandAlso lobster.After the change:
Verification on macOS 26:
swift test: 488 tests passedswift format lint --recursive Sources Tests TestsLinux: passedgit diff --check: passedswiftlintwas unavailable on the test host; CI remains authoritative forthat lane
AI-assisted with Codex. I reviewed the resulting behavior and tests.
Live native-poll proof (2026-07-28)
Verified on the submitted head
62676f5c9da471018b12b32e44fa91857f745025against a real native Messages poll on macOS 26.5.1. The participant identifier was redacted before posting.After selecting a second option in the Messages UI, the patched CLI rendered:
After deselecting Alpha, leaving Beta selected, it rendered:
This is the key negative case: the remaining Beta selection is described as the current snapshot, not as a new Beta vote.
Current-head validation:
swift test: 488 tests in 3 suites passedswift format lint --recursive Sources Tests TestsLinux: passedgit diff --check origin/main...HEAD: passedThe earlier automated compile concern does not reproduce.
MessagePollVote.optionIDis a non-optionalString; onlyoptionTextis optional, sovote.optionText ?? vote.optionIDis a concreteStringand the full current-head test build succeeds.