Skip to content

fix(results): unblock actions and finish progress for multi-output jobs - #723

Merged
C4illin merged 2 commits into
C4illin:mainfrom
aloneangel45:fix/results-multi-output-completion
Nov 22, 2026
Merged

C4illin merged 2 commits into
C4illin:mainfrom
aloneangel45:fix/results-multi-output-completion

Conversation

@aloneangel45

@aloneangel45 aloneangel45 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #718.

Summary

  • ResultsArticle (src/pages/results.tsx) previously checked files.length !== job.num_files, while job.num_files records the number of input files and multi-page/multi-output conversions insert more than one row per input into file_names. Once files.length > job.num_files, Delete and Tar buttons stayed disabled forever and <progress> stayed indeterminate, causing public/results.js to poll POST /progress/:jobId every second indefinitely.
  • Determine completion with job.status === completed || (job.status !== pending && files.length >= job.num_files) so completed multi-output jobs complete immediately while still keeping actions disabled during an in-progress pending job where one input emits multiple outputs before other inputs finish.
  • Set <progress> max (and value when completed) to Math.max(job.num_files, files.length) so progressElem.value === progressElem.max stops client polling cleanly.
  • Added regression tests in tests/pages/results.test.ts for both completed multi-output jobs (num_files: 1, 3 output rows) and pending multi-input jobs (status: pending).

Verification

  • bun run lint:tsc — No type errors in 52 files
  • bun fmt --check --end-of-line auto src/pages/results.tsx tests/pages/results.test.ts — passed
  • bun run lint:knip — exited 0
  • bun test tests/pages/results.test.ts — all 32 route tests passed (only afterAll temp dir rmSync hit Windows EBUSY on SQLite handle)

Summary by cubic

Fixes #718. Multi-output conversions (one input producing several files) left the Delete and Tar buttons disabled and the progress bar indeterminate, so results.js polled /progress/:jobId every second forever once output rows exceeded job.num_files.

  • Completion is now job.status === "completed" || (job.status !== "pending" && files.length >= job.num_files), so finished multi-output jobs complete immediately while pending jobs keep actions disabled.
  • <progress> max and completed value use Math.max(job.num_files, files.length) so client polling stops cleanly.
  • Adds regression tests for a completed multi-output job and a pending multi-input job.

Written for commit ea4d40a. Summary will update on new commits.

View guided diff

@github-actions github-actions Bot added the Fix label Nov 22, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread tests/pages/results.test.ts Resolved
@C4illin
C4illin merged commit 207697d into C4illin:main Nov 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-Page & Multi-Output Conversions Trigger Infinite Polling Loop and Disable Action Buttons

2 participants