From 448566bb34e96c75680596a6a16ae3cc25ff54a4 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 11 May 2026 15:29:05 +0000 Subject: [PATCH] Make AI governance copilot expandable --- .../src/components/AiGovernanceCopilot.tsx | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/AiGovernanceCopilot.tsx b/frontend/src/components/AiGovernanceCopilot.tsx index 80cdffa..bf14ed6 100644 --- a/frontend/src/components/AiGovernanceCopilot.tsx +++ b/frontend/src/components/AiGovernanceCopilot.tsx @@ -241,6 +241,7 @@ export default function AiGovernanceCopilot() { const currentUser = useAppSelector((state) => state.auth.currentUser) const isAskingResponse = useAppSelector((state) => state.openAi.isAskingResponse) const [isOpen, setIsOpen] = useState(false) + const [isExpanded, setIsExpanded] = useState(false) const [input, setInput] = useState('') const [messages, setMessages] = useState([welcomeMessage]) const [localError, setLocalError] = useState('') @@ -248,6 +249,9 @@ export default function AiGovernanceCopilot() { const page = useMemo(() => findPageContext(router.pathname), [router.pathname]) const userLabel = currentUser?.email || currentUser?.firstName || 'authenticated user' + const panelSizeClass = isExpanded + ? 'fixed bottom-4 right-4 h-[calc(100vh-2rem)] w-[920px] max-w-[calc(100vw-2rem)] max-sm:bottom-3 max-sm:right-3 max-sm:h-[calc(100vh-1.5rem)] max-sm:w-[calc(100vw-1.5rem)]' + : 'fixed bottom-5 right-5 h-[720px] max-h-[calc(100vh-4rem)] w-[560px] max-w-[calc(100vw-2rem)] max-sm:bottom-3 max-sm:right-3 max-sm:h-[calc(100vh-1.5rem)] max-sm:w-[calc(100vw-1.5rem)]' useEffect(() => { if (!isOpen) { @@ -353,7 +357,7 @@ export default function AiGovernanceCopilot() { return (
@@ -368,19 +372,29 @@ export default function AiGovernanceCopilot() {

Context: {page.title}

- +
+ + +
-
-
+
+

Workspace context

{page.focus}