Repository navigation
feat: set your Messages Name & Photo - #377
Conversation
|
🦞👀 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 real behavior proof before merge. What this changesAdds CLI and RPC commands to replace the account’s Messages Name & Photo and optionally change its sharing setting. Example: Run imsg name-photo set --first-name Ada --last-name Lovelace --photo ~/Pictures/ada.jpg --sharing on.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 6 items remain Keep open: this PR adds a useful headless setup capability absent from main, but the photo-path protection and stored-result check need repair. Priority: P2 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe CLI and stdio RPC server stage local photos and send bridge requests to the injected Messages helper, which calls imagent and reads the resulting personal nickname. flowchart LR
A[CLI or stdio RPC] --> B[Existing photo stager]
B --> C[Messages attachment directory]
A --> D[Bridge request queue]
D --> E[Injected Messages helper]
C --> E
E --> F[imagent profile storage]
F --> G[Nickname controller echo]
Technical reviewBest possible solution: Keep the existing command, registry, stager, and helper owners, but enforce their photo-path boundary and correlate stored confirmation with the exact requested profile. Do we have a high-confidence way to reproduce the issue? Main’s source confirms the missing setter; this is a feature request rather than a broken existing contract, and no target code was run during review. Is this the best way to solve the issue? Extending the existing bridge owners is a focused approach, but lexical path validation and first-name-only acknowledgement do not satisfy the proposed safety and stored-result contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5af52a029b3d. Provenance checked
TestingProof path: shipped entry point. SecurityNeeds attention: The new avatar path bypasses the helper’s established symlink protection before a photo is handed to imagent. EvidenceSecurity concerns:
What I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 4:21 PM ET / 21:21 UTC. |
Add an opt-in CLI command and RPC method for replacing the account-wide profile. Check helper capability before staging, validate identity fields, and do not change sharing when the daemon cannot accept the setter request. Keep startup, discovery, and read paths free of identity mutations. Cover the setter with isolated private-class fixtures and Swift safety tests. No live run happened, no messages were sent, and this Mac's identity was not changed. Co-authored-by: Kilian Ciuffolo <kilian.ciuffolo@gmail.com>
6808630 to
2901831
Compare
Prepare imsg 0.21.0 for mentions, sticker placement, explicit Name & Photo setters, and the accumulated fixes. Preserve existing changelog entries and contributor credit, synchronize generated version metadata, and document that #365, #366, and #377 have fixture proof only with no live sends or identity changes. Validation: all 316 existing changelog bullets preserved; version metadata agrees; docs tests pass; independent review has no actionable P0–P2 findings; macOS/Linux CI and CodeQL passed at 8fa910a.
imsg name-photo setand the explicitcontacts.setNamePhotoRPC can replace the account-wide Messages Name & Photo through the daemon's personal-nickname setter. An optional photo is staged for the transfer agent; an optional sharing setting is applied only after the daemon setter call returns.The setter never runs implicitly from startup, status, discovery, or profile repair. Both entry points require the running helper's
selectors.namePhotoSetcapability before staging. The CLI rejects a chat target because this changes the account's identity. Invalid input, an unavailable daemon, and a refused daemon call leave the sharing setting untouched. Omitted last-name/photo fields remove those fields; omitted sharing preserves its setting.The result distinguishes the request from a matching first/last-name echo.
storeddoes not verify photo upload or recipient visibility, andhas_photodescribes the requested record. Setting the profile does not share it into a chat.Validation: focused Swift Name & Photo, read/status, and bridge-protocol fixtures; isolated Objective-C setter fixtures with substituted private classes and a temporary home directory; lint and documentation tests; independent P0–P2 review. Regression fixtures reproduced missing capability checks and partial sharing mutations before the fixes. Full macOS and Linux checks run in this PR's GitHub Actions.
No live run happened during this maintainer pass. This Mac's Name & Photo and sharing setting were not changed, and no messages were sent. All proof used synthetic fixtures and no-send validation.
Thanks @kilianc for the implementation.