From c4b4b9895ec6788a66bd1f19cc78e20d91d2d9df Mon Sep 17 00:00:00 2001 From: Romain Bertrand Date: Sat, 5 Sep 2026 15:00:11 +0200 Subject: [PATCH] fix(ui): stop the initial sync from stealing the user's sidebar selection The cache now survives a restart, so projects are navigable before the first sync completes. But `trigger_initial_sync` left `is_initial_sync` set for the whole sync, so its completion took the initial branch a second time and `InitialDataLoaded` re-applied `default_project`, dropping the user wherever the config pointed. Clear the flag as soon as the user picks a view. Without navigation it stays set, so a fresh install still resolves `default_project` once the sync brings the projects in. --- src/ui/app_component/actions.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/app_component/actions.rs b/src/ui/app_component/actions.rs index 451f249..9f5d278 100644 --- a/src/ui/app_component/actions.rs +++ b/src/ui/app_component/actions.rs @@ -100,6 +100,9 @@ impl AppComponent { }; info!("Navigation: Sidebar selection changed to {}", selection_desc); + // Once the user has picked a view, the initial sync no longer owns the + // selection: completing it must not drag them back to `default_project`. + self.is_initial_sync = false; self.state.sidebar_selection = selection.clone(); // Reload data for the new selection self.schedule_data_fetch();