Skip to content

fix(gui): scale progress bar value to 0.0-1.0 range#22

Merged
dkmstr merged 1 commit into
masterfrom
dev/andres&janier/master-fix-progress-bar
May 6, 2026
Merged

fix(gui): scale progress bar value to 0.0-1.0 range#22
dkmstr merged 1 commit into
masterfrom
dev/andres&janier/master-fix-progress-bar

Conversation

@aschumann-virtualcable
Copy link
Copy Markdown
Contributor

This pull request makes a minor adjustment to the progress calculation in the AppWindow implementation. The progress value is now divided by 100.0, likely to convert it from a percentage (0-100) to a normalized value (0.0-1.0) for display or further computation.

Root cause: progress was stored as a u16 in the 0..100 range but passed directly to egui::ProgressBar::new, which expects 0.0..1.0. Any non-zero value was clamped to 100%.

Fix: divide the stored value by 100 before passing it to the progress bar, so the actual percentage reported by the server (e.g. 75%) is displayed correctly.

  • Normalize progress value by dividing by 100.0 in the AppWindow progress calculation (crates/gui/src/window/client_progress.rs).

DEV Explain
When launching a connection and the client/server cannot yet reach the target VM (IP change, service still preparing, etc.), the broker returns a retryable error with a percent field (e.g. 75%). The UDS Launcher was always rendering this as 100% in the progress bar.

ProgressBar expects 0.0..1.0 but received 0..100, clamping to 100% onany non-zero progress. Divide stored u16 percent by 100 before passing
  to egui::ProgressBar::new.
@dkmstr dkmstr merged commit c157119 into master May 6, 2026
3 checks passed
@dkmstr dkmstr deleted the dev/andres&janier/master-fix-progress-bar branch May 7, 2026 23:17
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.

2 participants