Skip to content

fix(ui): clamp generation progress percentages - #2224

Merged
RaghavChamadiya merged 1 commit into
repowise-dev:mainfrom
akkupratap323:fix/2176-clamp-generation-progress
Sep 14, 2026
Merged

fix(ui): clamp generation progress percentages#2224
RaghavChamadiya merged 1 commit into
repowise-dev:mainfrom
akkupratap323:fix/2176-clamp-generation-progress

Conversation

@akkupratap323

Copy link
Copy Markdown
Contributor

What changed

GenerationProgress could display percentages above 100% when a job reported more completed pages than its stale total. For 241 / 5, the UI rendered 4820%, passed an invalid value to Radix, dropped aria-valuenow, and generated malformed transform CSS.

This change clamps the displayed generation percentage to 0-100. It also hardens the shared Progress primitive so all finite inputs are bounded before reaching Radix or the indicator transform; non-finite inputs retain the indeterminate state.

Validation

  • Focused generation and progress tests: 21 passed
  • Shared UI TypeScript check: passed
  • Shared-package import boundary check: passed
  • Full shared UI suite: 1,658 passed; two unrelated system-map suites could not load a user-level PostCSS plugin, and two existing heavy UI tests timed out on this Windows machine
  • Regression tests were run before implementation: 9 failed on overflow, negative, and non-finite inputs

Closes #2176

Keep generation labels and progress accessibility values within 0-100 even when job totals are inconsistent. Harden the shared progress primitive against invalid finite and non-finite inputs.

Closes repowise-dev#2176
@akkupratap323

Copy link
Copy Markdown
Contributor Author

@RaghavChamadiya The assigned fix is ready. Could you please review this PR and assign it if appropriate? Thank you.

@RaghavChamadiya RaghavChamadiya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @akkupratap323. Clamping at both the generation boundary and the shared progress component covers raw percentages as well as finite derived values, while preserving indeterminate handling for missing and non-finite input. The regression coverage matches those cases. Approved.

@RaghavChamadiya
RaghavChamadiya merged commit 7e1d4a1 into repowise-dev:main Sep 14, 2026
10 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.

[Bug] Generation progress percentage is not clamped, producing 4820% and a malformed CSS transform

2 participants