Task ID: experiment-extras-followups-2026-05-18
Layer: Atlas (artifact_detail)
Date: 2026-05-18
Status: open — follow-up to experiment-artifact-extras-2026-05-13
Priority: medium (enhancements; no broken behavior)
v1 carve-out: user-authorized; v1 still serves scidex.ai
PR #1413 ported the high-value sections of the deleted experiment_detail
handler into _render_experiment_extras_html (api.py:31062). Three
capabilities from the old handler were deliberately deferred (low value
or no data today), plus one cleanup item. Capture here so they are not
lost. Each is small and independently shippable; gate every section on
its own data so empty experiments render nothing (consistent with the
existing helper).
The old handler resolved linked hypotheses two ways and rendered them
with expand/collapse: (a) from experiments.hypothesis_ids (JSON array),
(b) fallback SELECT … FROM hypotheses WHERE target_gene = %s LIMIT 5.
The current artifact experiment branch lists hypothesis ids inline but
not as a scored, titled, collapsible panel with composite scores. Add a
"Related Hypotheses" section to _render_experiment_extras_html (cards
linking /artifact/<hyp_id>, show title + composite_score, "Show N
more" toggle past 5). Tables/cols: hypotheses(id, title,,
composite_score, disease)experiments.hypothesis_ids, target_gene.
The old handler queried experiment_debates JOIN debate_sessions and
rendered linked session cards (/debates/<session_id>,
question + date). experiment_debates currently has 0 rows, so this
renders nothing today — but the join is cheap and the section
self-hides when empty, so it is safe to add now and will light up when
debates are wired to experiments. Cols: experiment_debates(role,,
score_before, score_after, debate_session_id)debate_sessions(id, question, num_rounds, debate_type, created_at).
A one-paragraph templated narrative the old handler showed above the
fold ("{type} experiment designed to {validate|challenge|discover}…
targeting {target_gene} in {model_system}. Primary outcome: …"). Pure
string assembly from experiments.experiment_type / target_gene / — no extra query. Optional; include only
model_system / primary_outcome
if it reads well next to the metadata grid rather than duplicating it.
Functional but every singular /experiment/<id> link costs one 301 hop
into /artifact/<id>:
api_routes/pantheon_routes.py:416 and :422 —"experiment": "/experiment/{cid}" and"experiments": "/experiment/{cid}" → point at /artifact/{cid}.
/experiment/<id> link generators in api.py (e.g._canonicalize_local_url api.py:30058, the artifact-type→URL lambdas/artifact/<id> removes_render_experiment_extras_html conventions).
/artifact/<id> with no 301.