[UI] Fix mermaid diagram rendering on hypothesis detail pages done coding:7

← UI
Hypothesis pages contain mermaid code blocks but the mermaid JS library is not loaded, so diagrams render as raw text. Need to: 1) Add mermaid CDN script to hypothesis pages, 2) Parse mermaid code blocks from description markdown, 3) Render them as actual diagrams. 141/149 hypotheses have mermaid diagrams that should be visible. ## 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.

Git Commits (3)

[Agora] Update spec work log: task 8a478e5c already on main via commit 0792975fb [task:8a478e5c-8e3e-49f0-894d-5e969c2fd97f]2026-04-13
[Atlas] Verify mermaid rendering fix already on main via 0792975fb [task:8a478e5c-8e3e-49f0-894d-5e969c2fd97f]2026-04-13
[UI] Fix mermaid diagram rendering on hypothesis detail pages [task:8a478e5c-8e3e-49f0-894d-5e969c2fd97f]2026-04-02
Spec File

[UI] Fix mermaid diagram rendering on hypothesis detail pages

ID: 8a478e5c-8e3 Priority: 98 Type: one_shot Status: complete

Goal

Hypothesis pages contain mermaid code blocks but the mermaid JS library is not loaded, so diagrams render as raw text. Need to: 1) Add mermaid CDN script to hypothesis pages, 2) Parse mermaid code blocks from description markdown, 3) Render them as actual diagrams. 141/149 hypotheses have mermaid diagrams that should be visible.

Acceptance Criteria

☑ Concrete deliverables created
☑ Work log updated with timestamped entry

Work Log

  • 2026-04-02 (SciDEX Bot): Already addressed by commit 0792975fb on origin/main:
- Extract mermaid code blocks before HTML escaping in simple_md_to_html() (lines 1667-1673, 1706-1708)
- Re-insert as <pre class="mermaid"> elements for proper rendering
- Add mermaid v11 CDN script to hypothesis pages (lines 27870, 30848)
- 141/149 hypothesis pathway diagrams render as interactive charts
- Verified: 0792975fb IS an ancestor of origin/main (confirmed via git merge-base)

Payload JSON
{
  "requirements": {
    "coding": 7
  },
  "_stall_skip_providers": [
    "minimax",
    "codex"
  ],
  "_stall_requeued_by": "codex",
  "_stall_requeued_at": "2026-04-14 20:04:13",
  "_stall_skip_at": {
    "codex": "2026-04-14T20:04:13.029002+00:00"
  },
  "_stall_skip_pruned_at": "2026-04-14T10:37:14.022390+00:00"
}

Sibling Tasks in Quest (UI) ↗