fix(web): stop the chat timeline reading through the provider status banner (#5353)

This commit is contained in:
Bilal Bakr authored and GitHub committed 2026-08-04 15:41:07 -04:00
1 parent 94331c58ec
commit 90e3778660
2 files changed
+13 -3

No files matched your search

@@ -44,6 +44,15 @@ describe("ProviderStatusBanner", () => {
expect(markup).toContain("absolute top-2 right-2");
});
it("renders on a glass surface so the timeline never reads through the banner", () => {
const markup = renderToStaticMarkup(
<ProviderStatusBanner status={warningProvider()} onDismiss={() => {}} />,
);
expect(markup).toContain("alert-glass");
expect(markup).toContain('data-variant="warning"');
});
it("labels error dismiss controls with the correct severity", () => {
const markup = renderToStaticMarkup(
<ProviderStatusBanner
@@ -46,11 +46,12 @@ export const ProviderStatusBanner = memo(function ProviderStatusBanner({
<div className="pointer-events-auto mx-auto w-fit max-w-[calc(100%-2rem)] pt-3">
<div
className={cn(
"relative inline-flex items-center gap-3 rounded-xl border py-3 ps-3.5 pe-10 text-card-foreground text-sm",
"alert-glass relative inline-flex items-center gap-3 rounded-xl border py-3 ps-3.5 pe-10 text-card-foreground text-sm",
status.status === "warning"
? "border-warning/32 bg-warning/4 [&_svg]:text-warning"
: "border-destructive/32 bg-destructive/4 text-destructive-foreground [&_svg]:text-destructive",
? "border-warning/32 [&_svg]:text-warning"
: "border-destructive/32 text-destructive-foreground [&_svg]:text-destructive",
)}
data-variant={status.status === "warning" ? "warning" : "error"}
role="alert"
>
<InfoIcon className="size-4 shrink-0" aria-hidden />