Frontend result screens: prefix-agnostic + date-aware hints¶
Epic #64, issue #72.
Finding: the data plane was already prefix-agnostic¶
The substantive acceptance — "no component reconstructs storage paths from
job_id; all reads go through backend-provided IDs" — was already satisfied:
downloadResultFile(jobId, fileId, …)hits/blast/jobs/{job_id}/results/{file_id}with the server-provided opaquefile_id(base64 of the full blob name); the backend decodes it.useBlastResultActionsdownloads viafile.file_id.- Files / Alignments / Taxonomy / Graphic / export all consume the manifest's
server-provided
name/file_id. None reconstruct{job_id}/.
So Files/download/export/analytics already work for both flat and dated jobs,
and the "results purged" / empty case is handled by the existing
degraded / empty-manifest UI (no crash).
What changed (the only flat-specific bits: cosmetic hints)¶
Two display-only strings showed a reconstructed flat results/{jobId}/
path, which would be cosmetically wrong for a dated job:
BlastStepTimeline/buildStepLog.tscompletion log ("Results container: …").blastResults/StorageLockedPanel.tsxmanual-browse URL hint (shown only when Storage is network-locked).
Both are now date-aware:
- Backend (
api/services/blast/job_state.py_local_to_blast_job) surfacesresults_prefixin the jobinfrastructureblock (additive; omitted when unset). Flat jobs surface{job_id}/(matches the fallback), dated jobs the date-tiered prefix. - Frontend
blast.types.tsaddsinfrastructure.results_prefix?;buildStepLog(already receivesjob) andStorageLockedPanel(threaded an optionalresultsPrefixfromResultsCard→ResultsBody) prefer it, with a flat{jobId}/fallback.
Validation evidence¶
cd web && npm run build→ green (typecheck of theresults_prefixthreading).npx vitest run src/pages/blastResults src/components/BlastStepTimeline→ 161 + 44 passed.uv run pytest api/tests/test_local_to_blast_job.py→ 47 passed (additiveresults_prefixin the projection is safe).ruff check apiclean.
Self-critique (design pass)¶
- Contract:
results_prefixadditive/optional everywhere; flat fallback when absent; data fetch path unchanged (stillfile_id). ✓ - Security: display-only hints; no SAS, no fetch-path change; the real read
path stays
file_id-validated (#70). ✓ - Diff discipline: an accidental interface-line deletion in
ResultsBodywas caught by re-reading + the build and restored (25 insertions / 2 intended deletions on final audit). ✓ - Verdict: no Critical/High.