Skip to content

K2GO-383 fix(ui): dashboard rebuild progress persists, shows % and ETA - #633

Merged
luisguzman-adfa merged 7 commits into
mainfrom
fix/K2GO-383-rebuild-progress-persist
Oct 5, 2026
Merged

luisguzman-adfa merged 7 commits into
mainfrom
fix/K2GO-383-rebuild-progress-persist

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

The rebuild bar reset to 0 on minimize/restore because the phase clock lived in
the fragment, which is recreated. Move progress ownership to
DashboardRebuildService: it polls /rebuild/log each tick, derives
phase+percent+eta, drives the notification, broadcasts ACTION_PROGRESS, and
carries the log tail on the same tick. The fragment observes it, so the bar
resumes where the rebuild is and the Details panel feeds from that one poll.

Percent and ETA show as a status line under the label, in two equal centered
columns (percent | ETA) so the values sit over the bar and do not collide as
they update. ETA reuses the shared EtaText; no new strings. App-only, no
dash-node change.

Verified on device: resumes after minimize/restore and forced fragment
recreation; % and ETA shown; Details panel populates; row clears on completion.

The rebuild bar reset to 0 on minimize/restore because the phase and its start
lived in the fragment, which is recreated. Make DashboardRebuildService the
persistent owner (it outlives the card): it polls the log, derives phase +
percent + ETA (RebuildProgress), drives the notification via setProgress, and
broadcasts percent/eta. The fragment observes and shows the bar + a
"NN%  ~N min left" caption; it no longer keeps its own resetting clock. ETA
reuses EtaText (already localized), so no new strings. App-only, no dash-node
change. +ETA unit tests.
Code-review cleanup: the "NN%  ~N min left" caption was composed in both
DashboardRebuildService (notification) and DashboardDetailFragment (card).
Extract EtaText.percentAndEta so both share one composer and cannot drift.
Split the one overloaded label into a static description plus a live
status line (percent + ETA), matching the content updaters (forgejo /
build assets / add-ons) so progress reads the same across the app.
…d ETA right

The percent and ETA shared one string and read as jammed. Anchor each in
its own column (space-between): a width change in one no longer shifts the
other, so the line does not jitter as values update.
Give each value an equal-weight column and center it in its own half, so
the two numbers sit over the bar and are easier to locate. They stay in
separate columns, so centering never makes them collide.
…eview)

The service already polls /rebuild/log each tick for progress; carry the
log tail on the same ACTION_PROGRESS broadcast and render the Details panel
from it, dropping the fragment's second /rebuild/log poll loop. Also fix two
stale comments (status columns are centered; percentAndEta is the
notification caption, the card builds two columns from of()).
@luisguzman-adfa
luisguzman-adfa merged commit 63b765f into main Oct 5, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-383-rebuild-progress-persist branch October 5, 2026 06: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.

1 participant