Complete Phase 2: Frontend implementation with React + TypeScript

Frontend Features:
- React 18 + Vite + TypeScript + Tailwind CSS + Zustand
- JWT authentication with automatic token refresh
- Tree library with search and category filtering
- Full tree navigation (decision/action/solution nodes)
- Session management with notes and completion
- Session history with export (Markdown/Text/HTML)
- ErrorBoundary for graceful error handling

Backend Fixes:
- CORS: Added port 5174 to allowed origins
- Sessions: Fixed JSONB datetime serialization (mode='json')

Documentation:
- Updated PROGRESS.md with Phase 2 completion
- Updated 03-DEVELOPMENT-ROADMAP.md with checked items
- Added PHASE-2.5-PERSONAL-BRANCHING.md spec

Seed Data:
- Added backend/scripts/seed_data.py with Password Reset tree

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-01-27 22:42:22 -05:00
parent 7d96807fb1
commit cd10ecd42c
51 changed files with 9014 additions and 111 deletions

View File

@@ -0,0 +1,51 @@
import apiClient from './client'
import type { Session, SessionCreate, SessionUpdate, SessionExport } from '@/types'
export interface SessionListParams {
page?: number
size?: number
tree_id?: string
completed?: boolean
}
export interface SessionListResponse {
items: Session[]
total: number
page: number
size: number
pages: number
}
export const sessionsApi = {
async list(params?: SessionListParams): Promise<Session[]> {
const response = await apiClient.get<Session[]>('/sessions', { params })
return response.data
},
async get(id: string): Promise<Session> {
const response = await apiClient.get<Session>(`/sessions/${id}`)
return response.data
},
async create(data: SessionCreate): Promise<Session> {
const response = await apiClient.post<Session>('/sessions', data)
return response.data
},
async update(id: string, data: SessionUpdate): Promise<Session> {
const response = await apiClient.put<Session>(`/sessions/${id}`, data)
return response.data
},
async complete(id: string): Promise<Session> {
const response = await apiClient.post<Session>(`/sessions/${id}/complete`)
return response.data
},
async export(id: string, options: SessionExport): Promise<string> {
const response = await apiClient.post<string>(`/sessions/${id}/export`, options)
return response.data
},
}
export default sessionsApi