Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Architect is a terminal multiplexer displaying interactive sessions in a grid wi
8. Calls `renderer.render` for the scene, then `ui.render` for overlays, then presents.
9. Sleeps based on idle/active frame targets (~16ms active, ~50ms idle).

`SessionState.dirty` is set on terminal updates and cleared after a successful render (cached grid or full view). When collapsing from full view to grid, the focused session is marked dirty so its cache refreshes before idle throttling resumes.

**Terminal resizing**
- `applyTerminalResize` updates the PTY size first, then resizes the `ghostty-vt` terminal.
- The VT stream stays alive; only its handler is refreshed to repoint at the resized terminal, preserving parser state and preventing in-flight escape sequences from being misparsed.
Expand Down
7 changes: 6 additions & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,16 @@ pub fn main() !void {
anim_state.mode == .PanningUp or anim_state.mode == .PanningDown)
{
if (anim_state.isComplete(now)) {
anim_state.mode = switch (anim_state.mode) {
const previous_mode = anim_state.mode;
const next_mode = switch (anim_state.mode) {
.Expanding, .PanningLeft, .PanningRight, .PanningUp, .PanningDown => .Full,
.Collapsing => .Grid,
else => anim_state.mode,
};
anim_state.mode = next_mode;
if (previous_mode == .Collapsing and next_mode == .Grid and anim_state.focused_session < sessions.len) {
sessions[anim_state.focused_session].dirty = true;
}
std.debug.print("Animation complete, new mode: {s}\n", .{@tagName(anim_state.mode)});
}
}
Expand Down
1 change: 1 addition & 0 deletions src/render/renderer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ fn renderSession(
) RenderError!void {
try renderSessionContent(renderer, session, rect, scale, is_focused, font, term_cols, term_rows, theme);
renderSessionOverlays(renderer, session, rect, is_focused, apply_effects, current_time_ms, is_grid_view, theme);
session.dirty = false;
}

fn renderSessionContent(
Expand Down