Task ID: 8d169dae-68d5-46cb-9f9c-d6b391936cbb Layer: [Forge] / [UI] Priority: 95
Fix the /notebooks endpoint which is returning a 500 Internal Server Error due to missing database columns. The route handler expects columns that don't exist in the notebooks table schema.
The notebooks table schema is incomplete. The route handler in api.py:1516 queries for:
associated_analysis_id (actual column: analysis_id)associated_entities (missing)rendered_html_path (missing)description (missing)id, title, path, analysis_id, created_atnotebooks table~~ (already present)/notebooks endpoint returns 200 OK/notebooksnotebooks table schemadescription TEXTassociated_entities TEXT (JSON array of entity names)rendered_html_path TEXT
api.py line 1519 from n.associated_analysis_id to n.analysis_idcurl http://localhost/notebooks should return 200sqlite3.OperationalError: no such column: n.associated_analysis_id in API logs (from 20:49 timeframe)/notebooks endpoint now returns 200 OKid, title, description, created_at, associated_analysis_id, associated_entities, rendered_html_pathassociated_analysis_id to match database schemaTask was reopened due to missing task_runs row. Re-verified all acceptance criteria:
Evidence:
/notebooks returns 200 (default, cached, trailing slash, sort_by=title/analyses, tag filter — all 200)/api/notebooks returns 200; /api/notebooks/{id} returns 200 for real notebook IDsnotebooks table has all 9 required columns: id, title, description, created_at, associated_analysis_id, associated_entities, rendered_html_path, tags, is_spotlight (34 columns total)api.py:1313 catches unhandled errors and returns styled 500 pagesRoot cause was already fixed: Missing columns were added to the notebooks table by a prior migration. The route handler code correctly references associated_analysis_id matching the actual column name. No code changes needed — the fix is in the database schema, not in api.py.
Verdict: Task already resolved on main. Closing as verified pass.