Skip to content

fix(chat): make smooth conversation follow opt-in - #385

Merged
AprilNEA merged 2 commits into
masterfrom
xuan/code-259
Aug 1, 2026
Merged

AprilNEA merged 2 commits into
masterfrom
xuan/code-259

Conversation

@AprilNEA

@AprilNEA AprilNEA commented Aug 1, 2026

Copy link
Copy Markdown
Member

What changed

  • make conversation switches and pinned content growth jump directly to the bottom by default
  • add a persisted Settings → Appearance → Smooth conversation follow toggle, defaulted off; Reduce motion always forces instant positioning
  • keep the scroll pinned synchronously while virtua settles its measured row sizes
  • extend the real Chromium smoke flow to cover bounded mounts, settled bottom position after two animation frames, and the new setting

Root cause

Conversation used initial="instant" but retained resize="smooth". use-stick-to-bottom applies initial only to the first observed height; switching sessions remounts the conversation, and virtua then reports additional positive resizes while replacing estimates with measured rows. Those later resizes entered the smooth spring path, so the newly selected conversation visibly scrolled even though its initial positioning was instant. The dependency's instant path also waits for requestAnimationFrame, which left a visible intermediate position during measurement settling.

Impact

Switching conversations now opens directly at the latest message without a scroll animation. Users who prefer animated following can opt in from Appearance settings.

Verification

  • pnpm check:ci
  • pnpm test — 302 files passed, 3 skipped; 2,435 tests passed, 5 skipped
  • pnpm -F @linkcode/webview e2e:browser
  • red/green animation check: leaving smooth follow enabled reproduced the regression at 76 px above bottom after two frames; the default-off implementation settles within the 2 px tolerance
  • virtualization mutation check: removing itemSize={300} mounts all 48 fixture turns and fails the < 10 bound; the restored implementation mounts 6 and passes

Tracks CODE-259.

@linear-code

linear-code Bot commented Aug 1, 2026

Copy link
Copy Markdown

CODE-259

@AprilNEA
AprilNEA marked this pull request as ready for review August 1, 2026 18:44
@AprilNEA AprilNEA changed the title test(webview): bound conversation switch mounts fix(chat): make smooth conversation follow opt-in Aug 1, 2026
@AprilNEA
AprilNEA merged commit 4cac29e into master Aug 1, 2026
10 checks passed
@AprilNEA
AprilNEA deleted the xuan/code-259 branch August 1, 2026 19:18
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