From d90042ec3cdbfc82c05d9201b0b57f45ee85f4de Mon Sep 17 00:00:00 2001 From: AgentSeal Date: Thu, 16 Apr 2026 15:44:39 -0700 Subject: [PATCH] fix: stop Top Sessions panel from truncating the calls column The TopSessions row layout summed to the full panel width without leaving room for the Box border (round) + paddingX, so Ink truncated the last 4 characters -- landing exactly on the calls column and producing rows like "$182.58 ..." with no calls value. Introduce PANEL_CHROME = 4 and subtract it from the name column so the row fits inside the panel's inner area. --- src/dashboard.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dashboard.tsx b/src/dashboard.tsx index 55c055b..8b41399 100644 --- a/src/dashboard.tsx +++ b/src/dashboard.tsx @@ -132,6 +132,8 @@ function HBar({ value, max, width }: { value: number; max: number; width: number ) } +const PANEL_CHROME = 4 + function Panel({ title, color, children, width }: { title: string; color: string; children: React.ReactNode; width: number }) { return ( @@ -390,7 +392,7 @@ function TopSessions({ projects, pw, bw }: { projects: ProjectSummary[]; pw: num } const maxCost = top[0].totalCostUSD - const nw = Math.max(8, pw - bw - TOP_SESSIONS_COST_COL - TOP_SESSIONS_CALLS_COL - 1) + const nw = Math.max(8, pw - bw - TOP_SESSIONS_COST_COL - TOP_SESSIONS_CALLS_COL - 1 - PANEL_CHROME) return (