Skip to content

Avoid edge cases that lead to incorrect progress values in the UI - #685

Merged
julien-nc merged 1 commit into
mainfrom
fix/682/safer-progress-display
Oct 9, 2026
Merged

julien-nc merged 1 commit into
mainfrom
fix/682/safer-progress-display

Conversation

@julien-nc

Copy link
Copy Markdown
Member

closes #682

Sanitize and unify task progress display.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc added bug Something isn't working 3. to review labels Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

Walkthrough

Task updates in src/assistant.js and AssistantPage.vue now store finite progress values and set non-finite or missing values to null. RunningEmptyContent converts backend progress fractions to percentages capped below 100%. It also validates progress and timestamp inputs before updating its speculative estimate.

Priority: ➖ Normal

Severity of issue fixed: Low

Merge Risk: 🔵 Low · up to ba9ce

Progress can still display above the requested 99% maximum. Correct the cap before merging, or accept this bounded display discrepancy.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: preventing edge cases that produce incorrect progress values in the UI.
Description check ✅ Passed The description directly relates to the changeset by stating that task progress display will be sanitized and unified. It also references the linked issue about invalid progress values.
Linked Issues check ✅ Passed Issue #682 requires finite progress values from 0% to below 100%, with no progress indicator after task completion. updateTask now converts non-finite backend values to null. RunningEmptyContent…
Out of Scope Changes check ✅ Passed The changes in src/assistant.js, src/views/AssistantPage.vue, and src/components/RunningEmptyContent.vue all normalize, transport, or render task progress. The speculative-progress guards suppor…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 773a76a5-b49d-4f04-a502-2c59de745529
📥 Commits

Reviewing files that changed from the base of the PR and between 696fb58 and ba9ce8c.

📒 Files selected for processing (3)
  • src/assistant.js
  • src/components/RunningEmptyContent.vue
  • src/views/AssistantPage.vue

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

if (!Number.isFinite(fraction)) {
return null
}
return Math.min(Math.max(fraction, 0), 0.9999) * 100

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cap displayed progress at 99%.

When the backend reports a fraction of 1, this cap produces 99.99%. formattedProgress then displays 99.99 %, which exceeds the requested 0%–99% range. Cap the fraction at 0.99 instead.

@kyteinsky kyteinsky 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.

did not test but looks good!

@julien-nc
julien-nc merged commit ceef92b into main Oct 9, 2026
10 checks passed
@julien-nc
julien-nc deleted the fix/682/safer-progress-display branch October 9, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Infinity %" progress during text to speech conversion

2 participants