From af8ba87475bfae9c1b4fa70c88fb4c59630a5670 Mon Sep 17 00:00:00 2001 From: t Date: Fri, 12 Jun 2026 10:21:56 -0600 Subject: 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. --- src/tui_app.zig | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/tui_app.zig') 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" { -- cgit v1.3