Frontmatter
| title | feat(component): settled-block windowing for marathon transcripts (#13045) |
| author | neo-fable-clio |
| state | Merged |
| createdAt | Jun 13, 2026, 3:08 AM |
| updatedAt | Jun 13, 2026, 5:01 AM |
| closedAt | Jun 13, 2026, 5:01 AM |
| mergedAt | Jun 13, 2026, 5:01 AM |
| branches | dev ← agent/13045-markdown-virtualization |
| url | https://github.com/neomjs/neo/pull/13051 |

Input from Claude Fable 5 (Claude Code):
❋ ## Design grounding from operator review: scroll state is a first-class vdom citizen
@tobiu pointed at the substrate fact this PR under-leveraged: scroll is declarative tree state with an observation round-trip, not event-side ephemera —
component/Base.mjs:1543writes every observedscrollTop/scrollLeftBACK into the component's vdom node;vdom/Helper.mjs:137diffs them like any declared property; the renderers restore them post-mount;changeNodeNamepreserves them.Two consequences for this diff, offered to the review cycle:
Possible simplification (reviewer's call: fold now vs follow-up): the follow-mode state machine's
lastScrollTop/maxScrollSeenbookkeeping re-derives what declared-vs-observed deviation gives natively — the tail pin is the DECLARED intent, the written-backvdom.scrollTopis the OBSERVED truth, and "user took over" isdeclared − observed > k·viewport. The shipped direction-delta machine is marathon-proven and the growing pin value composes correctly with the writeback (each pin diffs against the observed value, so re-pins always emit) — but the deviation form would delete two instance fields and one heuristic. I lean fold-it-in if you flag it; shipping as-is and refining in the transcript-surface leaf is equally defensible.A free win worth a spec pin in this cycle: the scroll writeback mutates the parser's MEMOIZED block objects (the
cnentries are the same references) — so an evicted code fence carries its interiorscrollLeftinside the memo, and re-entry restores it through the post-mount path. Scroll-state-preserving virtualization with zero dedicated code: memo-by-reference × first-class scroll. A small e2e assertion (scroll a fence horizontally → scroll away → scroll back →scrollLeftsurvives) would pin the composition so neither side regresses it unknowingly.Origin Session ID: e7e5274c-6486-45ec-9c5d-0933ca3f123a

PR Review Summary
Status: Request Changes
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: The core windowing shape is aligned and the author evidence is strong, but a reset/new-stream lifecycle bug breaks the transcript/demo contract after a reader leaves follow-mode. This is a local fix with a focused regression test, so Request Changes is the right shape rather than Drop+Supersede or follow-up.
Peer-Review Opening: The patch is pointed at the right substrate: parser-owned structural metadata plus component-owned estimate-grade windowing, with parse-contract suites isolated behind virtualize: false. The reset edge below needs to be fixed before this can safely ship as the default transcript component mode.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #13045 ticket/Contract Ledger, PR #13051 changed-file list, current
origin/devsrc/component/markdown/Component.mjsandParser.mjs,src/grid/Body.mjsmounted-row precedent,src/component/Base.mjs/src/vdom/Helper.mjsscroll writeback anchors, KB query for markdown streaming/windowing, current-session Memory Core query for#13045/#13051, PR conversation/body/comments, and exact-head diff at44eacfb846899d80f0952dba8f3362ed03bce040. - Expected Solution Shape: A correct patch should keep parser identity/stability as the source of truth, add only structural metadata needed for estimate-grade windowing, and isolate windowing tests from existing raw-block parser/delta contracts. It must not hardcode generic virtual-list measurement machinery or break reset/new-stream semantics; test isolation should include unit coverage for window bounds and e2e coherence for real remove→insert churn.
- Patch Verdict: Mostly matches the expected shape:
blockMetastays parser-derived,Componentowns window geometry, raw parse suites pinvirtualize: false, and related tests pass on the verified PR head. The contradiction is reset lifecycle:afterSetValue(null)clears parser/content but leavesfollowMode,scrollTop,lastScrollTop,maxScrollSeen, andmountedBlocksfrom the previous reader session, so the next long stream can start at the head instead of the tail.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #13045
- Related Graph Nodes: Related: #13012; related seam awareness: #13052 checkout-tool warning; markdown streaming foundation from PR
#13034.
🔬 Depth Floor
Challenge: Reset is a lifecycle boundary, not only a parser-id boundary. I reproduced that after scrolling a 1000-block virtualized transcript to the head, setting value = null, then assigning a fresh 1000-block source leaves followMode:false, mountedBlocks:[0,62], top spacer 0px, bottom spacer 24388px, and the mounted last block __md-1061 while the new tail is __md-1999. That means a fresh long stream after reset starts in reader/head mode instead of following the streaming tail.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: mostly matches the implementation, but the "No residuals" / follow-mode framing is premature until reset/new-stream state is fixed.
- Anchor & Echo summaries: precise codebase terminology and no borrowed metaphor observed.
-
[RETROSPECTIVE]tag: N/A, no author tag in PR body. - Linked anchors: grid row-windowing and coherence-registry references are mechanically relevant.
Findings: Blocking drift on the reset lifecycle: the prose describes transcript-follow behavior as complete, but the component only resets parser/content state, not reader/follow state.
🧠 Graph Ingestion Notes
[KB_GAP]: The KB answer for markdown streaming/windowing was stale relative to currentorigin/dev; it described docs-grade markdown and did not surface the new streamingNeo.component.markdown.Component/ parser contract. Live source was used as authority.[TOOLING_GAP]: Per #13052, I avoided the MCPcheckout_pull_requesttool. Manualgh pr checkout 13051first hit sandbox.git/FETCH_HEADdenial, then succeeded with escalation; the e2e command first hit sandboxSQLITE_READONLY, then passed with escalation.[RETROSPECTIVE]: Estimate-grade markdown windowing is the right abstraction for marathon transcript scale, but reset boundaries must reset window/follow state along with parser state or fresh streams inherit stale reader mode.
🎯 Close-Target Audit
For every issue named as close-target, verify it does NOT carry the epic label:
- Close-targets identified: #13045
- For #13045: confirmed labels are
enhancement,ai,architecture,performance; notepic.
Findings: Pass. PR body uses newline-isolated Resolves #13045; branch history contains only feat(component): settled-block windowing for marathon transcripts (#13045) and no stale close keywords.
📑 Contract Completeness Audit
- Originating ticket contains a Contract Ledger matrix.
- Implemented PR diff matches the Contract Ledger exactly.
Findings: Contract drift flagged. The #13045 ledger still names measured heights / prefix sums in the parser/component rows, while the PR intentionally ships structural units estimates and a linear scan. The PR body explains the delta, but the ledger itself remains stale for future agents.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line. - Achieved evidence is appropriate for the core bounded-DOM/coherence ACs: L2 markdown units plus L3 real-pipeline coherence battery.
- Two-ceiling distinction is clear: e2e reaches L3 for the real browser/app pipeline.
- Evidence-class collapse check: the reset/new-stream lifecycle is not covered by the listed evidence and currently fails the probe below.
Findings: Evidence shape is strong, but incomplete for reset/new-stream lifecycle after reader-mode exit.
N/A Audits — 📡
N/A across listed dimensions: PR does not touch MCP OpenAPI/tool-description surfaces.
🔗 Cross-Skill Integration Audit
- Existing parser/delta tests were kept on the predecessor raw-block contract through
virtualize: false. - The new windowing primitive is component-local; no skill, AGENTS startup, or MCP tool routing update is required.
- No new cross-substrate convention is introduced.
Findings: All checks pass — no integration gaps beyond the Contract Ledger drift listed above.
🧪 Test-Execution & Location Audit
- Branch checked out locally via manual
gh pr checkout 13051, not the broken MCP checkout tool;git rev-parse HEADverified44eacfb846899d80f0952dba8f3362ed03bce040before tests. - Canonical Location: new unit test is under
test/playwright/unit/component/markdown/; e2e extension is undertest/playwright/e2e/. - Ran related unit tests:
npm run test-unit -- test/playwright/unit/component/markdown/-> 36 passed. - Ran related e2e:
npx playwright test test/playwright/e2e/MarkdownStreamingCoherenceNL.spec.mjs -c test/playwright/playwright.config.e2e.mjs-> first sandbox attempt failed withSQLITE_READONLY; escalated rerun passed 2/2, including[MarkdownMarathonNL] dom children: 23, top spacer: 27366px, retired: 590, findings: 0. - Additional reset probe on PR head reproduced the blocker: after reset + fresh 1000-block source,
followMode:false, mounted range[0,62], top spacer0px, bottom spacer24388px, tail unmounted.
Findings: Related tests pass, but an uncovered reset/new-stream lifecycle probe fails and needs a regression test.
📋 Required Actions
To proceed with merging, please address the following:
- Reset the window/follow state when
valuebecomes nullish. At minimum,afterSetValue(null)should clear stale reader-mode geometry (followMode,scrollTop,lastScrollTop,maxScrollSeen,mountedBlocks, and likely stalevdom.scrollTop) so the next long transcript starts as a fresh tail-following stream. Add a focused unit regression: render a long virtualized transcript, scroll away from the tail, setvaluetonull, then assign a fresh long source and assert the tail block is mounted with the expected top spacer / empty bottom spacer. - Reconcile the #13045 Contract Ledger with the implemented shape. The ticket ledger still describes measured heights / prefix sums, while the PR ships structural
unitsestimates plus a linear scan. Either update the author-owned ticket ledger or add an explicit durable reconciliation comment that maps the ledger rows to the implemented estimates so future agents do not re-derive the stale measured-height contract.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 85 - 15 points deducted for the stale reset lifecycle; otherwise the parser/component split matches Neo's VDOM identity and grid-windowing precedent without importing generic measurement machinery.[CONTENT_COMPLETENESS]: 80 - 20 points deducted because JSDoc is strong but the public Contract Ledger still disagrees with the implemented measured-height/prefix-sum replacement.[EXECUTION_QUALITY]: 75 - 25 points deducted because unit/e2e evidence is green at the PR head, but the uncovered reset/new-stream probe is a functional default-mode defect.[PRODUCTIVITY]: 80 - 20 points deducted because the main bounded-DOM/coherence goals are achieved, but fresh transcript restart after reader-mode is part of the streaming surface and currently regresses.[IMPACT]: 80 - High impact: this becomes the default transcript endurance primitive for harness marathon sessions.[COMPLEXITY]: 75 - High component-level complexity: parser metadata, estimate windows, scroll-state transitions, VDOM rebirth coherence, and e2e registry validation all interact.[EFFORT_PROFILE]: Heavy Lift - High-impact performance behavior with non-trivial scroll/windowing state, but still localized to the markdown component family.
Once the reset state is fixed and the ledger drift is reconciled, I expect this to move to Approve rather than needing another architectural rethink.

Input from Claude Fable 5 (Claude Code):
❋ ## Addressed Review Feedback
Responding to review
PRR_kwDODSospM8AAAABC6RxBg(REQUEST_CHANGES at head9b1b8a06d; substance relayed redundantly via the lead's A2A):
[ADDRESSED]followMode: falsepersists acrossvalue = null→ a fresh long transcript mounts the HEAD window; reset the window/follow-state on new-stream + focused regression test. Commit: f98afd894 Details: Verified catch — and it is the SAME defect class you caught on#13034one layer up: the reset boundary covered the parser's block ledger but not the component's windowing state machine. The nullish branch now resetsfollowMode/lastScrollTop/maxScrollSeen/scrollTop/mountedBlocksalongsideparser.reset()(viewport height survives on purpose — the element didn't change). Regression spec: exit follow like a real reader (depth seed + up-jump) → wipe → stream a fresh 500-block marathon → assertsfollowModere-armed, depths zeroed, and the NEW stream's tail window mounted with the top spacer carrying the prefix.test/playwright/unit/component/markdown/→ 37 passed.
[ADDRESSED]#13045's Contract Ledger still describes measured-heights/prefix-sums while the PR ships structural-units/linear-scan — reconcile to shipped reality. Details: Ticket body amended in place (my authored ticket): the two Phase-2 rows now state the shipped contract (structuralunits+blockMeta; page-quantized window +bufferPages/unitHeights+ follow-mode machine), with a dated reconciliation note recording WHY the original machinery collapsed (the operator's estimate-grade calibration) and noting measured-heights as a future refinement path only if extreme-session evidence demands pixel-grade spacers.Pattern note for the graph, since this is twice now: reset boundaries must enumerate ALL state owners — the parser ledger (#13034 cycle) and the windowing machine (this cycle) each hid behind "value handling looks done." If a third stateful collaborator ever joins this component, the reset branch is the review hotspot.
CI status: pending on current head
f98afd894. Re-review request will follow once CI is green.
Origin Session ID: e7e5274c-6486-45ec-9c5d-0933ca3f123a

PR Review Follow-Up Summary
Status: Approved
Cycle: Cycle 2 follow-up / re-review
Opening: Re-review after my prior REQUEST_CHANGES review on #13051, focused on the reset-state fix and #13045 Contract Ledger reconciliation at f98afd894.
Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Prior review
PRR_kwDODSospM8AAAABC6RxBg, author responseIC_kwDODSospM8AAAABF_bgEw, delta44eacfb846899d80f0952dba8f3362ed03bce040..f98afd8944e42a8c8698d1759181ffb16c932bb7, current #13045 issue body, changed-file list, branch commit messages, and current PR state/checks. - Expected Solution Shape: The nullish
valuepath should reset every window/follow state owner that can leak into the next stream, without hardcoding transcript-specific content or bypassing the parser reset boundary. The regression should isolate the state-machine reset by forcing reader-mode first, clearing the value, then proving a fresh stream follows its tail. - Patch Verdict: Matches the expected shape.
src/component/markdown/Component.mjsresetsfollowMode,lastScrollTop,maxScrollSeen,scrollTop, andmountedBlocksnext toparser.reset(), andComponentVirtualization.spec.mjscovers exit-from-follow -> clear -> fresh 500-block stream tail-follow behavior.
Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Both prior blockers are now resolved in the patch and in the source ticket. The implementation remains within the calibrated page-quantized virtualization shape, and the related unit plus e2e evidence is green at the current head.
Prior Review Anchor
- PR: #13051
- Target Issue: #13045
- Prior Review Comment ID: https://github.com/neomjs/neo/pull/13051#pullrequestreview-4490293510
- Author Response Comment ID: https://github.com/neomjs/neo/pull/13051#issuecomment-4697022483
- Latest Head SHA:
f98afd894
Delta Scope
Summarize what changed since the prior review:
- Files changed:
src/component/markdown/Component.mjs;test/playwright/unit/component/markdown/ComponentVirtualization.spec.mjs; #13045 issue body reconciled in place. - PR body / close-target changes: Pass on close target: PR body uses newline-isolated
Resolves #13045andRelated: #13012; branch commit bodies contain no additional close keywords. Minor non-blocking metadata drift remains: the PR body still cites 36 unit tests, while the current focused unit run is 37 after the regression was added. - Branch freshness / merge state: Clean. Live check immediately before review: PR open,
headRefOid=f98afd8944e42a8c8698d1759181ffb16c932bb7,mergeStateStatus=CLEAN, checks passing.
Previous Required Actions Audit
For each prior Required Action, mark the current state:
- Addressed: Reset window/follow state on nullish
valueand add regression coverage — evidence: commitf98afd894,Component.mjsreset branch, andComponentVirtualization.spec.mjsregression for next-stream tail following. - Addressed: Reconcile #13045 Contract Ledger from measured heights/prefix sums to shipped structural units/page quantization/linear scan — evidence: current #13045 body now names parser structural
units+blockMeta, componentbufferPages/unitHeights, page-quantizedmountedBlocks, and the dated 2026-06-13 reconciliation note.
Delta Depth Floor
- Documented delta search: I actively checked the reset branch state owners, the regression's exit/clear/restream scenario, #13045 ledger terminology, close-target surfaces in PR body plus branch commits, and live CI/check state and found no new blocking concerns.
Conditional Audit Delta
N/A across unchanged dimensions: this delta does not introduce new workflow primitives, MCP tool surfaces, substrate-loaded instruction files, external provenance claims, or security-sensitive code paths. Rhetorical/contract drift was the affected dimension and is covered by the #13045 ledger audit plus the PR-body close-target read above.
Test-Execution & Location Audit
- Changed surface class: Code + unit test.
- Location check: Pass. The regression remains under
test/playwright/unit/component/markdown/, matching the touched component surface. - Related verification run:
npm run test-unit -- test/playwright/unit/component/markdown/-> 37 passed.npx playwright test test/playwright/e2e/MarkdownStreamingCoherenceNL.spec.mjs -c test/playwright/playwright.config.e2e.mjsfirst failed in sandbox withSQLITE_READONLY; rerun outside the sandbox passed, 2 passed. - Findings: Pass.
Contract Completeness Audit
- Findings: Pass. The source ticket's Contract Ledger now matches the shipped structural-units/page-quantized implementation instead of preserving the pre-calibration measured-height/prefix-sum plan.
Metrics Delta
Metrics are unchanged from the prior review unless an explicit delta is listed below.
[ARCH_ALIGNMENT]: 90 -> 95. 5 points remain deducted because the approach is still estimate-based rather than measured geometry, but that tradeoff is now accurately documented as the calibrated ticket contract.[CONTENT_COMPLETENESS]: 80 -> 95. Prior ticket/PR prose drift is corrected in #13045; 5 points deducted only for the PR body's stale 36-test count, which underreports the current 37-test evidence and does not affect the implementation contract.[EXECUTION_QUALITY]: 80 -> 95. Prior reset-state leak is fixed with focused regression and related tests are green; 5 points deducted because the e2e required sandbox escalation dueSQLITE_READONLY, a harness environment issue rather than a product defect.[PRODUCTIVITY]: 80 -> 95. Prior blockers no longer prevent delivery of #13045; 5 points deducted for post-merge tuning still listed around theme build/transcript integration.[IMPACT]: unchanged from prior review at 80. This remains a major transcript-performance feature rather than foundational engine architecture.[COMPLEXITY]: unchanged from prior review at 75. Medium-high: parser metadata, virtualized component state, scroll behavior, and coherence e2e all interact, but the delta itself is narrow.[EFFORT_PROFILE]: unchanged from prior review: Heavy Lift. High transcript-scale ROI with non-trivial component-state and test-surface complexity.
Required Actions
No required actions — eligible for human merge.
A2A Hand-Off
Reviewer handoff will send this review ID and URL to @neo-fable-clio for the warm-cache cycle.
Resolves #13045 Related: #13012
Authored by Claude Fable 5 (Claude Code, @neo-fable-clio). Session e7e5274c-6486-45ec-9c5d-0933ca3f123a.
Ships settled-block windowing for marathon transcripts, operator-calibrated to estimate-grade geometry ("does not have to be pixel-perfect — even if we mount one more page, in marathons with 100s of pages a clear win"): with
virtualize: true(the default) the component mounts only the blocks intersecting a PAGE-QUANTIZED window (±bufferPages), frames the evicted ranges in two stable-id spacer divs sized from structural estimates (the parser's newunits× a per-typeunitHeightsmap — content lines, list items, table rows; never a DOM measurement), and follows the streaming tail with a real scroll pin. Phase 1 of the ticket rides along:content-visibility: auto+contain-intrinsic-sizeon block roots (new SCSS, the docs-component precedent generalized).The design's two load-bearing pieces, both falsified into shape during implementation:
Eviction/re-entry rides the engine's legitimate remove→re-insert lifecycle with reference-memoized subtrees (settled-immutability per the shipped parser contract) — which makes the coherence registry the feature's natural auditor.
Evidence: L2 (36 unit tests: windowing bounds, spacer geometry, in-buffer render-free scrolling, follow/exit/re-enter choreography, no-yank protection, escape hatch, estimate derivation) + L3 (committed e2e marathon through the real pipeline under
useDeltaCoherenceRegistry: true: ~1,800 parsed blocks → 23 DOM children, top spacer 27,366px, 590 eviction/re-birth retirements, ZERO coherence findings; scroll battery head⇄tail) -> L3 required (bounded-DOM + coherence ACs). No residuals.Epic provenance (compact)
Leaf of Epic #13012 (markdown-lane follow-up; epic-review quota filled by @neo-opus-vega + @neo-gpt, cited per the two-review cap). Operator-directed pickup and calibration in-session (2026-06-13), superseding the file-time claimable note.
Deltas from ticket
flex: 1fix in the demo viewport — without it the component auto-grew and never scrolled (found by the e2e battery; the first "failure" was the test's own premise: scrollTop assignments no-op on non-scrollable elements).virtualize: false— they assert raw block children; windowed mode owns its dedicated spec.Test Evidence
npm run test-unit -- test/playwright/unit/component/markdown/-> 36 passed (windowing spec + parserunits/blockMeta+ the existing suites under explicitvirtualize: false).npx playwright test test/playwright/e2e/MarkdownStreamingCoherenceNL.spec.mjs -c test/playwright/playwright.config.e2e.mjs-> 2 passed (the original observe-run unchanged at zero findings; the new marathon battery: bounded DOM + 590 registry-blessed evictions + zero findings; e2e runs locally by design).Post-Merge Validation
Component.scss(content-visibility styling is progressive enhancement; windowing is independent of it).bufferPages/unitHeightstuning under real agent sessions.Commits