mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
fix(ui): refine Lighthouse chat chart surfaces
This commit is contained in:
@@ -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",
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user