Files
vscode/build
078671da10 Prompt timeline: reduce scroll jitter and polish the rail (selection, spacing, performance) (#325041)
* Prompt timeline: reduce ruler scroll jitter with adaptive height estimate

The ruler positioned marks from the chat list's height model, where every
un-rendered row is guessed at a flat 200px default. Real turns vary widely
(short prompts, tall/variable responses), so as rows render and get measured
the list's tops snap around and the marks visibly drift while scrolling a
fresh session.

Compute the marks' positions from our own per-item height model instead:
measured rows use their real currentRenderedHeight; un-measured rows use a
running average of measured heights of the same kind (prompt vs response,
seeded with priors). Marks land near their final position immediately and
barely move, converging exactly with the list once every row is measured.

Keep the viewport thumb in the list's own scrollTop/scrollHeight space so it
stays aligned with the native scrollbar (the marks' estimated space would
separate from it while heights settle and look like a second scrollbar). Add
a short 'glide' transition, enabled one frame after each structural rebuild,
so any residual drift animates smoothly without new marks sliding in from the
top; disabled under prefers-reduced-motion.

Also improve the keyboard focus indicator: grow the focused mark to a rounded
pill hugged by the focus ring instead of a bare outline on the 2px bar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Prompt timeline: polish rail selection, spacing, and scroll performance

Builds on the scroll-jitter work with a round of UX and performance fixes:

- Selection: replace the glowy box-shadow/backing-lane with a crisp border on
  the pill, and give keyboard focus a distinct dashed ring so a focused mark is
  never mistaken for a second selection. There is only ever one selected mark
  (it follows the viewport and click-reveal).
- No !important: the workbench outlines any focused [tabindex=0] button, which
  boxed the mark; suppress it by qualifying our rule through the marks container
  to win on specificity instead.
- Scrollbar: reserve a gutter (derived from the real scrollbar width) so the
  marks sit left of the native scrollbar and it stays grabbable.
- Spacing: reserve room on the transcript's right edge so message content keeps
  a guaranteed minimum gap from the marks, derived from the rail width via CSS
  variables rather than a magic number.
- De-cluster marks: prompts that sit close in content space could let the 24px
  hit targets overlap; space adjacent mark centres apart (new pure
  promptTimelineLayout.ts, unit-tested).
- Performance: the rail relayout read clientHeight on every scroll event (a
  forced reflow -> ~19% of active CPU while scrolling). Cache the height
  (refreshed only on resize) and coalesce scroll relayouts to one per animation
  frame; a re-profile shows relayout self-time drop from ~968ms to ~2ms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Prompt timeline: define the scrollbar gutter in CSS instead of JS

Review feedback: the gutter was set from JS (DEFAULT_SCROLLBAR_SIZE + gap), but the
list scrollbar is a stable 10px and the rail's other geometry already lives as CSS
variables on .prompt-timeline-host. Move it there as --prompt-timeline-scrollbar-gutter
and drop the runtime setProperty, the constant, and the base import. Not related to the
focus-outline specificity fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Prompt timeline: simplify spaceMarkCenters even-distribution branch

Review feedback: the even-distribution branch is only reached when
(n - 1) * minGap > hi - lo, and hi > lo is already guaranteed, so n >= 2 there.
The n === 1 guards were dead code; remove them. Single-mark inputs go through the
forward/backward clamp pass, which the unit tests still cover.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-08 23:09:12 +00:00
..
2026-07-03 17:48:37 +02:00
2026-06-22 16:36:02 +02:00
2026-05-27 14:57:41 +02:00
2026-05-19 23:06:02 -07:00