Repository navigation
fix(mail): include sent replies in application conversations - #4609
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 22c62b44-9701-4f85-b44f-13a75ddcecd5) |
Sent replies imported by Gmail sync have no employer classification or persisted application link, so they were missing from application mail even after the incoming message was linked. Include unattached replies through an unambiguous same-user Gmail conversation at read time, preserving explicit links and rejecting conflicting or orphaned application contexts.
Exclude outgoing messages from employer-recall selection and suggestion writes, including a recall racing with sent-alias repair. Follow-up drafts now take their recipient from the newest incoming message rather than the candidate's newer sent reply.
Follow-up to #4604 and its CodeRabbit findings. No attachment or employer-activity records are rewritten. Existing OpenSpec files are retained and document the safeguards.
Validation: red-to-green real PostgreSQL regressions for late linking, ambiguity, orphan context, explicit overrides, deletion and tenant/source boundaries; public follow-up recipient regression; all 312 Go unit packages, both vet modes, independent review and normal hooks. Code is identical to the tested repair after the documentation-only commit. All 312 integration-tagged packages passed (API separately on private PostgreSQL); all protected checks passed.
Note
Medium Risk
Read-time SQL inference on
ListJobEmailsaffects application mail and follow-up behavior; safeguards and tests cover ambiguity and employer-path isolation, but query complexity adds regression surface.Overview
Application mail views now surface unlinked Gmail sent replies when the same user, source, and thread have exactly one linked incoming job—read-time display only, with explicit manual/agent links winning and no persisted link or employer activity.
Recall (
ListEmailsForRecall,SuggestJobForEmail) and follow-up drafts (newestSender) are tightened to incoming-only so candidate mail and alias repair during recall cannot drive employer suggestions or draft recipients.Reviewed by Cursor Bugbot for commit 68f407c. Bugbot is set up for automated code reviews on this repo. Configure here.