Skip to content

feat(ui): stick-to-bottom autoscroll on the run page#98

Merged
albanm merged 1 commit into
masterfrom
feat-run-autoscroll
Jun 1, 2026
Merged

feat(ui): stick-to-bottom autoscroll on the run page#98
albanm merged 1 commit into
masterfrom
feat-run-autoscroll

Conversation

@BatLeDev
Copy link
Copy Markdown
Member

@BatLeDev BatLeDev commented Jun 1, 2026

Add stick-to-bottom autoscroll to the run page log view: while the user is at the
bottom of a running run, the view follows new log lines as they stream in; any
upward scroll (or wheel-up) stops following, and scrolling back to the bottom
resumes it.

What changed

  • New ui/src/composables/use-follow-bottom.tsuseFollowBottom(logCount, isActive)
    pins the document to the bottom on each new log while following and the run is
    still streaming. Uses VueUse useScroll (1px bottom tolerance, no manual
    threshold) plus a wheel listener to catch wheel-up when the page itself can't
    scroll.
  • runs/[runId].vue: replaces the one-way :model-value="[steps.length - 1]"
    expansion-panel binding with a v-model="openPanels" recomputed by a watch on
    the step count (latest panel only while following, otherwise the user's
    selection minus removed steps), so panels no longer slam shut on every streamed
    log and manual toggles persist.

Why: the run log view didn't follow the live tail, and the previous panel
binding recomputed on every log line, collapsing panels mid-read.

Regression risks:

  • Panel open/close semantics changed. Previously the last panel was force-opened
    on every render; now state is recomputed only when the step count changes.
    While following, non-latest panels collapse on each new step; when not
    following, user toggles persist. Confirm this is the intended UX.
  • The page carries data-iframe-height (auto-height d-frame embed). pinToBottom
    sets the inner window scroll position, which is a no-op when the parent
    frame scrolls — so tail-following may not visually work inside an auto-height
    embed (the wheel-up "stop following" still works). Confirm whether the run page
    is embedded in that mode and whether following is expected to work there.
  • following initializes to true even for completed runs; benign because
    pinning is gated by isActive() and the initial panel state (last open)
    matches prior behavior.

@BatLeDev BatLeDev force-pushed the feat-run-autoscroll branch from 469c6b4 to 6476b2c Compare June 1, 2026 12:46
@github-actions github-actions Bot added feature and removed feature labels Jun 1, 2026
Follow the live log tail while the user is at the bottom; stop on scroll-up
or wheel-up; resume at the bottom. Built on @vueuse/core useScroll (no manual
threshold), targeting document.scrollingElement so it works standalone and
inside data-fair's d-frame iframe. While following, only the latest step panel
stays open; otherwise the user's panel selection is left untouched.
@BatLeDev BatLeDev force-pushed the feat-run-autoscroll branch from 6476b2c to 91098c1 Compare June 1, 2026 13:20
@github-actions github-actions Bot added feature and removed feature labels Jun 1, 2026
@albanm albanm merged commit 6d9ad2c into master Jun 1, 2026
4 checks passed
@albanm albanm deleted the feat-run-autoscroll branch June 1, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants