Skip to content

fix(view): fix list_window mid-flip quiet edits and unmeasured-tail foot latching - #577

Merged
CommaBot merged 2 commits into
mainfrom
fix/list-window-fuzz-519-502
Dec 6, 2026
Merged

CommaBot merged 2 commits into
mainfrom
fix/list-window-fuzz-519-502

Conversation

@CommaBot

@CommaBot CommaBot commented Dec 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes four virtualized-list edge cases surfaced by 5,000-seed list_stability_fuzz_test sweeps in packages/view, while keeping streaming-row growth during active FLIP animations smooth:

  1. Newly mounted flip_new slot missing tall binding (lsf_stream2(675UL, 60)):

    • In View::scrolls_window_ids (packages/view/src/list_window.pion), slot creation called bind() (binding .scale(flip_open(k, slot))) before tall.set(k, my_tall), and flip_open read c.untracked(). When a newly inserted flip_new row mounted mid-FLIP, flip_open saw None and returned 1.0, rendering the row at unscaled full height overlapping its lower neighbor.
    • Register tall.set(k, my_tall) before bind() and read c.get() inside flip_open (only reached while d > 0.0 && flip_new.contains(k) && !flip_whole.contains(k)).
  2. Quiet visible row height change mid-FLIP causing height-offset or overlap conflict (lsf_stream2(519UL, 60), lsf_stream2(2579UL, 60)):

    • Track flip_setting_out around set_out's laid_now() calls. When an already-measured row quietly changes height during an active flip_way, keep the FLIP animation running (e.g. streaming text growing +8pt while a new message slides in) and call rest_flip only if the changed row itself carries an active height FLIP offset (dh.abs() > 0.5, seed 519) or the updated layout causes consecutive visible showing rows to overlap in drawn coordinates (drawn_top < prev_bot - 0.5, seed 2579).
  3. Quiet deletion of boundary visible row mid-FLIP (lsf_stream2(761UL, 60)):

    • set_out runs after two after_flush passes, by which time a quietly deleted first/last visible row has already been unmounted from showing. Snapshot pre-flush before_showing in change() (aligned 1:1 with pending_was) and check showing ∪ before_showing inside classify_flip_quiet (packages/view/src/list_flip.pion).
  4. Premature to_foot() latching when deletes/moves reveal unmeasured or stale-height tail rows (lsf_stream2(502UL/598UL/608UL/809UL, 60)):

    • In at_most, require every row from all.first_at(t) through all.length() - 1 to have all.known(i).
    • Track filled_rev (updated when s.fill completes with !incomplete, or when the laid_rev watcher confirms no s.fill is pending and every visible row is row_ready). In self.reacts(at_most), defer eager s.to_foot() (before mutating s.held) unless hand || glided || filled_rev.v == laid_rev.v, letting s.fill_put decide after mounting and re-measuring newly revealed rows.

Verification

  • 5,000-seed stream2 sweep (on pion-c6c6dd79a7, PION_STRICT_STUB=1):
    • lsf_stream2 0..<4000 × 60 steps + 0..<1000 × 150 steps (390,000 steps): 0 failures.
    • lsf_stream1, lsf_stream3, lsf_stream4, lsf_stream5 0..<250 × 50 steps each (50,000 steps): 0 failures.
  • Permanent regression tests:
    • packages/view/src/list_stability_fuzz_test.pion:
      • Baseline failure repro seeds: 502, 519, 598, 608, 675, 761, 809, 2579 (60 steps each).
      • Counter-regression guard seeds (passed on baseline; kill regressions in at_most / filled_rev / before_showing): 204, 311, 538, 584, 722, 736.
      • Directed streaming-chat test: quiet +8pt growth of penultimate row while newly appended row is mid-FLIP preserves smooth FLIP without snapping or overlapping.
      • Directed flips + foot_room test: quiet offscreen delete while foot_room > 0.5 followed by tail appends keeps following foot.
    • packages/view/src/list_flip_test.pion: direct unit test for classify_flip_quiet boundary head/tail deletions vs offscreen deletion.
  • Checks & suites:
    • pionc fmt --check on all 4 modified files: pass.
    • python3 scripts/invar check --json: ok: true.
    • python3 scripts/invar audit --json --require-reactive: ok: true (0 errors / 0 warnings).
    • packages/view 230/230, packages/ui 913/913, packages/motion 44/44, packages/glass 34/34, packages/kit 75/75, packages/lg 161/161.

@CommaBot
CommaBot merged commit 768622d into main Dec 6, 2026
3 checks passed
@CommaBot
CommaBot deleted the fix/list-window-fuzz-519-502 branch December 6, 2026 02:39
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.

2 participants