Skip to content

Expire completed jobs and allow dismissing finished jobs - #8

Merged
garanda21 merged 2 commits into
mainfrom
fix/clear-finished-jobs
Nov 16, 2026
Merged

garanda21 merged 2 commits into
mainfrom
fix/clear-finished-jobs

Conversation

@garanda21

Copy link
Copy Markdown
Owner

Summary

Finished translation jobs stayed in the list until the server restarted, so translations from weeks ago kept showing up in the job panel.

  • Expiry: completed jobs disappear after 24 hours. Failed jobs stay until they are resumed or dismissed, since they hold resumable progress.
  • Dismiss: each finished card has a dismiss button (DELETE /jobs/:id). For a failed job the tooltip warns that this discards its resume progress.
  • Clear finished: a button removes all finished jobs at once (DELETE /jobs).
  • Active (queued or running) jobs are never removed; the API returns 409.
  • Dismissals happen on the server, so they persist across reloads and devices.

Testing

  • 4 new tests (38 total): expiry with a mocked clock (still listed at 23h, gone at 25h, failed job kept), dismiss and clear rules, and the new routes.
  • Checked in the browser: dismissing one card, clearing the rest, and reloading shows an empty panel.

Finished jobs stayed in the list until the server restarted, so old
translations piled up for weeks.

- Completed jobs expire after 24 hours. Failed jobs stay until they are
  retried or dismissed, since they hold resumable progress.
- DELETE /jobs/:id dismisses a finished job and DELETE /jobs clears all
  finished jobs; active jobs are never removed (409).
- The job panel shows a dismiss button on each finished card and a
  Clear finished button.
@claude

claude Bot commented Nov 16, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

npm audit started failing CI on GHSA-mrwp-f3q8-3g9p in follow-redirects
1.16.1 (pulled in by axios). Update it to 1.16.3 with npm audit fix,
which also brings non-breaking patch and minor updates to eslint and
typescript-eslint. Only package-lock.json changes.
@garanda21
garanda21 merged commit baad5b5 into main Nov 16, 2026
3 checks passed
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