Skip to content

fix(ui): live folder rows again - retain rows, seed first-run progress, force redraws (v0.122.0) - #152

Merged
gnacho merged 4 commits into
mainfrom
fix/151-live-view-refresh
Aug 22, 2026
Merged

gnacho merged 4 commits into
mainfrom
fix/151-live-view-refresh

Conversation

@gnacho

@gnacho gnacho commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Problem

The folder rows in the main window froze at the state they had when the view was built: no spinner, no run progress bar, no per-file progress, no queued state. The sync engine ran fine in the background; only the view was blind. Switching accounts and back rebuilt the view, which painted the current state once - the only way to get an update.

Root cause

Regression from the #121 fix (v0.118.0): FolderStatusRow got a Drop impl that unsubscribes its live state/progress callbacks, but AccountView::new appended the row's slot widget and then dropped the row object at the end of the loop iteration. Every row lost its subscriptions immediately after construction and stayed painted with its initial state forever. Before #121 the dropped row kept its subscriptions alive (a leak, but the rows updated - which is why this used to work).

Fix

Closes #151
Closes #148
Closes #150

gnacho and others added 4 commits August 22, 2026 13:11
connect_progress() wires the progress forwarder after start() has
already fired startup syncs. The run_active flag introduced in #145
starts false, so every event from the in-flight startup run was dropped
and the folder row showed no per-file progress or bar movement.

Seed the flag from scheduler.is_running() when connecting, so an
in-flight run keeps emitting events. Later runs are still gated by
prepare_sync()/finished() as before.

Closes #148
GTK may not repaint the row when properties are updated from a
subscription callback, so after a sync finishes the row could still
show "Synchronizing…" with the old file caption until the user clicked
elsewhere to force a redraw.

Queue an explicit draw on the whole slot after every state render and
on the progress label after every progress change, so the icon,
spinner, run bar, subtitle and caption all update together without
user interaction.

Closes #150
AccountView::new built each FolderStatusRow, appended its slot and dropped
the row object at the end of the loop. Since the fix for #121, dropping a
row unsubscribes its live state and progress callbacks, so every row froze
at the state it had when the view was built: no spinner, no run bar, no
per-file progress and no queued state until the user switched accounts and
back, which rebuilt the view.

The view now owns its rows, so the subscriptions stay active while the rows
are on screen and are still released when the view is rebuilt. Includes a
regression test that flips a folder state and asserts the row repaints
without a rebuild.

Closes #151
'Synchronization Scheduled' read like a future calendar event; the folder
is actually queued behind the running one. Reuses the existing catalog
entry and updates the Spanish translation to 'A la espera'.

Refs #151
@gnacho
gnacho merged commit 5e86920 into main Aug 22, 2026
1 check passed
@gnacho
gnacho deleted the fix/151-live-view-refresh branch August 22, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant