Repository navigation
fix(inbox): scope reply threading to the receiving workspace - #8895
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
|
…er the scoped persist
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
Summary
In-Reply-Toagainst every workspace's inbox tasks, so a reply delivered to one inbox could inherit another workspace'schatId; the executor then ran with that chat and appended the turn to its transcript. Both the parent-task lookup and theemail_message_iddedupe are now scoped to the workspace that owns the receiving inbox (message ids are sender-controlled and visible to every recipient)persistCopilotChatTurn, which gains an optional workspace scope, replacing the hand-copied transaction (and picking up its existing soft-deleted-chat guard)Type of Change
Testing
thread-scope.integration.tsagainst real Postgres with real Svix signatures: cross-workspace reply gets no inherited chat, same-workspace reply continues the thread, a message id already received by another workspace's inbox is still accepted, and a task carrying another workspace's chat runs in a fresh chat of its own workspace with the foreign transcript untouched. The first, third, and fourth fail on the pre-fix code; the second is the positive controlexecutor.test.ts,route.test.ts,messages-store.test.tspass locally; biome clean on changed filesChecklist
test-auditauthoring gate)