Skip to content

feat(panel): show scroll-to-bottom control when not at latest - #90

Open
zzalancelot wants to merge 5 commits into
omdsh-dev:mainfrom
zzalancelot:feat/scroll-to-bottom-button
Open

zzalancelot wants to merge 5 commits into
omdsh-dev:mainfrom
zzalancelot:feat/scroll-to-bottom-button

Conversation

@zzalancelot

@zzalancelot zzalancelot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Show a floating downward chevron at the bottom-right of the conversation pane when the user is not near the latest messages.
  • Clicking it smooth-scrolls back to the bottom.
  • Auto-follow new messages only while already near the bottom, so scrolling up to read is not interrupted.

Test plan

  • Reload the unpacked extension from ~/.dsh/browser-extension
  • Open a long conversation and scroll up: the bottom-right chevron appears
  • Click the chevron: the pane smooth-scrolls to the latest messages and the button hides
  • Stay at the bottom during streaming: the pane keeps following new content
  • Scroll up during streaming: the pane does not jump; the chevron remains available
  • pnpm --filter dsh-browser-extension exec vitest run tests/scroll-bottom.spec.ts tests/panel-styles.spec.ts

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the previously reported stale bottom-state issue resolved by observing the actual scrollport.

Summary

  • Tracks whether the conversation is near its bottom and only follows new content in that state.
  • Shows a localized floating control for returning to the latest messages.
  • Observes scrollport resizing so surrounding panel UI cannot leave the bottom state stale.
  • Adds focused tests for threshold calculations and the floating-control layout.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Conversation geometry or scroll changes] --> B[Measure distance from bottom]
  B --> C{Within 48 pixels?}
  C -->|Yes| D[Keep following new messages]
  C -->|No| E[Stop automatic scrolling]
  E --> F[Show scroll-to-latest control]
  F -->|User clicks| G[Smooth-scroll to bottom]
  G --> D
Loading

Reviews (2) · Last reviewed commit: "fix(panel): resync scroll-bottom state o..."

Add a floating chevron over the conversation pane so users who scrolled
up can jump back to the newest messages, and only auto-follow while
already near the bottom.
Comment thread extensions/dsh-browser/src/panel/App.tsx
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