import React from 'react'; import { useSessionStore } from '../store/session'; import { useHistoryStore } from '../store/history'; import { useUIStore } from '../store/ui'; import { useHistory } from '../api/hooks'; export function Header() { const { isLoaded, tableName, rowCount } = useSessionStore(); const { canUndo, canRedo } = useHistoryStore(); const { toggleUploadDialog, toggleSidebar, showSidebar } = useUIStore(); const { undoAction, redoAction } = useHistory(); const handleUndo = async () => { const result = await undoAction(); if (result) useHistoryStore.getState().updateCurrent(result.state_id); }; const handleRedo = async () => { const result = await redoAction(); if (result) useHistoryStore.getState().updateCurrent(result.state_id); }; return (
{/* Left: sidebar toggle + logo + dataset info */}
{isLoaded && ( )}

Visual Notebook

{isLoaded && ( · {tableName} · {rowCount.toLocaleString()} rows )}
{/* Right: undo/redo + new file */}
{isLoaded && ( <>
)}
); }