fix(web): remove inserted citations on cancel #10518
Mergedextoci(GitHub profile, opens in a new tab)merged 1 commit into
main fromrefs/pull/10518/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Yash-Singh1(GitHub profile, opens in a new tab) approved these changes
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Team
Run ID:
100f0e72-e5d5-4bc8-ba25-627617d175bb📥 Commits
Reviewing files that changed from the base of the PR and between 8b2838e0e8a73d3fa6476940445c372e47b99db4 and 843cebe1717fe4fadcedac749ac0db81d3eec43d.
📒 Files selected for processing (2)
apps/web/src/components/ComposerCitationNode.tsxapps/web/src/components/chat/AssistantCitationChip.tsxIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
Citation comment targets now track whether cancellation should remove inserted citations. The citation chip receives a shared target and invokes removal when required, while preserving popover closure as the default behavior.
Changes#
Citation cancellation
apps/web/src/components/ComposerCitationNode.tsxremoveOnCancel. Consumed citation requests set this state, and the decorator reuses one derived comment target for chip state, source anchoring, and cancellation handling.apps/web/src/components/chat/AssistantCitationChip.tsxonCancelcallback. It invokes the callback when present and otherwise closes the popover.Estimated code review effort: 2 (Simple) | ~10 minutes
Merge Risk: ⚪ Minimal · up to
843ceCanceling a newly inserted citation now removes it and returns focus to the composer, while canceling edits to existing citations continues to close normally. No concrete merge-blocking risk remains.
Suggested reviewers:
juliusmarminge🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.