diff --git a/frontend/src/pages/TreeNavigationPage.tsx b/frontend/src/pages/TreeNavigationPage.tsx index aacd3820..c6e3199a 100644 --- a/frontend/src/pages/TreeNavigationPage.tsx +++ b/frontend/src/pages/TreeNavigationPage.tsx @@ -7,7 +7,7 @@ import type { CustomStepDraft } from '@/components/step-library/CustomStepModal' import { cn } from '@/lib/utils' import { MarkdownContent } from '@/components/ui/MarkdownContent' import { CustomStepModal } from '@/components/step-library/CustomStepModal' -import { PostStepActionModal, ContinuationModal, ForkTreeModal, type DescendantNode } from '@/components/session' +import { PostStepActionModal, ContinuationModal, ForkTreeModal, ScratchpadSidebar, type DescendantNode } from '@/components/session' import { Plus, CheckCircle, ArrowRight } from 'lucide-react' interface LocationState { @@ -56,6 +56,12 @@ export function TreeNavigationPage() { // Fork flow const [showForkModal, setShowForkModal] = useState(false) + // Scratchpad save handler + const handleScratchpadSave = async (content: string) => { + if (!session) return + await sessionsApi.updateScratchpad(session.id, content) + } + useEffect(() => { if (treeId) { loadTreeAndSession() @@ -630,7 +636,10 @@ export function TreeNavigationPage() { } return ( -
+
+ {/* Main Content */} +
+
{/* Header */}
@@ -1006,6 +1015,17 @@ export function TreeNavigationPage() { onFork={handleForkTree} onSkip={handleSkipFork} /> +
+
+ + {/* Scratchpad Sidebar */} + {session && ( + + )}
) }