Skip to content

fix(virtual): live_text elements keep virtual-window remounts on the fast path - #1472

Merged
Hona merged 1 commit into
devfrom
fix/544-live-text-remount
Nov 23, 2026
Merged

Hona merged 1 commit into
devfrom
fix/544-live-text-remount

Conversation

@Hona

@Hona Hona commented Nov 23, 2026

Copy link
Copy Markdown
Member

Fixes #544

Root cause

  • CommitState::virtual_only in crates/rune/src/runtime/commit/remount.rs rejected CommitKind::Remount whenever any node in tree.nodes had t.cold.live.is_some(), forcing a full view rebuild on every virtual-window shift even when the live_text node was unrelated to the scrolling list.

What changed

  • Removed the t.cold.live.is_none() check from CommitState::virtual_only in crates/rune/src/runtime/commit/remount.rs. Staying live_text nodes move intact through move_slice (preserving their latched text, cold.live, live_text_seen, and Taffy slot), newly entering virtual rows flatten and latch on the same frame, and RuntimeCore::apply re-subscribes live sources via subscribe_live.
  • Added regression test runtime::tests::remount::virtual_remount_keeps_live_text_bound_without_running_view in crates/rune/src/runtime/tests/remount.rs covering sibling and per-row live_text nodes across virtual-window shifts and mid-scroll publishes.
  • Added changelog entry changelog/unreleased/2026-11-23-live-text-virtual-remount.md.

Verification

  • Confirmed the new regression test fails without the fix and passes with it.
  • Ran cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid runtime::tests::remount (5 passed), cargo test -p rune --lib memo_reuse (5 passed), cargo test -p rune --lib runtime::tests::relayout (22 passed), and scripts/file-size.sh (0 errors).
  • Shared cross-platform runtime code; tested on Windows headless (macOS/Linux/wasm not built separately).

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.

One live_text anywhere makes every virtual-window shift run the view

1 participant