BLAST results page — restore DB metadata rows¶
Motivation¶
User report: "DB sequences, DB letters, DB snapshot 정보가 blast 결과에
누락되었어. 플래그 설정이 false 로 된것 같은데". The BLAST results page
(/blast/jobs/:jobId) header had stopped rendering the database metadata
rows (DB title, DB description, DB molecule / DB updated,
DB sequences / DB letters, DB snapshot) — they were silently empty for
every job, regardless of whether the underlying .njs metadata existed in
the workload Storage account.
Root cause¶
The polling/detail-latency hardening done on 2026-05-21
(2026-05-21-blast-status-latency.md)
flipped useBlastResultsState.jobQuery to call
blastApi.getJob(jobId, { includeDatabaseMetadata: false }) so the 3–5 s
poll stays cheap. Resolving database metadata on every poll round-trips to
Azure Storage ({db}/{db}.njs + {db}-metadata.json reads via
api.services.blast_db_metadata.resolve_database_display_metadata) and was
the biggest single cost in that path.
That change correctly cut poll latency, but BlastResults.tsx was still
reading the metadata exclusively from the polling response
(databaseMetadata={job?.database_metadata ?? null}). Because the polling
query now intentionally omits the field, BlastJobHeader permanently sees
databaseMetadata == null and skips the gated rows:
databaseMetadata?.title→ "DB title"databaseMetadata?.description→ "DB description"databaseMetadata?.molecule_type || update_date→ "DB molecule" / "DB updated"dbSequenceCount || dbLetterCount(databaseMetadata.number_of_sequences/letters) → "DB sequences" / "DB letters"databaseMetadata?.source_version→ "DB snapshot"
So the "flag" that was effectively false was
include_database_metadata=false on the polling endpoint — not a Vite
feature flag.
Change¶
Frontend-only. The polling query stays light; metadata is fetched once via
a sibling React Query with staleTime: Infinity and no refetch triggers.
web/src/pages/blastResults/useBlastResultsState.ts- Added
databaseMetadataQuerythat callsblastApi.getJob(jobId, { includeDatabaseMetadata: true })exactly once per page load, withstaleTime: Number.POSITIVE_INFINITY,gcTime: 1h,refetchOnWindowFocus/Reconnect: false,refetchInterval: false. - Exposed
databaseMetadata = databaseMetadataQuery.data?.database_metadata ?? job?.database_metadata ?? nullon the hook return. web/src/pages/BlastResults.tsx<BlastJobHeader databaseMetadata={state.databaseMetadata} />instead of reading off the pollingjobdirectly.
No backend changes. The
include_database_metadata=true code path on /api/blast/jobs/{job_id}
already exists and is the default; it was just no longer being requested
by the SPA.
Validation¶
cd web && npm run build→✓ built in 10.37s, no TypeScript errors.get_errorsclean on both touched files.- Behaviour is reproducible in the browser by opening
http://127.0.0.1:8090/blast/jobs/<id>for any job whose database has.njs/-metadata.jsonblobs inblast-db/(e.g. thecore_nt/core_nt_shard_*jobs the repo memory references): the header now shows the full "DB title / DB description / DB molecule / DB updated / DB sequences / DB letters / DB snapshot" block again while the 5 s poll keeps returning the lightweight payload.
Rollback¶
git revert the single commit that ships these two file edits — there
is no schema or backend change to undo.
Out of scope¶
- The
getJobendpoint itself, theinclude_database_metadataquery param, and the polling cadence — unchanged. - Other consumers of
BlastJobSummary.database_metadata(e.g. external/legacy jobs path,_external_to_blast_job) — unchanged; they already passinclude_database_metadata=Trueby default. - No Azure redeploy required.