[Demo] Replace 0-Experiments stat on demo page with Notebooks count done

← Demo
## 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 (2)

Squash merge: orchestra/task/fbe2795d-replace-0-experiments-stat-on-demo-page (1 commits)2026-04-18
[Demo] Replace 0-Experiments stat with Notebooks count on demo page [task:fbe2795d-545f-4348-9a89-2595dab26374]2026-04-04
Spec File

[Demo] Replace 0-Experiments stat on demo page with Notebooks count

ID: fbe2795d-545 Priority: 85 Type: one_shot Status: open Quest: 16 (Demo Showcase)

Goal

The /demo page currently shows "0: Experiments" prominently in the stats grid because the experiments table is empty. This looks hollow to demo viewers. Also shows "Experiments (0) →" CTA button. Replace with Notebooks count (232) which is a meaningful non-zero stat.

Acceptance Criteria

notebook_count query added to demo route handler
☑ Stat card shows "Notebooks" instead of "Experiments"
☑ CTA button shows "Notebooks (N) →" pointing to /notebooks
☑ Demo page no longer shows any zero stats
☑ Smoke check still passes

Work Log

2026-04-04 10:40 — Started

  • Identified experiment_count = 0 on demo page stat grid (api.py:32877)
  • Also CTA "Experiments (0) →" at api.py:33045
  • Plan: add notebook_count query at ~32341, swap stat card and CTA

Already Resolved — 2026-04-18T04:50:00Z

Verification evidence:

  • git show origin/main:api.py | grep -n "demo_notebook_count" returned:
- Line 61084: demo_notebook_count = db.execute("SELECT COUNT(*) FROM notebooks WHERE status='active'").fetchone()[0]
- Line 61687: <div class="stat-value">{demo_notebook_count}</div><div class="stat-label">Notebooks</div>
- Line 61903: <a href="/notebooks" class="cta-btn cta-yellow">Notebooks ({demo_notebook_count}) &rarr;</a>
  • No "Experiments (0)" or "experiment_count" found on demo route in origin/main

All acceptance criteria met on origin/main:
☑ notebook_count query added to demo route handler
☑ Stat card shows "Notebooks" instead of "Experiments"
☑ CTA button shows "Notebooks (N) →" pointing to /notebooks
☑ Demo page no longer shows any zero stats (confirmed via code inspection)
☑ Smoke check passes (API confirmed healthy via prior verify tasks)

Commit: 6f9645c32 (on task branches, merged via squash to origin/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 (Demo) ↗

Effectiveness Metrics

+0Lines Added
-0Lines Removed
0Files Modified
340Hypotheses
13128KG Edges
679Papers
50,000.0Tokens Spent
75278.0Impact Score
1505.560Effectiveness