Skip to content

fix: streaming live block taller than the live window is no longer lost (#14) - #16

Merged
ThatRendle merged 9 commits into
mainfrom
change/fix-live-block-overflow
Dec 2, 2026
Merged

ThatRendle merged 9 commits into
mainfrom
change/fix-live-block-overflow

Conversation

@ThatRendle

Copy link
Copy Markdown
Contributor

Closes #14

Summary

  • Open live blocks are never committed by overflow. Overflow commits what's in front of an open ILiveBlock and stops there. If it's taller than the live window, the window shows its newest rows. Later AppendText and SetContent calls keep landing, and Commit sends the full final content to scrollback once, in order.
  • Only the consumer commits. Several blocks may stream at once: dmon-core-next streams parent and child runs concurrently. Auto-commit safety valves were tried and dropped because they cut off the parent's text. An uncommitted block holds back what's behind it until it commits, so consumers must Commit on every path, including errors and cancellation (now in the docs).
  • AppendText newlines (BREAKING, behavioural): \n and \r\n break lines, even when split across appends. A trailing \n adds no blank row, and other control characters are still sanitized.
  • Render cache: an open block re-wraps only its growing last line each frame, not its whole text.
  • Collapsible ordering: an oversized expansion behind an open block holds its hidden lines back until that block has gone to scrollback. A second Expand no longer reprints them (an older duplicate bug).
  • Housekeeping: removes the repo-local OpenSpec commands and skills, which the user-level ones supersede.
  • Change archived to openspec/changes/archive/2026-12-02-fix-live-block-overflow/, with inline-scrollback spec synced (+5 requirements, 2 modified). The devlog notes record each decision.

Verification

  • make gates → BUILD_EXIT:0, TEST_EXIT:0 (919 passed), FORMAT_EXIT:0, VALIDATE_EXIT:0, GATES_EXIT:0
  • Headless regression reproducing Streaming LiveBlock taller than the live window is evicted and its later updates are lost #14 (100×30, 10 lines, 400 words, then "\nline 51"): line 51 is visible while streaming; after Commit, scrollback holds every token exactly once, in order.
  • openspec validate inline-scrollback --strict still warns on the over-long "One-way collapsible" requirement, which this change didn't touch.

Downstream

dmon-core-next should check that every _live block is committed on its error and cancellation paths. An uncommitted block now holds back scrollback rather than losing text.

🤖 Generated with Claude Code

ThatRendle and others added 9 commits December 1, 2026 15:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 1.1 remove repo-local OpenSpec commands and skills, superseded by user-level skills

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ock (§2)

- 2.1 PrePaint stops overflow at the first open LiveBlock; live window shows newest rows
- 2.2 tests: objects in front still commit, objects behind stay behind, zero-height window
- 2.3 tests: append/SetContent after overflow land; commit emits every row once, in order
- 2.4 pressure valve: open block committed once rows behind it fill the window
- 2.5 InsertLiveBlock commits earlier open blocks (BeginLive and the public insert path)
- 2.6 XML docs on ILiveBlock, ScrollbackModel and LiveBlock

Refs #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 3.1 LiveBlock.Render splits on \n (and \r\n, even across appends); each line wraps on its own
- 3.2 tests: other control characters in appended text are still sanitized

Refs #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 5.1 drop the pressure valve and BeginLive auto-commit: dmon-core-next streams
  parent and child runs concurrently, and either valve dropped the parent's text
- 5.2 spec delta, proposal, design and XML docs: only the consumer commits a live block

Built ahead of §4, whose docs depend on it.

Refs #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g (§4)

- 4.1 headless regression for #14; test sink records every committed row
- 4.2 scrollback and API docs: newest rows while open, concurrent blocks, always Commit
- 4.3 CHANGELOG: Fixed #14, Changed (BREAKING behavioural) AppendText newlines

Refs #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 6.1 LiveBlock caches wrapped rows of finished lines; only the growing line re-wraps
- 6.2 trailing \n adds no blank row; every trailing \r trimmed
- 6.3 oversized collapsible reprint deferred while an open live block is ahead;
  a second Expand no longer reprints
- 6.4 stale test summary fixed; test sink growth documented

Refs #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k spec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ThatRendle
ThatRendle merged commit 1f47fbc into main Dec 2, 2026
2 of 3 checks passed
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.

Streaming LiveBlock taller than the live window is evicted and its later updates are lost

1 participant