summaryrefslogtreecommitdiff
path: root/src/tui_app.zig
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-12 10:21:56 -0600
committert <t@tjp.lol>2026-06-12 10:23:02 -0600
commitaf8ba87475bfae9c1b4fa70c88fb4c59630a5670 (patch)
tree8d0c09a92c6f3eaa805e092d830342d61c1a6198 /src/tui_app.zig
parent3dcbf15bdb90e4c90e7225b82945a6862a7a063f (diff)
Replace Footer FPS display with model dimension and dim styling
Remove setFrameTime() method and fps-related rendering from Footer. Replace with setModel() to display model name with dim styling. Update all Footer tests accordingly, adjusting line counts and expectations for new layout with top/bottom rules wrapping content. Remove reverse video styling from footer.
Diffstat (limited to 'src/tui_app.zig')
-rw-r--r--src/tui_app.zig19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/tui_app.zig b/src/tui_app.zig
index 81894fa..5a9b7f4 100644
--- a/src/tui_app.zig
+++ b/src/tui_app.zig
@@ -7,7 +7,7 @@
//! - a `tui_engine.Engine` driving a LIST of components,
//! - the transcript (heap-allocated user/assistant/status components that
//! persist for the engine to borrow),
-//! - a pinned `InputBox` (focused) and `Footer` (fps element),
+//! - a pinned `InputBox` (focused) and `Footer`,
//! - the libpanto stream pump that routes each `Event` to component state.
//!
//! ## No "active component" invariant (plan ยง6)
@@ -728,21 +728,12 @@ pub const App = struct {
// -- the render pump ----------------------------------------------------
- /// Render a frame if one is pending, feeding the footer the measured
- /// render time. Returns true if a frame was drawn.
+ /// Render a frame if one is pending. Returns true if a frame was drawn.
pub fn maybeRender(self: *App) !bool {
const now = self.clock.now();
if (!self.scheduler.shouldRenderNow(now)) return false;
- const start = self.clock.now();
try self.engine.render();
self.flushSink();
- const end = self.clock.now();
- const ms = @as(f64, @floatFromInt(end - start)) / @as(f64, std.time.ns_per_ms);
- // Feed the footer the last frame's render time. This dirties the
- // footer for NEXT frame; we don't recursively render here (the next
- // pending frame picks it up), keeping the fps readout one frame
- // behind, which is acceptable for the perf-validation surface.
- self.footer.setFrameTime(ms);
self.scheduler.noteRendered(self.clock.now());
return true;
}
@@ -751,12 +742,8 @@ pub const App = struct {
/// the coalescing window.
pub fn renderNow(self: *App) !void {
self.scheduler.requestRender();
- const start = self.clock.now();
try self.engine.render();
self.flushSink();
- const end = self.clock.now();
- const ms = @as(f64, @floatFromInt(end - start)) / @as(f64, std.time.ns_per_ms);
- self.footer.setFrameTime(ms);
self.scheduler.noteRendered(self.clock.now());
}
@@ -1620,8 +1607,6 @@ test "maybeRender feeds the footer a frame time and respects coalescing" {
h.app.scheduler.requestRender();
try testing.expect(try h.app.maybeRender()); // idle => renders
- // Footer received a frame time (>= 0).
- try testing.expect(h.app.footer.frame_ms != null);
}
test "routeEvent: tool result correlates to its ToolUse component by id" {