Fix Missing /notebooks Route Handler (500 Error)
Task ID: ff1cf64e-13b3-463c-b6a2-63a4346cd6fc
Layer: [Atlas]
Priority: P95
Goal
Fix the 500 error on /notebooks route by creating the missing notebooks database table. The route handler exists in api.py and is fully implemented, but the underlying database table is missing, causing database query failures.
Acceptance Criteria
☑ notebooks table exists in PostgreSQL with proper schema
☑ /notebooks route returns 200 status code
☑ Page renders correctly (empty state or with notebook entries)
☑ All notebook-related routes work: /notebooks, /notebook/{id}, /api/notebooks
☑ Changes committed and pushed
Approach
Run the existing migration script add_notebooks_table.py to create the notebooks table
Verify the table was created successfully
Test the /notebooks route with curl
Verify the page renders correctly
Test related notebook routes
Commit changesWork Log
2026-04-01 20:45 PT — Slot 5
- Started task: Fix missing /notebooks route causing 500 errors
- Root cause identified:
notebooks table doesn't exist in database
- Found existing migration script at
add_notebooks_table.py
- Created notebooks table with proper schema (id, title, description, associated_analysis_id, associated_entities, file_path, rendered_html_path, timestamps)
- Ran migration on both worktree and main database
- Tested: curl http://localhost/notebooks → 200 ✓
- Tested: curl http://localhost/api/notebooks → 200 ✓
- Verified all key pages still load correctly
- Result: Done — notebooks table created, /notebooks route now working with empty state display