Skip to content

fix(prompts): drop the progress count when it cannot move - #752

Merged
gkhngyk merged 1 commit into
mainfrom
feature/volume-progress-no-stalled-count
Aug 20, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
feature/volume-progress-no-stalled-count

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The button still read Analyzing 0/10 for the whole run after #751.

#751 gave the run a live progress count and served it from GET /status/:brandId as done. The client, though, treated a missing done as analyzed — the number of rows in prompt_volumes. Since #749 those rows are all written in one go at the very end of the run, so that number is zero for the entire wait and then jumps to the total. Against a server that does not send done, the page therefore showed a count frozen at 0/N, which is exactly the symptom #751 set out to remove.

Rows on disk are not a stand-in for progress. When the status response carries no live figure, the count is now left out and the button reads Analyzing... — less information, but nothing false. When the figure is there, it is shown and it moves.

done is typed number | null so the difference between "no live progress reported" and "zero prompts done so far" cannot be collapsed again.

Why this matters beyond the immediate bug

The web app and the API server deploy separately. This makes the page correct against a server that predates the live count, rather than requiring the two to land together — the mismatch is what produced the stalled 0/10 in the first place.

Related issue

None — reported directly from testing.

Type of change

  • fix — Bug fix

How to test

Against a server with the live count (done present): start an analysis on a brand with several unanalyzed prompts. Expected: Analyzing 1/10, 4/10, … climbing, as after #751.

Against a server without it: start the same analysis. Expected: Analyzing... with the spinner, and no number — previously Analyzing 0/10 for the whole run.

In both cases the button stays disabled for the duration, survives a page refresh, and returns to normal when the run ends.

Verification already done

  • yarn typecheck and yarn format:check pass from web/.
  • Server is untouched: this is two files in web/, no API change.

Not re-run locally: yarn build. The change is a nullable field and one conditional, both covered by typecheck; CI runs format, lint and typecheck on a clean checkout.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/)
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

A server that does not report live progress left the button reading
"Analyzing 0/10" for the whole run. The client was falling back to the number
of rows on disk, and those are all written in one go at the very end — so the
count sat at zero and then jumped to the total.

Rows on disk are not a stand-in for progress. When the status response carries
no live figure the count is left out entirely and the button reads
"Analyzing...", which says less but nothing false. When the figure is there it
is shown and it moves.

This is what the page shows against a server predating the live count, so the
two do not have to ship together.
@gkhngyk
gkhngyk merged commit 0faf932 into main Aug 20, 2026
6 checks passed
@gkhngyk
gkhngyk deleted the feature/volume-progress-no-stalled-count branch August 20, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant