project-nomad/admin/app/controllers
Chris a8125405eb
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-07-21 17:30:38 +00:00
..
benchmark_controller.ts feat(benchmark): dashboard re-run banner prompting a Score v2 re-run (#1096) 2026-07-21 09:36:14 -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-07-21 17:29:50 +00:00
creator_packs_controller.ts feat(creator-packs): gated per-creator video packs, offline via Kiwix (#1106) 2026-07-20 16:21:18 -07:00
docs_controller.ts fix(Docs): fix doc rendering 2025-07-11 15:31:07 -07:00
downloads_controller.ts fix(downloads): add retry button and resource download link for failed downloads (#1059) 2026-07-18 09:25:42 -07:00
drug_reference_controller.ts feat(drug-reference): rework into an opt-in medicine-standard tier dataset 2026-07-21 17:30:38 +00: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-07-21 17:30:38 +00:00
maps_controller.ts fix(maps): warn when world basemap missing instead of silent grey map (#1104) 2026-07-20 18:25:39 -07:00
ollama_controller.ts feat(AI): per-model thinking toggle with global default (off) (#1079) 2026-07-20 16:33:09 -07:00
rag_controller.ts feat(rag): add subject/collection organization to knowledge base (#1063) 2026-07-20 15:09:11 -07:00
settings_controller.ts fix(maps): warn when world basemap missing instead of silent grey map (#1104) 2026-07-20 18:25:39 -07: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