Skip to content

Commit e662ad0

Browse files
committed
fix(web): thread error banner no longer shifts the chat
The thread error banner rendered in normal flow between the workspace header and the timeline, so showing or dismissing it moved the whole chat column by the banner height. It now lives in the same absolutely positioned overlay as the provider status banner and uses the glass surface, so the timeline keeps its height.
1 parent 46e8b1a commit e662ad0

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7607,14 +7607,6 @@ function ChatViewContent(props: ChatViewProps) {
76077607
/>
76087608
</WorkspacePageHeader>
76097609

7610-
<ThreadErrorBanner
7611-
error={visibleThreadError}
7612-
onDismiss={() => {
7613-
setThreadError(activeThread.id, null);
7614-
dismissThreadErrorBannerForSession(threadErrorBannerKey);
7615-
setThreadErrorBannerDismissTick((tick) => tick + 1);
7616-
}}
7617-
/>
76187610
{/* Main content area with optional plan sidebar */}
76197611
<div className="flex min-h-0 min-w-0 flex-1">
76207612
{/* Chat column */}
@@ -7640,13 +7632,21 @@ function ChatViewContent(props: ChatViewProps) {
76407632
</div>
76417633
</div>
76427634
) : null}
7643-
{/* Provider status overlays the timeline without changing its content height. */}
7644-
<div className="pointer-events-none absolute inset-x-0 top-0 z-20">
7635+
{/* Banners overlay the timeline without changing its content height. */}
7636+
<div className="pointer-events-none absolute inset-x-0 top-0 z-20 flex flex-col">
76457637
<ProviderStatusBanner
76467638
status={visibleProviderStatus}
76477639
onDismiss={() => setDismissedProviderStatusBannerKey(providerStatusBannerKey)}
76487640
onOpenProviderSetup={openProviderSetup}
76497641
/>
7642+
<ThreadErrorBanner
7643+
error={visibleThreadError}
7644+
onDismiss={() => {
7645+
setThreadError(activeThread.id, null);
7646+
dismissThreadErrorBannerForSession(threadErrorBannerKey);
7647+
setThreadErrorBannerDismissTick((tick) => tick + 1);
7648+
}}
7649+
/>
76507650
</div>
76517651
{/* Messages Wrapper */}
76527652
<div className="relative flex min-h-0 flex-1 flex-col">

‎apps/web/src/components/chat/ThreadErrorBanner.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ export const ThreadErrorBanner = memo(function ThreadErrorBanner({
4242
}) {
4343
if (!error) return null;
4444
return (
45-
<div className="mx-auto w-fit max-w-[min(48rem,calc(100%-2rem))] pt-3">
46-
<Alert variant="error" controlAlignment="first-line">
45+
<div className="pointer-events-auto mx-auto w-fit max-w-[min(48rem,calc(100%-2rem))] pt-3">
46+
<Alert
47+
variant="error"
48+
controlAlignment="first-line"
49+
className="alert-glass"
50+
data-variant="error"
51+
>
4752
<CircleAlertIcon />
4853
<AlertDescription>
4954
<Tooltip>

0 commit comments

Comments
 (0)