From 4a4818e933ecd2da2b0620ee05896218e38e5dd4 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Sun, 22 Mar 2026 18:49:26 -0400 Subject: [PATCH] fix InlineError blank space and ElicitationUrlPanel URL overflow Only render InlineError details Stack when there is content to show. Add wrapping Code theme variant for long URLs that would push buttons offscreen. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../atoms/InlineError/InlineError.tsx | 45 ++++++++++--------- .../ElicitationUrlPanel.tsx | 4 +- clients/web/src/theme/Code.ts | 13 ++++-- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/clients/web/src/components/atoms/InlineError/InlineError.tsx b/clients/web/src/components/atoms/InlineError/InlineError.tsx index e08dabaa..bca095c2 100644 --- a/clients/web/src/components/atoms/InlineError/InlineError.tsx +++ b/clients/web/src/components/atoms/InlineError/InlineError.tsx @@ -16,28 +16,33 @@ export function InlineError({ maxRetries, docLink, }: InlineErrorProps) { + const hasDetails = + retryCount !== undefined || details !== undefined || docLink !== undefined; + return ( - - {retryCount !== undefined && ( - - Retry attempt {retryCount} - {maxRetries !== undefined && ` of ${maxRetries}`} - - )} - {details && ( - - {details} - - )} - {docLink && ( - - - View Troubleshooting Guide → - - - )} - + {hasDetails && ( + + {retryCount !== undefined && ( + + Retry attempt {retryCount} + {maxRetries !== undefined && ` of ${maxRetries}`} + + )} + {details && ( + + {details} + + )} + {docLink && ( + + + View Troubleshooting Guide → + + + )} + + )} ); } diff --git a/clients/web/src/components/molecules/ElicitationUrlPanel/ElicitationUrlPanel.tsx b/clients/web/src/components/molecules/ElicitationUrlPanel/ElicitationUrlPanel.tsx index c60486f7..dd924368 100644 --- a/clients/web/src/components/molecules/ElicitationUrlPanel/ElicitationUrlPanel.tsx +++ b/clients/web/src/components/molecules/ElicitationUrlPanel/ElicitationUrlPanel.tsx @@ -35,7 +35,9 @@ export function ElicitationUrlPanel({ The server is requesting you visit: - {url} + + {url} +