Skip to content

fix(launcher): truncate download status labels to stop progress dialog blowout#10357

Merged
mudler merged 1 commit into
masterfrom
fix/launcher-progress-dialog-width
Jun 16, 2026
Merged

fix(launcher): truncate download status labels to stop progress dialog blowout#10357
mudler merged 1 commit into
masterfrom
fix/launcher-progress-dialog-width

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Fixes #10355

Problem

In the desktop launcher, the download progress dialog grows too wide and the progress bar stretches "to infinity" when a download fails. The width grows in proportion to the length of the Download failed: … message.

Root cause

The launcher is a Fyne app. Each download progress window places a widget.ProgressBar and a status widget.Label in the same VBox. On failure the status label is set to "Download failed: <error>", and the error commonly contains a long, unbreakable URL/path. A Fyne label with default settings reports its MinSize as the full single-line text width, so a long message forces the window — and the progress bar sharing the VBox — arbitrarily wide.

Fix

Set Truncation = fyne.TextTruncateEllipsis on the four affected status labels:

  • the main-window status label (NewLauncherUI), which UpdateStatus sets to "Failed to download update: <error>", and
  • the status label in each of the three showDownloadProgress implementations (ui.go, launcher.go, systray_manager.go).

With ellipsis truncation, the label's MinSize collapses to roughly one character plus the ellipsis regardless of content, so the window keeps its intended 400×250 size. TextWrapWord is not sufficient because it cannot break a spaceless URL. The full error text remains visible via the dialog.ShowError call already present in each code path.

Testing

  • gofmt clean; fyne.TextTruncateEllipsis matches the widget.Label.Truncation field type (mirrors the existing welcomeLabel.Wrapping = fyne.TextWrapWord usage in the same file).
  • Full launcher compile requires GL/X11 dev headers (Fyne CGO deps) not available in my environment; please confirm via make build-launcher in CI.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]

The download progress windows place a ProgressBar and a status Label in the
same VBox. On failure the status label is set to "Download failed: <error>",
and the error commonly contains a long, unbreakable URL/path. A Fyne label
with default settings reports its MinSize as the full single-line text width,
so a long message stretches the window — and the progress bar sharing the
VBox — arbitrarily wide (fixes #10355).

Set Truncation = fyne.TextTruncateEllipsis on the four affected status labels
(the main-window status label plus the status label in each of the three
showDownloadProgress implementations). Truncation collapses the label's
MinSize to roughly one character plus the ellipsis regardless of content, so
the window keeps its intended size. TextWrapWord is not enough because it
cannot break a spaceless URL. The full error text remains visible via the
dialog.ShowError call already present in each path.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
@mudler mudler merged commit 8bd2df8 into master Jun 16, 2026
19 of 20 checks passed
@mudler mudler deleted the fix/launcher-progress-dialog-width branch June 16, 2026 07:42
@localai-bot localai-bot added the bug Something isn't working label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants