diff --git a/admin-compliance/app/api/sdk/compliance-advisor/chat/route.ts b/admin-compliance/app/api/sdk/compliance-advisor/chat/route.ts
index 16eb284a..dd1afe7d 100644
--- a/admin-compliance/app/api/sdk/compliance-advisor/chat/route.ts
+++ b/admin-compliance/app/api/sdk/compliance-advisor/chat/route.ts
@@ -36,6 +36,9 @@ Datenschutz- und Compliance-Fragen in verstaendlicher Sprache zu beantworten.
const FORMAT_GUIDANCE = `\n\n## Antwortformat (WICHTIG)
- Schreibe gut strukturiertes **Markdown**: kurze Abschnittsueberschriften (##), Aufzaehlungen (-),
nummerierte Schritte und **Fettung** fuer Schluesselbegriffe. Halte Absaetze kurz.
+- GLIEDERE erklaerende Antworten aktiv statt langem Fliesstext: eine eigene ## Ueberschrift je
+ Aspekt (z.B. "Definition", "Ablauf/Phasen", "Rechtsbezug", "Praktische Bedeutung"), nummerierte
+ Schritte fuer Ablaeufe/Phasen, Bullet-Points fuer Aufzaehlungen. Lieber klar gegliedert als ein Block.
- Nenne Fundstellen/Quellen NICHT im Fliesstext (kein "(Art. 30 DSGVO)", keine "[Quelle 1]").
Die Quellen werden dem Nutzer in einem EIGENEN Bereich neben der Antwort angezeigt.
- Beende die Antwort NIEMALS mit einer Quellen-/Fundstellen-Liste (kein "Quellen:", kein
diff --git a/admin-compliance/components/sdk/ComplianceAdvisorWidget.tsx b/admin-compliance/components/sdk/ComplianceAdvisorWidget.tsx
index 1bd84cc2..5f09e85e 100644
--- a/admin-compliance/components/sdk/ComplianceAdvisorWidget.tsx
+++ b/admin-compliance/components/sdk/ComplianceAdvisorWidget.tsx
@@ -60,7 +60,7 @@ export function ComplianceAdvisorWidget({ currentStep = 'default' }: ComplianceA
return (
+ )
+}
diff --git a/admin-compliance/components/sdk/advisor/EvidenceWorkspace.tsx b/admin-compliance/components/sdk/advisor/EvidenceWorkspace.tsx
index 71d7eef3..bdb38867 100644
--- a/admin-compliance/components/sdk/advisor/EvidenceWorkspace.tsx
+++ b/admin-compliance/components/sdk/advisor/EvidenceWorkspace.tsx
@@ -1,34 +1,49 @@
'use client'
-import { useEffect, useRef } from 'react'
+import { useEffect, useRef, useState } from 'react'
import type { AdvisorTurn } from './useAdvisorStream'
import { StickyQuestion } from './StickyQuestion'
import { TurnView } from './TurnView'
+import { EvidenceSummary } from './EvidenceSummary'
+import { AnswerPane } from './AnswerPane'
+import { EvidencePane } from './EvidencePane'
+import { FiguresPane } from './FiguresPane'
+import { FootnotesPane } from './FootnotesPane'
import { AdvisorEmptyState } from './EmptyState'
/**
- * The Evidence Workspace body: a pinned "last question" + a scrollable history of turns, each
- * showing the answer alongside its sources / figures / footnotes. Scroll up to revisit a past
- * answer with its full evidence.
+ * The Evidence Workspace body.
+ * - Narrow (collapsed): stacked panels with a pinned last question + scrollable turn history.
+ * - Wide (expanded): a 3-column Compliance Case Workspace — question + summary (left, with a
+ * history switcher), answer (center scroll), evidence (right scroll) — each column scrolls
+ * independently so the user never loses the question or the evidence.
*/
export function EvidenceWorkspace({
turns,
+ expanded,
exampleQuestions,
onExample,
}: {
turns: AdvisorTurn[]
+ expanded: boolean
exampleQuestions: string[]
onExample: (q: string) => void
}) {
+ const [activeId, setActiveId] = useState(null)
const endRef = useRef(null)
const latest = turns[turns.length - 1]
+ const active = turns.find((t) => t.id === activeId) ?? latest
- // Scroll to the newest turn when a question is added (not on every streamed token,
- // so the user can scroll up to review history while the answer streams).
+ // A new turn refocuses the latest (null = follow latest).
useEffect(() => {
- endRef.current?.scrollIntoView({ behavior: 'smooth' })
+ setActiveId(null)
}, [turns.length])
+ // Autoscroll the stacked view to the newest turn (narrow mode only).
+ useEffect(() => {
+ if (!expanded) endRef.current?.scrollIntoView({ behavior: 'smooth' })
+ }, [turns.length, expanded])
+
if (turns.length === 0) {
return (