fix-tui-pty

Fix: TUI PTY scrollback duplicates last chunk after window resize

Metadata

Statusdone
Assignedagent-1046
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:sonnet
Created2026-04-29T00:23:33.126445974+00:00
Started2026-04-29T00:43:41.828230841+00:00
Completed2026-04-29T01:24:33.196825637+00:00
Tagsbug,tui,pty, eval-scheduled
Eval score0.84
└ blocking impact0.90
└ completeness0.80
└ coordination overhead0.90
└ correctness0.85
└ downstream usability0.85
└ efficiency0.85
└ intent fidelity0.81
└ style adherence0.90

Description

Description

Implement the fix identified in diagnose-tui-pty. Read that task's log via wg show diagnose-tui-pty for the root cause + recommended approach.

Validation

  • Failing test written first (TDD): a deterministic test that reproduces the duplication. Likely shape: - Construct a scrollback buffer with known content (e.g. 200 lines of unique markers) - Simulate a resize event (programmatic — not requiring a real terminal) - Read the rendered scrollback after resize - Assert: each marker appears exactly once, no duplication of the tail
  • Fix makes the test pass
  • Live smoke: actually open the TUI, fill scrollback, resize the terminal in both directions (smaller AND larger — both should work), scroll back, confirm no duplicated tail. Record steps in task log.
  • cargo build + cargo test pass with no regressions
  • Permanent smoke scenario added under tests/smoke/scenarios/ for the resize-redraw path; this task id in owners
  • cargo install --path . was run before claiming done

Depends on

Required by

Log