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:
@@ -138,14 +138,8 @@ async def update_session(
|
||||
detail="Cannot update a completed session"
|
||||
)
|
||||
|
||||
update_data = session_data.model_dump(exclude_unset=True)
|
||||
|
||||
# Convert DecisionRecord objects to dicts if present
|
||||
if "decisions" in update_data and update_data["decisions"]:
|
||||
update_data["decisions"] = [
|
||||
d.model_dump() if hasattr(d, 'model_dump') else d
|
||||
for d in update_data["decisions"]
|
||||
]
|
||||
# Use mode='json' to ensure datetime fields are serialized as ISO strings for JSONB storage
|
||||
update_data = session_data.model_dump(exclude_unset=True, mode='json')
|
||||
|
||||
for field, value in update_data.items():
|
||||
setattr(session, field, value)
|
||||
|
||||
@@ -22,7 +22,7 @@ class Settings(BaseSettings):
|
||||
BCRYPT_ROUNDS: int = 12
|
||||
|
||||
# CORS
|
||||
CORS_ORIGINS: list[str] = ["http://localhost:3000", "http://localhost:5173"]
|
||||
CORS_ORIGINS: list[str] = ["http://localhost:3000", "http://localhost:5173", "http://localhost:5174"]
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
Reference in New Issue
Block a user