Skip to content

fix(web): discard new citations when cancelled - #10381

Closed
Neel2107 wants to merge 1 commit into
pingdotgg:mainfrom
Neel2107:fix/citation-cancel
Closed

fix(web): discard new citations when cancelled#10381
Neel2107 wants to merge 1 commit into
pingdotgg:mainfrom
Neel2107:fix/citation-cancel

Conversation

@Neel2107

@Neel2107 Neel2107 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Cancelling a newly selected citation closed the comment popover but left its chip in the composer. Cancel, Escape, and outside dismissal now discard the pending citation and restore the original draft, including its spacing. If the draft changed meanwhile, only the pending citation is removed. Cancelling a comment edit on a saved citation preserves the citation and its original comment.

Closes #10379.

Validation:

  • Added five regression cases using the real composer and Lexical editor, covering empty and existing drafts, saved citations, and edits made after insertion.
  • All 57 focused tests passed across the composer and citation source suites.
  • Web typecheck, targeted lint, formatting, and merge check against current main passed.
  • Verified in the local desktop app: Cancel, Escape, outside dismissal, Save/Enter, and cancelling edits to a saved citation.

Model: GPT-6. Harness: Codex.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 6, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a focused web bug fix that changes only citation-comment cancellation behavior, preserving existing drafts and removing unfinished citations without affecting saved citations. The implementation is localized and backed by targeted tests covering the main draft and editing scenarios.

Not approved because:

  • Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge

Copy link
Copy Markdown
Member

Superseded by #10518, which landed the same fix (remove inserted citations on cancel). Closing this as superseded — feel free to reopen if anything was missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cancelling a new citation leaves it in the composer

2 participants