Skip to content

fix(queue): carry a rounded duration into the next unit - #10086

Merged
joshistoast merged 2 commits into
invoke-ai:mainfrom
kevin9327:fix/queue-duration-carry
Nov 10, 2026
Merged

joshistoast merged 2 commits into
invoke-ai:mainfrom
kevin9327:fix/queue-duration-carry

Conversation

@kevin9327

@kevin9327 kevin9327 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The queue's duration label (queue rows and item details) rounds after it picks a unit, so a value that rounds up to the next unit prints an impossible label:

Duration Before After
59.996s 60.00s 1m 0s
119.6s 1m 60s 2m 0s
3599.6s 59m 60s 1h 0m

formatDuration now checks the two-decimal label against 60 and rounds to whole seconds before splitting minutes and hours, the same approach formatDuration in workbench/image-map/indexProgress.ts already takes.

Related Issues / Discussions

None.

QA Instructions

  • New src/features/queue/ui/formatDuration.test.ts covers ordinary seconds/minutes/hours, the three carry cases above, and the null cases. The carry case fails on main (expected '60.00s' to be '1m 0s') and passes with this change.
  • oxfmt --check and oxlint on the two changed files pass. I ran the test with vitest outside a full pnpm install, so pnpm lint and pnpm test:all were not run locally.

Review

Self-reviewed; small pure function change with no UI layout change. No material findings.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Meaningful regression coverage added / updated where needed; obsolete tests/code removed
  • Persisted-state and API changes include required migrations / compatibility validation
  • Relevant performance/efficiency opportunities considered; material claims have evidence
  • Material review findings resolved and relevant checks rerun
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

This PR was prepared with AI assistance; I reviewed the change and ran the tests above.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

59.996s showed as 60.00s and 119.6s as 1m 60s in the queue duration label. Rounding now happens before the unit split.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T11:09:35.915779Z
We couldn’t complete this review. Comment @codex review to try again.
0c75b0d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the frontend PRs that change frontend files label Oct 31, 2026
@lstein lstein self-assigned this Nov 2, 2026
@lstein lstein added the 7.0.0 label Nov 2, 2026
@lstein lstein moved this to 7.0.1: bugfixes and small features in Invoke - Community Roadmap Nov 2, 2026
@lstein lstein assigned dunkeroni and unassigned lstein Nov 2, 2026
@joshistoast
joshistoast requested a review from lstein November 3, 2026 04:41
@joshistoast
joshistoast self-requested a review November 10, 2026 07:30
@joshistoast
joshistoast added this pull request to the merge queue Nov 10, 2026
Merged via the queue into invoke-ai:main with commit fd4699a Nov 10, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.0.0 frontend PRs that change frontend files

Projects

Status: 7.0.1: bugfixes and small features

Development

Successfully merging this pull request may close these issues.

4 participants