Effort: thorough
Mirror the per-disease landing pattern at the gene/protein granularity.
A researcher landing on /gene/MAPT, /protein/TREM2, or
/target/APOE should see one synthesized page that joins every
SciDEX layer's data about that target: hypotheses, debates, markets,
proteins-in-trials, notebooks, structural data (AlphaFold), STRING
neighbors, ChEMBL ligands, recent papers, ongoing challenges, and a
"what changed this week" strip.
Currently /genes/{name} (api.py:61418) is just a 301 to
/wiki/genes-<name> and shows a static prose page. We have rich
per-target data scattered across targets, papers, hypotheses,
debate_sessions, markets, artifacts, and the Forge tools
(alphafold-structure, chembl-drug-targets, string-protein-interactions,
uniprot-protein-info) but nobody has joined them.
GET /target-landing/{symbol} in api.py. Updates the/genes/{name} and /proteins/{name} 301 handlersapi.py:61418-61434) to also render a "Live target view"/target-landing/{name}.
register_dashboard slugtarget-landing-<symbol>. Eager seeding scriptscripts/seed_target_landing_dashboards.py for the top-30target_meta — targets row joined to wiki_pages forlinked_hypotheses — hypotheses joined viahypothesis_entities on the target gene/protein, ordered bycomposite_score DESC, top 10.target_debates — debate_sessions referencing thosetarget_markets — markets joined on those hypothesis ids.clinical_trials — JSONB unnest of targets.clinical_trialstargets, not a standalonetop_papers — papers WHERE %s = ANY(genes_mentioned) (orpaper_entities), top 10 by citation_count.recent_artifacts — artifacts linked via artifact_linksexternal_signals — cached results from the alphafold,chembl-drug-targets, string-protein-interactions, andgtex-tissue-expression tools (call once per registration viatools.py wrappers, cache the JSON inmetadata.external_signals_cache with a 24h TTL — re-renderrender.template = new target_landing.html template added to_TEMPLATES. Layout:cache_ttl_seconds=900 for the dashboard; external_signals_cachetools.alphafold_structure /tools.chembl_drug_targets. Asserts every panel populates.
/target-landing/MAPT, /target-landing/TREM2targets schema (SELECT column_name FROMclinical_trials JSONB shape used in the AD-landscape work log.
hypothesis_entities or entity_links).
scripts/seed_target_landing_dashboards.py. Cache output, don't_validate_query budget).
target_landing.html template alongside landscape_heatmap.html.q-synth-disease-landing (sibling) — establishes landing-pagee352460b-2d76 — view_spec_json DSL.alphafold-structure, chembl-drug-targets,string-protein-interactions, gtex-tissue-expression — alltools.py.Commit: fdb67ee20
Implemented the per-target landing page with the following components:
api.py:61972): Added GET /target-landing/{symbol} route that queries:target_meta from targets joined with wiki_pageslinked_hypotheses (top 10 by composite_score)target_debates (debate sessions for linked hypotheses, last 90 days)target_markets (active markets for linked hypotheses)clinical_trials (from targets.clinical_trials JSONB)top_papers (papers mentioning the gene symbol)recent_artifacts (artifacts linked to hypotheses, last 30 days)api.py:61924, 61954): Updated /genes/{name} and /proteins/{name} handlers to show a "Live target view available" banner with a link to /target-landing/{symbol}.scidex/senate/dashboard_engine.py): Added evaluate_view_spec function used by the target landing page template rendering.scripts/seed_target_landing_dashboards.py): Eager seeding for top-30 neuro-relevant genes with 8 data sources and 900s cache TTL.tests/test_target_landing.py): 7 tests covering template registration, key sections, view spec validation, query validation, and rendering with seeded data.forge_skill_router_page (origin/main's addition).Status: All 17 tests pass (7 target_landing + 10 skill_router).