Conversation
HEY applies a name tag in the compose form it prefills, not on the message it saves, so a draft or a send from hey compose went out without one while the same message written in HEY would not. A new message now ends with the name tag HEY serves for the sender it is filed under, appended after a break the way HEY's own form does; a sender without one leaves the message as written, and --no-name-tag leaves it off.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 Changes recommended
Account-scoped sender selection needs a focused regression test.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds HEY sender name tags to new CLI-composed messages, with an opt-out flag.
Changes:
- Appends the resolved sender’s name tag to sends and drafts.
- Adds
--no-name-tag. - Updates tests, CLI documentation, skill guidance, and command surface.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
File summaries
| File | Description |
|---|---|
internal/cmd/compose.go |
Resolves and appends sender name tags. |
internal/cmd/compose_test.go |
Tests default, disabled, and absent tags. |
docs/cli.md |
Documents name-tag behavior and opt-out. |
skills/hey/SKILL.md |
Adds an opt-out usage example. |
.surface |
Records the new flag. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbdb91c433
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| if !c.noNameTag { | ||
| var tagErr error | ||
| if message, tagErr = appendSenderNameTag(ctx, message); tagErr != nil { |
There was a problem hiding this comment.
Append the name tag after uploaded attachments
When a new message includes --attach, the tag is added here before attachFiles; appendUploadedAttachments then appends <br><action-text-attachment ...> to that content. Consequently the serialized message ends with the attachments rather than the sender’s tag, and an attachment-only message starts with the signature followed by the files. Append the tag after constructing the attachment-bearing content so attached messages preserve the promised signature-at-the-end behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed: a signature is the last thing in a message, and HEY's form puts a dropped file above the prefilled tag. 30d9a18 appends the tag after attachFiles, so both shapes end with the files and then the tag; TestComposeEndsAnAttachedMessageWithTheNameTag pins the order for a message with a body and for an attachment-only one.
A signature comes last, and HEY's form puts a dropped file above the prefilled tag, so an attached message ended with the files instead.
Fixes #395
Repro
hey compose --draft(and a plainhey composesend) posted the body exactly as written, so the draft landed in HEY without the sender's name tag. HEY does not add the tag server-side:MessagesController#newappends it to the body it prefills into the compose form, and#createsaves whatever the form submits. A message written in HEY carries the tag because the form did; one written here never had it. Same for a send, which is why this covers both paths rather than the draft alone.TestComposeEndsANewMessageWithTheSendersNameTagrunscompose --draftandcompose --to …against a fake HEY whose identity serves aname_tagon the default sender, and fails onmainwith the body unchanged.Fix
A new message now ends with the name tag HEY serves for the sender it is filed under (
identity.senders[].name_tag, sanitized HTML, the same field the bulk-reply prefill reads), appended after a<br>exactly as HEY's own form does. The sender is the one the SDK resolves for the send (DefaultSenderID, account-scoped or identity-wide), matched by id in the unscoped identity. A sender with no tag leaves the message as written, with no stray break.--no-name-tagleaves it off for callers who sign their own bodies;.surface,docs/cli.mdand the skill note it.Costs one extra
GET /identity.jsonper new message. Replies (hey reply,compose --thread-id) are unchanged — HEY prepends the tag above the quoted body there and serves that prefill fromGET /entries/{id}/replies/new.json, which is a separate change. The TUI's compose form is likewise a follow-up.Summary by cubic
New messages from
hey compose— sent or saved with--draft— now end with the HEY name tag of the sender they're filed under, fixing #395. HEY serves the tag in the compose form it prefills rather than on the saved message, so a body written in the CLI went out unsigned; it now carries the tag itself.Bug Fixes
senders[].name_tagafter a<br>, matched to the sender the message is filed under, which--accountselects, and after any attachments so the tag stays last as a signature.--no-name-tagopts out for callers who sign their own bodies; a sender with no tag leaves the message as written.GET /identity.jsonper new message. Replies and the TUI compose form are unchanged.Written for commit 30d9a18. Summary will update on new commits.