Repository navigation
core: a list that keeps its reader in place does not undo a coast - #1112
Conversation
Signed-off-by: fizzy foxnne-desktop-codex-3 <slot+foxnne-desktop-codex-3@fizzy.invalid>
|
TRIAGE @0a516f03 auto: mechanical rules met (fizzy-* app author, names work#949, 65 non-test lines <= 400, no risky path). Labelled |
PM note: how this PR will be handledWhat it is for: core: a list that keeps its reader in place does not undo a coast Rules that apply: none special. Things to watch (checked by rule):
What happens next:
A living status comment below is kept current. Nothing here is a merge decision. |
Where this PR standsStage: Done: approved What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):
Reviews at the current commit (
Updated 2026-11-02 23:14 UTC by the PM. This comment is edited in place. |
|
Follow-ups: |
core: keep scrolling smooth as list rows change height
In plain words
Flicking through a list of different-sized rows should slow down smoothly. Measuring newly visible rows could make scrolling stall, jump backwards or speed up; this change keeps the reader's place and the scrolling motion together.
What changes
What you will notice
Touch scrolling stays smooth while rows are measured. Mouse-wheel glides keep their destination when row heights change.
How we know it works
On Windows, the new test fails without the motion adjustment because a coast step goes backwards. All seven requested gates pass, including the fixed integration run. No phone-lab check is required for this job.
How this serves fizzy
Phones and tablets: scrolling through variable-height content feels steady.
For agents: technical summary
Goal
Preserve in-flight scrolling when VirtualList re-anchors its viewport after row measurements.
What changed and why
ScrollArea.With.shift translates the vertical coast origin, glide target, last glide position and seat target before motion advances. A settle at an edge stays unchanged. VirtualList passes the difference between its anchored viewport and the viewport before placement. The existing init entry point retains its default behavior.
Follow-end growth is included in that shift. State.scrollTo also shifts in-flight motion by the jump; a press or the coast ending stops it, which is accepted for this change.
How it was verified
The new Messages-harness test uses a 300 by 400 window, 2,000 rows, a jump to row 1500, six 40-point touch moves at 16 ms intervals, release, then 60 coast frames. For consecutive frames showing the same top row, movement must be positive and no larger than the previous checked step plus 0.5 points. An additional assertion requires at least one such comparison.
The test was observed red with only the test added on checkout 87978b6, at the positive-step assertion. Formatting, lint, native build, unit tests, integration tests, web compilation and SDK-version checks all pass. Full gate outcomes are in report.md.
Not done / follow-ups
No console rebuild or phone check was performed. foxnne checks /app-m4 after the console is rebuilt on main containing this fix. HeightIndex, estimates, the console and Fling.zig are unchanged.
Part of fizzyedit/work#949