[Expert Finder] Multi-channel outreach completion - #980
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47a24231ec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| emailSubject={displaySubject} | ||
| emailBody={editBody} | ||
| emailBody={isDraftLike ? editBody : (email.emailBody ?? '')} | ||
| sources={email.sources} | ||
| onChannelOpened={openMarkSentConfirm} |
There was a problem hiding this comment.
Persist draft edits before marking sent
When a user edits a draft and clicks a Send button, this new callback opens the mark-as-sent modal after sending displaySubject/editBody, but confirming the modal only PATCHes status and channels in handleMarkSentSubmit. In that unsaved-edit path, the outreach is sent with the edited content but the refetch converts the page to read-only using the old stored subject/body, so the recorded sent outreach no longer matches what was actually sent; save or include pending edits before completing the send flow.
Useful? React with 👍 / 👎.
| status: raw.status ?? 'draft', | ||
| notes: raw.notes ?? '', | ||
| channel: parseOutreachChannel(raw.channel), | ||
| channels: parseOutreachChannels(raw.channels), |
There was a problem hiding this comment.
Preserve legacy channel values while reading responses
For existing sent outreach that still comes back with the pre-change singular channel field, this now parses only raw.channels, so the transformed email has no channels: the list/detail via badge disappears and updating channels from a sent record seeds an empty selection, letting a user overwrite the original channel with only the newly selected one. Please fall back to the legacy raw.channel value (and any historical values you still need to display) while keeping it out of the selectable completion options.
Useful? React with 👍 / 👎.



What?