Skip to content

[CTX-0269] fix(runtime): live split resizes pane grid, reflow fires - #445

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0269/fix-live-split-reflow
Sep 9, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0269/fix-live-split-reflow

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Priority: P0 | Area: render | Labels: fix,area:render,P0 | Milestone: v0.1.0 | RFC: OQ-007 | Task: CTX-0269

Closes #444

Root cause: both live split paths (keymap NewSplit in app chrome_keys, ctl splitView in app ctl) funnel into Runtime::set_layout, which re-synced pane sessions but never resized the shared primary grid or the primary PTY winsize. tick only clips via viewport_snapshot, so CTX-0266 reflow never fired live (stale ~155-col grid in ~77-col pane).

Diff: layout_focus.rs set_layout now reflows leaf Views immediately and resizes primary grid + primary PTY winsize to the focused allocation (best-effort, matching dims skip); panes.rs adds pane_pty_size introspection; new tests/split_live_reflow.rs (5 tests).

Tests: full workspace suite green, clippy -D warnings clean, fmt clean, windows-gnu check ok, act -n ci+codeql ok. New tests fail pre-fix (3/3 core) and pass post-fix.

Live AFTER proof (ws4 seat-checked, recording/ctx-0269/ uncommitted): fresh 280-char marker wraps to 4 rows with all tails visible; kbd split tiles honestly with live shell; mixed-shape co-paint shows no blanks. Narrow truncates per observed State::resize behavior (same as window narrow); true rewrap unimplemented (rg-verified) — possible drift vs #441 body claims, flagged for commander.

STOP at in_review: requesting independent review; not merging.

@Xuepoo Xuepoo added fix Bug fix area:render Area: rendering P0 Priority: highest labels Sep 9, 2026
@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 9, 2026
@Xuepoo
Xuepoo force-pushed the ctx-0269/fix-live-split-reflow branch from 614bc55 to 21c5ca8 Compare September 9, 2026 09:51
@Xuepoo

Xuepoo commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto origin/main (2fb010f, incl. #441 rewrap) — clean rebase, no conflicts (single-commit branch, disjoint paths: #441 touched term-state, this PR touches runtime + new test).

Reviewer PX was right: the "true rewrap is unimplemented anywhere" comments were stale post-#441. Fixed in 21c5ca8:

Verification (post-rebase, post-fix):

  • split_live_reflow: 5/5 pass
  • reflow_rewrap_repro: 4/4 pass
  • cargo fmt --check (bitty-runtime): clean
  • cargo clippy -p bitty-runtime --tests -- -D warnings: clean

Note: foreign stash ctx-0094 entry left untouched; worktree tracked tree clean (only untracked recording/).

@Xuepoo
Xuepoo merged commit 6e89326 into main Sep 9, 2026
10 checks passed
@Xuepoo
Xuepoo deleted the ctx-0269/fix-live-split-reflow branch September 9, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:render Area: rendering fix Bug fix P0 Priority: highest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CTX-0269] fix(runtime): live split never resizes pane grid, reflow never fires

1 participant