From b7fee13a3d921ed9d560d11f7ccaa3c94393c913 Mon Sep 17 00:00:00 2001 From: twalts Date: Tue, 24 Mar 2026 17:34:07 -0700 Subject: [PATCH] fix: prevent horizontal page scroll on long action log lines Add white-space: pre-wrap to Code component pre elements rendering stdout/stderr in action last-run, update details, and build info views. --- ui/src/components/updates/details.tsx | 4 ++-- ui/src/resources/action/last-run.tsx | 4 ++-- ui/src/resources/build/info.tsx | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/src/components/updates/details.tsx b/ui/src/components/updates/details.tsx index c69f47279..bd1c5f5bf 100644 --- a/ui/src/components/updates/details.tsx +++ b/ui/src/components/updates/details.tsx @@ -200,7 +200,7 @@ export function UpdateDetailsContent({ id }: { id: string }) { dangerouslySetInnerHTML={{ __html: updateLogToHtml(log.stdout), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )} @@ -214,7 +214,7 @@ export function UpdateDetailsContent({ id }: { id: string }) { dangerouslySetInnerHTML={{ __html: updateLogToHtml(log.stderr), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )} diff --git a/ui/src/resources/action/last-run.tsx b/ui/src/resources/action/last-run.tsx index 5e0174f45..211b5a679 100644 --- a/ui/src/resources/action/last-run.tsx +++ b/ui/src/resources/action/last-run.tsx @@ -48,7 +48,7 @@ export default function ActionLastRun({ id }: { id: string }) { dangerouslySetInnerHTML={{ __html: updateLogToHtml(log.stdout), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )} @@ -65,7 +65,7 @@ export default function ActionLastRun({ id }: { id: string }) { dangerouslySetInnerHTML={{ __html: updateLogToHtml(log.stderr), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )} diff --git a/ui/src/resources/build/info.tsx b/ui/src/resources/build/info.tsx index 48daa24b1..9f97fa4f3 100644 --- a/ui/src/resources/build/info.tsx +++ b/ui/src/resources/build/info.tsx @@ -101,7 +101,7 @@ export default function BuildInfo({ dangerouslySetInnerHTML={{ __html: updateLogToHtml(remoteError), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )} @@ -233,7 +233,7 @@ export default function BuildInfo({ dangerouslySetInnerHTML={{ __html: updateLogToHtml(log.stdout), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )} @@ -247,7 +247,7 @@ export default function BuildInfo({ dangerouslySetInnerHTML={{ __html: updateLogToHtml(log.stderr), }} - style={{ overflowY: "auto" }} + style={{ overflowY: "auto", whiteSpace: "pre-wrap" }} /> )}