Skip to content

fix(chat): thread links open their thread, one look - #565

Merged
vaakx-dev merged 1 commit into
mainfrom
sand/unify-subagent-thread-cards
Nov 25, 2026
Merged

vaakx-dev merged 1 commit into
mainfrom
sand/unify-subagent-thread-cards

Conversation

@vaakx-dev

Copy link
Copy Markdown
Owner

Thread links in chat open their thread every time, and every thread link is drawn as the same row card.

What

  • A reply's markdown nodes now stay alive while they are on screen. Before, each re-render while a reply streamed disposed the click handlers of links already shown.
  • A thread: link is always the thread's row card. In a sentence or a bullet, the words stay in place and the card follows the text. A link that starts a line becomes the card, with any note after it shown below.
  • The chat plugin's second thread: renderer is removed, along with link scheme order and the block/inline place, which only existed for the two looks.
  • Sidebar rows keep content-visibility on a wrapper, so a card in a list lines up with its bullet.
Desktop Phone
Thread links as row cards on desktop Thread links as row cards on phone

Why

  • Clicking a subagent's card only worked when the reply had already finished arriving before it was shown.
  • The same link was drawn two different ways, depending on where it sat in the text.

Verification

  • New browser test plugins/ui/chat/chat/test/web/thread-link.ts (added to test:phone) streams a reply in chunks, stops the turn, then clicks or taps the card. Desktop fails on main with a dead click and passes with this change; phone passes on both.
  • tsc, vrui-check, scripts/deps.ts and scripts/comments.ts pass. Unit tests in plugins/ui/{shell,chat,threads,panel} and plugins/bots pass, and so do the window, drawers, parts and app web tests.

Links that streamed into a reply lost their click once more text
arrived. Each render of the reply owned its nodes' listeners, and the
next render disposed them while morph kept the old nodes on screen.
Every markdown build now lives as long as one of its nodes is shown.

A thread link is now always its thread's row card. In a sentence or a
bullet the words stay where they are and the card follows the text; a
link that starts a line is the card itself, with any note after it.
The chat plugin's second thread link renderer is gone, and sidebar
rows keep their offscreen speedup on a wrapper so a card in a list
lines up with its bullet.
@github-actions

Copy link
Copy Markdown

Performance: ✅ every row is within its limit

Main 8e94add against this PR 9d1200b, both measured in the same job, medians of 5 runs. Times, memory and CPU fail when the PR is more than 15% worse, bytes when they grow more than 5%; changes under 20 ms or 2 KB never fail. Logs

main PR change
Phone (4× slower CPU, 150 ms, 9 Mbit/s link)
open a chat: shows 304 ms 289 ms -5.2% ✅
open a chat: usable 314 ms 320 ms +1.7% ✅
first visit with an empty cache: usable 1.95 s 1.97 s +0.7% ✅
open a long chat: usable 295 ms 316 ms +7.4% ✅
send: your message shows 58 ms 57 ms -3.3% ✅
send: first reply text shows 308 ms 308 ms -0.0% ✅
main thread blocked over these steps 659 ms 677 ms +2.7% ✅
data on first visit 928.4 KB 927.9 KB -0.0% ✅
data per chat opened 49.5 KB 49.5 KB -0.0% ✅
data while idle for 20 s 220 B 220 B 0% ✅
app code a phone downloads 1.6 MB 1.6 MB +0.0% ✅
Main pages (same phone and link)
Settings: time to open 72 ms 75 ms +2.9% ✅
Settings: data to open 0 B 0 B 0% ✅
Settings: data per minute left open 600 B 600 B 0% ✅
Add-ons: time to open 90 ms 91 ms +0.9% ✅
Add-ons: data to open 100 B 100 B 0% ✅
Add-ons: data per minute left open 600 B 600 B 0% ✅
Usage: time to open 63 ms 61 ms -3.8% ✅
Usage: data to open 15.2 KB 15.2 KB 0% ✅
Usage: data per minute left open 600 B 600 B 0% ✅
Search: time to open 70 ms 66 ms -4.7% ✅
Search: data to open 0 B 0 B 0% ✅
Search: data per minute left open 600 B 600 B 0% ✅
Performance: time to open 439 ms 438 ms -0.1% ✅
Performance: data to open 843 B 871 B +3.3% ✅
Performance: data per minute left open 2.0 KB 2.0 KB 0% ✅
PC side
start-up until ready 3.18 s 3.18 s -0.1% ✅
memory while idle 236.9 MB 235.9 MB -0.5% ✅
CPU used over 60 s idle 280 ms 300 ms +7.1% ✅
memory after 100 scripted chat turns 273.2 MB 273.0 MB -0.1% ✅
CPU for one reply 37 ms 38 ms +2.7% ✅
search time on 100k messages 81 ms 81 ms +0.1% ✅
database size per 10k messages 19.8 MB 19.8 MB +0.0% ✅
worktree list with sizes on 40 worktrees 634 ms 638 ms +0.7% ✅
slowest other reply during a worktree list 42 ms 40 ms -3.6% ✅

@vaakx-dev
vaakx-dev merged commit 6be56f2 into main Nov 25, 2026
14 checks passed
@vaakx-dev
vaakx-dev deleted the sand/unify-subagent-thread-cards branch November 25, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant