fix(web): the citation comment box opens at the quote instead of sliding in from the corner#32141

merged1
main
t3/citation-popover-corner-slide
opened12h agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 6h ago

Problem

The citation comment box slides in from the top-left corner of the window every time it opens, instead of appearing at the quoted text.

Change

#30623 gave this popover keepMounted, so dictation's setup dialog can replace it without losing the draft. A kept-mounted Base UI positioner computes its position only after the first paint, so it paints once at (0, 0). The popover positioner's transition-transform then glides it to the quote. Popovers rendered with keepMounted now skip that transform transition. Other popovers keep the glide when they reposition. The fix lives in the shared PopoverPopup, so any later kept-mounted popover is covered too.

Scope and approval

A small, focused fix for a visible regression from #30623, reported by a maintainer (Julius). It touches only the popover positioner's transition class plus one test case.

Verification

  • A new case in AssistantCitationChip.browser.test.tsx asserts that no transform/top/left transition is running once the popover is positioned. It fails on main and passes here.
  • vp run check:changed passes.

The same frame for both: the popover's CSS transitions paused 50ms after it opens (real component, browser test harness). A paused frame shows the motion more reliably than a 150ms recording.

Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Checks

25 successful · 13 skipped
All checks passed
0fc0c45

Added 1 commit

  • fix(web): the citation comment box opens at the quote instead of sliding in from the corner0fc0c45
Synced from GitHub

Approvability

Verdict: Approved at 0fc0c45

Macroscope's review found this PR approvable — Kept-mounted comment popovers open at their anchor without sliding in from the window corner. The change is limited to presentation and preserves positioning, focus, and submission behavior.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Synced from GitHub

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The popover positioner applies its transform transition only when keepMounted is false. A browser test checks that the citation popup positioner has no active transitions on transform, top, or left.

Changes: Popover positioning

Layer / File(s)Summary
Positioner transition behavior
apps/web/src/components/ui/popover.tsx, apps/web/src/components/chat/AssistantCitationChip.browser.test.tsx
The positioner’s transform transition and instant-state override now apply only when keepMounted is false. The browser test checks that the visible citation popup positioner has no active transitions on transform, top, or left.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code#31810: The issue reports the citation comment box sliding from the top-left after Cite. This PR changes the kept-mounted popover transition for that behavior.

Suggested reviewers: t3dotgg

Merge Risk: External image Minimal · up to 0fc0c

Kept-mounted popovers no longer glide into position. No material merge-blocking risk is established.

Pre-merge checks: Passed 4

Check nameStatusExplanation
Title checkPassedThe title clearly describes the citation comment box fix.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Description checkPassedThe description is mostly complete. It includes test results and before-and-after images. The template also requests a recording for motion changes and evidence hosted on GitHub.
Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info

External image Run configuration

External image Commits

Reviewing files that changed from the base of the PR and between 6577c6b6185167c0e502fa01f9e8e8f2dee6ff25 and 0fc0c457067238ce4f59965cca4e265cd4b1dca6.

External image Files selected for processing: 2

  • apps/web/src/components/chat/AssistantCitationChip.browser.test.tsx
  • apps/web/src/components/ui/popover.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.