Severity: LOW Status: ✅ RESOLVED
const dest_line = &self.lines.items[r];
const src_line = &source.lines.items[r]; // physical index on BOTH rings
Correct only while self.start_index == source.start_index. The clock-mode saved grid is a clone (start_index preserved at clone time), but PTY feeding during clock mode is not gated: live scrollUp rotates the live ring and rewrites other physical slots. Each clock tick re-runs copyVisibleFrom(live_grid) (server.zig:2893) and starts copying physical row r of the live ring — which is now a different logical row — into the overlay, wrong rows and wrapped flags included.
Fix: index the source logically: source.lines.items[(source.start_index + r) % source.lines.items.len].