fix(ui): refine Lighthouse chat chart surfaces

This commit is contained in:
alejandrobailo
2026-07-02 16:59:56 +02:00
parent 9cbc4faa11
commit 4e0ec00114
3 changed files with 59 additions and 4 deletions
@@ -58,7 +58,7 @@ export function MessageBubble({ message }: { message: LighthouseV2Message }) {
className={cn(
"max-w-full min-w-0 rounded-[8px] px-4 py-3 text-sm",
isUser
? "bg-button-primary text-black"
? "bg-button-primary text-slate-950"
: "bg-bg-neutral-tertiary text-text-neutral-primary",
)}
>
+3 -1
View File
@@ -92,7 +92,9 @@ export default async function AIChatbot({
return (
<ContentLayout title="Lighthouse AI" icon={<LighthouseIcon />}>
<LighthouseV2NavigationModeSync />
<div className="h-[calc(100dvh-6.5rem)] min-h-0">
{/* [contain:layout] traps streamdown's fixed fullscreen overlay inside
the chat area so it never covers the sidebar or navbar. */}
<div className="h-[calc(100dvh-6.5rem)] min-h-0 [contain:layout]">
<LighthouseV2ChatPage
key={chatRouteKey}
configurations={configurations}
+55 -2
View File
@@ -323,12 +323,65 @@
min-width: 0;
}
/* !important beats the inline max-width px that mermaid sets on the svg */
.lighthouse-markdown [data-streamdown="mermaid-block"] svg {
.lighthouse-markdown
[data-streamdown="mermaid-block"]
> div:first-child
.fixed {
padding: 1rem !important;
background: transparent !important;
backdrop-filter: none !important;
}
.lighthouse-markdown
[data-streamdown="mermaid-block"]
> div:first-child
.fixed
> [role="presentation"] {
box-sizing: border-box;
width: 100% !important;
height: 100% !important;
overflow: hidden;
border: 1px solid var(--border-neutral-tertiary);
border-radius: 0.75rem;
background: var(--bg-neutral-tertiary);
backdrop-filter: blur(46px);
}
/* !important beats the inline max-width px that mermaid sets on the svg.
Scoped to the inline chart (last child): streamdown renders its
fullscreen overlay inside the controls row and sizes it itself. */
.lighthouse-markdown [data-streamdown="mermaid-block"] > div:last-child svg {
max-width: 100% !important;
height: auto;
}
/* Streamdown's fullscreen [&>div]:h-full can stretch the floating
pan/zoom controls; keep the pills content-sized and inside the chart. */
.lighthouse-markdown
[data-streamdown="mermaid-block"]
div:has(> div[role="application"])
> div:not([role="application"]) {
height: auto !important;
}
.lighthouse-markdown
[data-streamdown="mermaid-block"]
> div:last-child
> div:not([role="application"]) {
bottom: 0 !important;
flex-direction: row !important;
}
.lighthouse-markdown
[data-streamdown="mermaid-block"]
> div:first-child
.fixed
[role="presentation"]
> div
> div:not([role="application"]) {
bottom: 3rem !important;
}
/* Lighthouse overview banner animated gradient layers */
.lighthouse-banner-gradient-neutral {
background: radial-gradient(