diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 07:03:02 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 07:03:03 -0300 |
| commit | eb8ecb8a451ae32d590c42755614b801f9cc0c09 (patch) | |
| tree | 0ea2f19acf06694ed744061b6ba41541ab0f2ae9 /core/Prompt.zig | |
| parent | 6068e48aa4cec242dc0c29865b06347573fdd1ae (diff) | |
| download | pardes-eb8ecb8a451ae32d590c42755614b801f9cc0c09.tar.gz pardes-eb8ecb8a451ae32d590c42755614b801f9cc0c09.zip | |
views, dump, draw: a load makes each view's band rows again from its own tag state, and the tag's own rows are held to MAX_TAG_ROWS where the frame reads them (the coordinator's item from P3's soak: `index out of bounds: index 15, len 8` at draw.zig paintPaneTag, `for (lines[0..rows])`, from views.drawOne in a replica client's draw after a divergence); RUN FIRST: views.zig's new test on the parent, its band-rows check left out: `panic: index out of bounds: index 12, len 8` at draw.zig:1007 paintPaneTag, from joinPaneTag, renderPane, render, drawOne: the same fault; THE CAUSE: a tag's `tag_rows` counts its band's rows (Core.sync: the band unrolled under its text pushes the body down) and is dumped and in the digest, while `band_rows` is derived (views.PaneView and Pane: never dumped, made again at every sync); a load (a join's dump, a replica's rollback) zeroed `band_rows` and kept `tag_rows`, so a view drawn before its next step (drawOne: a replica client's own view, a pump's other views; no sync there) read the tag's own rows as `tag_rows - band_rows` = the band's too, 12 to 19, and indexed paintPaneTag's `[MAX_TAG_ROWS]` array past its 8; THE FIX: views.bandsLoaded (from dump.afterLoad, after TagState.loaded) makes each open view's `band_rows` again within that view from its own state as its sync does (`Band.takes`, 0 for a folded pane and Band.over's), into the pane's live field and the view's share (derived: the digest is unchanged, as the test checks); draw.joinPaneTag and paintPaneTag hold the tag's own rows to MAX_TAG_ROWS (`-|` and `@min`): production code never panics on a stale pair; TEST: views.zig "a view not live with its band open, dumped and loaded, draws before its next step: its band's rows made again from its state, its tag's rows never past MAX_TAG_ROWS" (SPC Down in view 0, another view live, byteDump, load: the digest equal, view 0's share's band rows 11 again (0 on the parent), drawOne draws it; with its band rows zeroed by hand drawOne draws it too); a user's client could abort on a join or a rollback while another view had a band open; core-test 1073/1244 (171 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/Prompt.zig')
0 files changed, 0 insertions, 0 deletions
