daemon: a scrolled-back view goes stale as output arrives and jumps on the next scroll #158
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#158
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Raised on the GitHub mirror by an embedder that holds the viewport itself (https://github.com/felis-terminal/felis/issues/4); felis's own window has the same defect.
Problem
While a window is scrolled back and the program keeps printing, the shown rows stay put but the offset they were composed at goes stale, and the next scroll jumps.
lines_from_bottomunchanged as rows enter scrollback:crates/felis-daemon/src/serve/streaming.rsonly re-clamps it (grid.clamp_viewport) and recomposes the browsed rows only when the offset changed (viewport_changed), so the window keeps showing the rows composed at the old position.crates/felis-client/src/app_methods.rs, theScrollSteparms andscroll_by_rows), and the daemon composes it against the newer bottom, so the view landspushedlines away from where the user was reading.Found by reading the code; not yet reproduced in a window.
Expected
A scrolled-back view stays on the same lines as output arrives: the offset grows by the lines pushed into scrollback since the last compose, clamped by
clamp_viewport(trimming and screen switches included), andViewportStatereports the grown offset so the client's next step starts from it. At the live bottom (0) nothing changes; the view keeps following output.A test pins it: output arrives during browse, then one more scroll moves exactly one step from the lines on screen.
If the anchoring lands in felis-grid (from
scrollback_total_pushed()) rather than in the daemon's subscriber state, an embedder holding its own viewport can call the same logic.