Skip to content

Commit 0815053

Browse files
michael-borckclaude
andcommitted
Implement complete session management and file operations frontend (tasks 7.2-7.3)
Add comprehensive file operations and session management UI components: - useFileOperations hook with save/load/export functionality - FileOperations modal with format selection and file picker dialogs - useSessionManagement hook for complete session CRUD operations - SessionBrowser component with search, filtering, and organization - SessionHistory component with timeline view and activity tracking - Full integration into main App with dropdown menu navigation - Session actions: open, duplicate, delete, favorite, tag management - Project organization with tags, favorites, and content type filtering 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 05d77d2 commit 0815053

File tree

8 files changed

+2348
-51
lines changed

8 files changed

+2348
-51
lines changed

src/App.tsx

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import { LiveContentPreview } from './components/LiveContentPreview';
88
import { ProgressIndicator } from './components/ProgressIndicator';
99
import { StatusFeedback, useStatusFeedback } from './components/StatusFeedback';
1010
import { LLMProviderSetup } from './components/LLMProviderSetup';
11+
import { FileOperations } from './components/FileOperations';
12+
import { SessionBrowser } from './components/SessionBrowser';
13+
import { SessionHistory } from './components/SessionHistory';
1114
import { useLLM } from './hooks/useLLM';
1215
import { crossSessionLearning } from './utils/crossSessionLearning';
1316
import { generationManager } from './utils/generationManager';
@@ -66,6 +69,11 @@ function App() {
6669
const [generationProgress, setGenerationProgress] = useState<GenerationProgress | null>(null);
6770
const [showProgress, setShowProgress] = useState(false);
6871
const [showLLMSetup, setShowLLMSetup] = useState(false);
72+
const [showFileOperations, setShowFileOperations] = useState(false);
73+
const [showSessionBrowser, setShowSessionBrowser] = useState(false);
74+
const [showSessionHistory, setShowSessionHistory] = useState(false);
75+
const [showSessionsMenu, setShowSessionsMenu] = useState(false);
76+
const [currentSessionId, setCurrentSessionId] = useState<string | null>(null);
6977

7078
// Initialize session tracking on component mount
7179
useEffect(() => {
@@ -1453,6 +1461,97 @@ function App() {
14531461
>
14541462
{llm.hasAvailableProvider ? '🤖 LLM Ready' : '⚠️ Setup LLM'}
14551463
</button>
1464+
<div style={{ position: 'relative' }}>
1465+
<button
1466+
onClick={() => setShowSessionsMenu(!showSessionsMenu)}
1467+
style={{
1468+
padding: '8px 12px',
1469+
border: '1px solid #d1d5db',
1470+
backgroundColor: 'white',
1471+
color: '#64748b',
1472+
borderRadius: '6px',
1473+
cursor: 'pointer',
1474+
fontSize: '14px',
1475+
display: 'flex',
1476+
alignItems: 'center',
1477+
gap: '4px'
1478+
}}
1479+
>
1480+
📁 Sessions ▼
1481+
</button>
1482+
{showSessionsMenu && (
1483+
<div style={{
1484+
position: 'absolute',
1485+
top: '100%',
1486+
left: 0,
1487+
background: 'white',
1488+
border: '1px solid #e2e8f0',
1489+
borderRadius: '8px',
1490+
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)',
1491+
padding: '8px 0',
1492+
minWidth: '160px',
1493+
zIndex: 1000
1494+
}}>
1495+
<button
1496+
onClick={() => {
1497+
setShowSessionBrowser(true);
1498+
setShowSessionsMenu(false);
1499+
}}
1500+
style={{
1501+
width: '100%',
1502+
padding: '8px 16px',
1503+
border: 'none',
1504+
background: 'none',
1505+
textAlign: 'left',
1506+
cursor: 'pointer',
1507+
fontSize: '14px',
1508+
color: '#374151'
1509+
}}
1510+
onMouseEnter={(e) => e.currentTarget.style.backgroundColor = '#f3f4f6'}
1511+
onMouseLeave={(e) => e.currentTarget.style.backgroundColor = 'transparent'}
1512+
>
1513+
📁 Browse Sessions
1514+
</button>
1515+
<button
1516+
onClick={() => {
1517+
setShowSessionHistory(true);
1518+
setShowSessionsMenu(false);
1519+
}}
1520+
style={{
1521+
width: '100%',
1522+
padding: '8px 16px',
1523+
border: 'none',
1524+
background: 'none',
1525+
textAlign: 'left',
1526+
cursor: 'pointer',
1527+
fontSize: '14px',
1528+
color: '#374151'
1529+
}}
1530+
onMouseEnter={(e) => e.currentTarget.style.backgroundColor = '#f3f4f6'}
1531+
onMouseLeave={(e) => e.currentTarget.style.backgroundColor = 'transparent'}
1532+
>
1533+
📅 Session History
1534+
</button>
1535+
</div>
1536+
)}
1537+
</div>
1538+
<button
1539+
onClick={() => setShowFileOperations(true)}
1540+
style={{
1541+
padding: '8px 12px',
1542+
border: '1px solid #d1d5db',
1543+
backgroundColor: 'white',
1544+
color: '#64748b',
1545+
borderRadius: '6px',
1546+
cursor: 'pointer',
1547+
fontSize: '14px',
1548+
display: 'flex',
1549+
alignItems: 'center',
1550+
gap: '4px'
1551+
}}
1552+
>
1553+
💾 File
1554+
</button>
14561555
<button
14571556
onClick={() => setShowSettings(true)}
14581557
style={{
@@ -1846,6 +1945,35 @@ function App() {
18461945
}}
18471946
/>
18481947

1948+
{/* File Operations */}
1949+
<FileOperations
1950+
isOpen={showFileOperations}
1951+
onClose={() => setShowFileOperations(false)}
1952+
sessionId={currentSessionId}
1953+
/>
1954+
1955+
{/* Session Browser */}
1956+
<SessionBrowser
1957+
isOpen={showSessionBrowser}
1958+
onClose={() => setShowSessionBrowser(false)}
1959+
onSessionSelect={(sessionId) => {
1960+
setCurrentSessionId(sessionId);
1961+
setShowSessionBrowser(false);
1962+
statusFeedback.showSuccess('Session Loaded', `Switched to session ${sessionId}`, 3000);
1963+
}}
1964+
/>
1965+
1966+
{/* Session History */}
1967+
<SessionHistory
1968+
isOpen={showSessionHistory}
1969+
onClose={() => setShowSessionHistory(false)}
1970+
onSessionSelect={(sessionId) => {
1971+
setCurrentSessionId(sessionId);
1972+
setShowSessionHistory(false);
1973+
statusFeedback.showSuccess('Session Loaded', `Switched to session ${sessionId}`, 3000);
1974+
}}
1975+
/>
1976+
18491977
{/* Status Feedback */}
18501978
<StatusFeedback
18511979
messages={statusFeedback.messages}

0 commit comments

Comments
 (0)