The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 03:15 UTC
fix(web): the citation comment box opens at the quote instead of sliding in from the corner (#32141)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 6, 2026 at 12:27 UTC
8bf1b64cae37abbff80a5cf98d2ae0f41dba5264
2 files changed
+23
-1
apps/web/src/components/chat/AssistantCitationChip.browser.test.tsx
+20
@@ -129,6 +129,26 @@ describe("citation comment source disappearance", () => {
129
});
130
131
describe("citation comment popup position", () => {
132
+ it("opens at its anchor instead of sliding in from the window corner", async () => {
133
+ using source = setup();
134
+ await using _screen = await mount(
135
+ source.sourceAnchor,
136
+ vi.fn(() => true),
137
+ );
138
+ const positioner = () =>
139
+ document.querySelector<HTMLElement>('[data-slot="popover-positioner"]');
140
+ await vi.waitFor(() => expect(positioner()?.style.opacity).not.toBe("0"));
141
+
142
+ const moves = positioner()!
143
+ .getAnimations()
144
+ .filter(
145
+ (animation) =>
146
+ animation instanceof CSSTransition &&
147
+ ["transform", "top", "left"].includes(animation.transitionProperty),
148
+ );
149
+ expect(moves).toEqual([]);
150
+ });
151
+
152
it("stays on screen when the cited text ends in a code block's hidden overflow", async () => {
153
using _source = setup();
154
const message = document.createElement("div");
apps/web/src/components/ui/popover.tsx
+3
-1
@@ -78,7 +78,9 @@ function PopoverPopup({
78
collisionAvoidance={collisionAvoidance}
79
collisionPadding={variant === "panel" ? 0 : undefined}
80
className={cn(
81
- "h-(--positioner-height) max-h-(--available-height) w-(--positioner-width) max-w-(--available-width) transition-transform data-instant:transition-none",
81
+ "h-(--positioner-height) max-h-(--available-height) w-(--positioner-width) max-w-(--available-width)",
82
+ // Kept-mounted positioners first paint at the window origin, so a transform transition slides them in from there.
83
+ !keepMounted && "transition-transform data-instant:transition-none",
84
variant === "panel"
85
? "z-(--z-sheet) w-[min(calc(var(--thread-details-panel-width)+--spacing(4)),calc(var(--anchor-width)---spacing(2)))] transition-[top] duration-150 ease-out data-instant:transition-[top] motion-reduce:transition-none motion-reduce:data-instant:transition-none"
86
: "z-[130]",