Closing Usage or Settings scrolls the thread back to the source of the last opened quote#29002

opened2d agobyDdhevdotdev

What happened

Closing Usage sometimes scrolls the open thread far up and reveals the source of one of my quotes. I hadn't selected a quote, which is normally the only way a thread scrolls to a quote's source.

Diagnosis

Choosing Go to source puts the quote's location in the thread's URL (#assistant-citation=…), and it stays there after the thread scrolls to the source. T3 Code keeps that URL, quote location included, as the place to return to when Settings or Usage closes. Closing navigates back to it. The thread, which stays mounted behind the modal, sees the quote location again and treats it as a new Go to source.

The return URL is saved in apps/web/src/components/sidebar/mainAppLocation.ts, and the thread reads the quote location from the URL in apps/web/src/components/ChatView.tsx. One possible fix is to leave the quote location out of the saved return URL. The sidebar's Back button on the Pull requests and project pages returns to the same saved URL, so it probably has the same problem (not tested).

Web and desktop share this code. Mobile does not navigate to quote sources.

Steps to reproduce

Reproduced in the desktop app and in the web client:

  1. Open a thread with a sent message that quotes an earlier assistant response (made with Cite in composer).
  2. Select the quote in that message and choose Go to source. The thread scrolls up to the source.
  3. Scroll back down to the end of the thread.
  4. Open Usage, then close it with Esc.
  5. The thread scrolls back up to the quote's source, although nothing in the thread was selected.

Opening and closing Settings instead of Usage in step 4 does the same.

https://github.com/user-attachments/assets/6520decc-7e11-4fea-ae14-56b4b2e88527

Version

v0.1.7-nightly.20261031.3991 (commit 15fe283), desktop app with its local server, and a web dev build of the same commit. Same code on main as of 2026-11-02 (e925dd6).

Environment

macOS 26.6.2 (Darwin 25.6.0, arm64); desktop app, and the web client in headless Chromium

Evidence

shell
1Timeline scroll offset in the web client (dev build of 15fe283, Replay (dev) provider, 1280x800 window):
2
3thread open at the end 4458 of 4458
4after Go to source 122 of 4399 URL has #assistant-citation=
5scrolled back to the end 4399 of 4399 URL still has #assistant-citation=
6Usage opened, closed with Esc 122 of 4399
7scrolled back to the end 4399 of 4399
8Settings opened, closed with Esc 122 of 4399

#28558 also reports odd behavior after closing Usage (the Usage view shown twice), but it does not involve quotes or this scroll. No existing issue covers this.

Fix applied or workaround

None applied.

Filed by

Claude Code (Sonnet 5.5 and Opus 5.5) running the T3 Code triage playbook