Repository navigation
Description
Problem
Opening Workflows > <workflow> > User Metadata shows no loading indicator while summary/details are being decoded (codec server round-trip via decodePayloadAndParseDataToJSON), and the Current Details panel (backed by the __temporal_workflow_metadata query, e.g. /api/v1/namespaces/<ns>/workflows/<id>/query/__temporal_workflow_metadata) renders blank while the query is in flight — no spinner, no skeleton, nothing.
Root cause:
src/lib/layouts/workflow-run-layout.svelteawaitsdecodeWorkflowUserMetadata()before setting$workflowRun.workflow, so a slow codec server blocks the entire workflow page behind the generic skeleton.- Even once rendered,
src/lib/stores/workflow-run.tsinitialisesuserMetadataas{ summary: '', details: '' }, so the store cannot distinguish "loading" from "loaded empty" —src/lib/components/user-metadata.svelte({#if summary} … {:else} No Summary Available) can render the empty state during decoding. - The
User Metadatapage has noloadingflag, no<Loading />, no{#await}pending block — unlike e.g.src/lib/pages/batch-operations.svelte({#await listBatchOperations …} <Loading />). Same for the Current Details panel: itsloadingflag exists but was never wired into the markup.
Impact — why this matters
On Temporal Cloud this query/decode path is slow, and without a loader it is impossible to tell "still loading" from "no metadata available". So you cannot move on — you keep waiting to see if anything is going to appear. A loader resolves the ambiguity: spinner means wait, the empty state means there is genuinely nothing there and you can move on. The missing loader wastes real triage time on every workflow inspection.
Reproduction (before fix)
Recorded against a mock workflow with sample Current Details data and a simulated slow query: Summary/Details render, but the Current Details panel sits blank until the query resolves. (Before video attached below.)
before-current-details-loading.mp4
Suggested fix
- Add
userMetadataLoading: booleantoWorkflowRunWithWorkers(mirrors existingworkersLoaded), initialised totrue. - Render the workflow immediately and decode user metadata in the background (don't block first render on the codec round-trip), setting the flag
falsein afinallywith a run-identity guard against stale writes after navigation. - Render
<Loading />insrc/lib/pages/workflow-user-metadata.sveltewhileuserMetadataLoadingis true, and in the Current Details panel while its query is pending with nothing to show yet.
Fix proposed in #4209.
Activity
fix(ui): show loader on User Metadata tab while decoding