[UI] Add styled 404 error page with navigation done

← UI
Currently 404 errors show raw JSON: {"detail":"Not Found"}. Add a custom exception handler that returns a styled HTML 404 page with SciDEX branding, navigation, and helpful links back to main pages. Important for demo polish. ## REOPENED TASK — CRITICAL CONTEXT This task was previously marked 'done' but the audit could not verify the work actually landed on main. The original work may have been: - Lost to an orphan branch / failed push - Only a spec-file edit (no code changes) - Already addressed by other agents in the meantime - Made obsolete by subsequent work **Before doing anything else:** 1. **Re-evaluate the task in light of CURRENT main state.** Read the spec and the relevant files on origin/main NOW. The original task may have been written against a state of the code that no longer exists. 2. **Verify the task still advances SciDEX's aims.** If the system has evolved past the need for this work (different architecture, different priorities), close the task with reason "obsolete: " instead of doing it. 3. **Check if it's already done.** Run `git log --grep=''` and read the related commits. If real work landed, complete the task with `--no-sha-check --summary 'Already done in '`. 4. **Make sure your changes don't regress recent functionality.** Many agents have been working on this codebase. Before committing, run `git log --since='24 hours ago' -- ` to see what changed in your area, and verify you don't undo any of it. 5. **Stay scoped.** Only do what this specific task asks for. Do not refactor, do not "fix" unrelated issues, do not add features that weren't requested. Scope creep at this point is regression risk. If you cannot do this task safely (because it would regress, conflict with current direction, or the requirements no longer apply), escalate via `orchestra escalate` with a clear explanation instead of committing.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (3)

Squash merge: orchestra/task/dec65421-add-styled-404-error-page-with-navigatio (1 commits)2026-04-20
Squash merge: orchestra/task/dec65421-add-styled-404-error-page-with-navigatio (1 commits)2026-04-20
[UI] Add styled 404 error page with navigation [task:dec65421-e6db-4ef8-a9ef-dbbc2a8b6be8]2026-04-02
Spec File

Spec: Styled 404 Error Page

Task ID: dec65421-e6db-4ef8-a9ef-dbbc2a8b6be8 Priority: P88 Layer: [UI]

Goal

Replace raw JSON 404 responses with a styled HTML page for browser requests. API requests continue to get JSON.

Acceptance Criteria

☑ Browser requests to non-existent pages get styled 404 page
☑ API requests (Accept: application/json or /api/* paths) still get JSON
☑ 404 page shows SciDEX branding with gradient heading
☑ Navigation links to main pages (Dashboard, Exchange, Analyses, Wiki, Graph, Demo)
☑ Shows requested path for debugging

Work Log

2026-04-02 11:40 PT — Slot 11

  • Added @app.exception_handler(404) with HTML/JSON branching
  • Styled page with gradient 404 heading, helpful links, requested path display
  • Verified syntax

2026-04-20 00:45 PT — Slot 12 (Verify)

Already Resolved — 2026-04-20T00:45:00Z

Evidence: Inspected origin/main:api.py@app.exception_handler(404) with HTML/JSON branching is present at lines covering styled 404 page with gradient heading, navigation links (Dashboard, Exchange, Analyses, Wiki, Graph, Demo), and requested path display.

Commit that landed it: ae48a90ceb7685bef717bd7e426e1af4628a8cf3 Summary: Already addressed by prior commit; handler is live on main.

Payload JSON
{
  "_reset_note": "This task was reset after a database incident on 2026-04-17.\n\n**Context:** SciDEX migrated from SQLite to PostgreSQL after recurring DB\ncorruption. Some work done during Apr 16-17 may have been lost.\n\n**Before starting work:**\n1. Check if the task's goal is ALREADY satisfied (run the relevant checks)\n2. Check `git log --all --grep=task:YOUR_TASK_ID` for prior commits\n3. If complete, verify and mark done. If partial, continue. If not done, proceed.\n\n**DB change:** SciDEX now uses PostgreSQL. `get_db()` auto-detects via\nSCIDEX_DB_BACKEND=postgres env var.",
  "_reset_at": "2026-04-18T06:29:22.046013+00:00",
  "_reset_from_status": "done"
}

Sibling Tasks in Quest (UI) ↗