File: src/grid.zig:180-192, src/server/server.zig:2881-2895
Severity: HIGH
Status: ✅ FIXED
Clock mode previously re-cloned the entire saved_grid — including all scrollback history (up to 2,000 lines) — every second into the session arena. Because ArenaAllocator.free is a no-op, this permanently grew memory by megabytes per minute.
if (sg.clone(grid_alloc)) |cloned| {
pane.screen.grid.deinit(); // arena no-op
pane.screen.grid = cloned;
Grid.copyVisibleFrom(self: *Grid, source: *const Grid) in src/grid.zig which copies visible lines and cell contents in-place with zero allocations.renderToDisplayClient in src/server/server.zig to call pane.screen.grid.copyVisibleFrom(sg) before renderClock(), eliminating all per-second allocations.Grid.copyVisibleFrom updates visible cells in-place without allocations — bug #359 in src/grid.zig.