project-nomad/admin/app/controllers
Chris 374ccda92a feat(drug-reference): rework into an opt-in medicine-standard tier dataset
Reshapes the offline FDA drug reference from a built-in feature into curated
content installed by selecting the Medicine / Standard tier, per maintainer
direction.

- install-state: the ingest writes an installed_resources 'dataset' row on
  ready (version = the openFDA export_date), threaded installer to download to
  ingest; the tier-status math and the home-tile gate read it. Manual ingests
  write no row, so install-state stays tied to the curated path.
- manifest: declare the dataset in the medicine-standard tier (runtime fetches
  the remote manifest, so this also needs to land upstream).
- install-gating: the drug-reference home tiles render only when installed.
- uninstall: DrugReferenceService.uninstall() stops the two drug queues, deletes
  the on-disk parts, truncates drug_labels (schema kept), clears the KV markers,
  and drops the install row. Best-effort, logged, scoped to drug data only.
- downloads: the download phase reports the canonical {percent, downloadedBytes,
  totalBytes} shape as one drug-data card in the Active Downloads aggregator with
  cancel/remove; the heavy ingest stays in the IngestStatus surface with an
  Indexing handoff on the card.
- auto-update: a daily DrugAutoUpdateJob compares the manifest export_date and
  re-downloads when newer, gated on installed + no active job.

typecheck clean; the drug standalone suites pass. Three points are flagged in
code for the maintainer: the InstalledResource 'dataset' approach, the tier
home, and the export_date string format.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 17:41:29 -05:00
..
benchmark_controller.ts fix(security): SSRF validation for map downloads and error sanitization (CWE-918, CWE-209) (#552) 2026-04-21 14:26:28 -07:00
chats_controller.ts fix(security): SSRF validation for map downloads and error sanitization (CWE-918, CWE-209) (#552) 2026-04-21 14:26:28 -07:00
collection_updates_controller.ts fix(security): path traversal and SSRF protections from pre-launch audit 2026-03-11 14:08:09 -07:00
conditions_controller.ts feat(drug-reference): offline FDA drug labels, conditions, and remedies 2026-06-23 07:14:34 -05:00
docs_controller.ts fix(Docs): fix doc rendering 2025-07-11 15:31:07 -07:00
downloads_controller.ts feat(downloads): rich progress, friendly names, cancel, and live status (#554) 2026-04-03 14:26:50 -07:00
drug_reference_controller.ts feat(drug-reference): rework into an opt-in medicine-standard tier dataset 2026-06-24 17:41:29 -05:00
easy_setup_controller.ts feat(AI): enable remote AI chat host 2026-04-03 14:26:50 -07:00
home_controller.ts feat(drug-reference): rework into an opt-in medicine-standard tier dataset 2026-06-24 17:41:29 -05:00
maps_controller.ts feat(Maps): regional map downloads via go-pmtiles extract (#780) 2026-05-20 10:16:00 -07:00
ollama_controller.ts fix(rag): improve context-reliance hedging and use heading metadata at query time 2026-06-23 04:46:43 +00:00
rag_controller.ts feat(RAG): adds the ability to cancel all embedding jobs (#1034) 2026-06-23 04:47:11 +00:00
settings_controller.ts feat: configurable internet test url override in new Advanced Settings page 2026-06-23 04:47:10 +00:00
supply_depot_controller.ts feat: supply depot 2026-06-23 04:46:45 +00:00
system_controller.ts feat(supply-depot): add uninstall for curated apps (#1006) 2026-06-23 04:47:05 +00:00
zim_controller.ts feat(zim): add zim uploader in content manager 2026-06-23 04:47:08 +00:00