From e75a22c65646811af564a4c9384ddc9bd14c9146 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 29 Apr 2026 20:47:04 -0700 Subject: [PATCH] fix(tui): keep header left edge anchored when remote tunnel is shown Between 100-175 cols the remote URL pushed the logo/tabs offscreen. Remote info now sits in a flex-shrinkable, right-justified slot that truncates. Also paints a solid background on the QR overlay. Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/tui-header-remote-truncate.md | 5 ++++ .../cli/src/commands/dashboard-tui/app.tsx | 25 ++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 .changeset/tui-header-remote-truncate.md diff --git a/.changeset/tui-header-remote-truncate.md b/.changeset/tui-header-remote-truncate.md new file mode 100644 index 000000000..527999096 --- /dev/null +++ b/.changeset/tui-header-remote-truncate.md @@ -0,0 +1,5 @@ +--- +"@runfusion/fusion": patch +--- + +Fix TUI header overflow when a remote tunnel is configured. Between 100 and 175 columns the remote URL was pushing the left edge (logo + tabs) offscreen; the remote info now lives in a flex-shrinkable, right-justified slot that truncates instead of overflowing. Also gives the QR overlay a solid background so it no longer renders transparent over the underlying TUI. diff --git a/packages/cli/src/commands/dashboard-tui/app.tsx b/packages/cli/src/commands/dashboard-tui/app.tsx index 3c1daf59d..70e43d290 100644 --- a/packages/cli/src/commands/dashboard-tui/app.tsx +++ b/packages/cli/src/commands/dashboard-tui/app.tsx @@ -958,21 +958,16 @@ function MainHeader({ state }: { state: DashboardState }) { ); })} - - {state.remoteStatus?.state === "running" && ( - - ● tunnel - {state.remoteStatus.url && cols >= 100 && ( - {state.remoteStatus.url} - )} - {cols >= 80 && [^Q] QR} - - )} - {state.remoteStatus?.state === "starting" && ( - + + {state.remoteStatus?.state === "running" && ( + + ● tunnel{state.remoteStatus.url ? ` ${state.remoteStatus.url}` : ""}{cols >= 80 ? " [^Q] QR" : ""} + + )} + {state.remoteStatus?.state === "starting" && ( ● tunnel starting… - - )} + )} + {showHelpHint && [?] help [q] quit} ); @@ -4209,7 +4204,7 @@ export function DashboardApp({ controller }: DashboardAppProps) { )} {qrOverlay && ( - + Remote Access — Scan to connect {qrOverlay.state === "loading" && Generating QR…} {qrOverlay.state === "error" && {qrOverlay.message}}