lumbda/wasm
russell@unturf.com ac664325e1
repl: sticky autoscroll — track bottom unless user scrolled up to read
Streaming output now follows the bottom of the page when the user is
already at the bottom, and stops doing so the moment they scroll up.
Scrolling back down re-engages autoscroll. A 64px tolerance covers
sub-pixel scroll positions and the sticky prompt-bar's offset.

Mechanics:
  * Module-level scrollPinned flag, recomputed on every window scroll
    event (passive).
  * maybeAutoscroll() jumps to the bottom only when pinned. Called
    from attachStreaming's appendText / appendNewline so every
    chunk-text / chunk-eol arriving from the worker tracks.
  * renderAll still does an unconditional jump (it fires on
    user-initiated actions — send, tab switch, etc. — where the
    most-recent content is what they want) and re-pins scrollPinned
    afterward so the streaming follow-ups continue to track.

Smoke-tested headlessly: streaming 30+ lines while at bottom keeps
viewport at bottom; scrolling to top during streaming leaves scrollY=0
even as the doc grows to 2KB tall.
2026-06-15 08:01:38 -04:00
..
app playground streaming: typed messages, no \n bytes on the wire 2026-06-15 06:30:10 -04:00
asm asm streaming: recycle the 64 KB output buffer after each flush 2026-06-15 06:36:00 -04:00
c repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
dist-repl repl: sticky autoscroll — track bottom unless user scrolled up to read 2026-06-15 08:01:38 -04:00
python playground: stream tier output line-by-line during eval 2026-06-14 20:25:47 -04:00
repl repl: sticky autoscroll — track bottom unless user scrolled up to read 2026-06-15 08:01:38 -04:00
tests wasm asm: stream output line-by-line via new emit_chunk env import 2026-06-14 20:35:13 -04:00
Makefile repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00