What's wrong
When a clone completes, the render thread runs Clones.RefreshIfRequested(RefreshPage) (ProjectDirector/ProjectDirector.cs ~L689). RefreshPage (~L812-821) only calls UpdateClonedStatus for Options.Repos[Options.BaseRepo], i.e. whatever repo is selected now, not the repo that was cloned. CloneTracker does not record which path finished.
Failure scenario
- Select repo X, click Clone (
Clones.TryRun(repo.LocalPath, …), ~L717).
- While it runs, select repo Y.
- The clone finishes;
RefreshPage updates Y's cloned status and re-runs Y's comparison.
- X is never added to
Options.ClonedRepos: its indicator stays grey, and FetchAllReposIfStale, Fetch All and Pull All (which iterate ClonedRepos) skip it.
- Startup's
RefreshPage also only checks the selected repo, so the state persists across restarts until X is selected again or a full scan runs.
Side effect: any clone completion restarts the comparison for the selected repo and resets its browser path to the root.
Why it matters
Selecting another repo while a clone runs is the natural thing to do (clones take a while), and the outcome is a silently untracked working copy that never gets fetched.
Suggested fix
Have CloneTracker record the local paths that completed; on the render thread call UpdateClonedStatus for each of those repos (or the parameterless full UpdateClonedStatus()), and only re-run SwitchPage when the completed repo is the selected one or one of its similar repos.
Acceptance criteria
- After cloning X and switching to Y before completion, X is in
ClonedRepos and shows as cloned.
- Completion of X's clone doesn't reset Y's comparison/browse state unless X is related to Y.
- A test on
CloneTracker asserts the completed path is reported to the refresh callback.
Not covered by #439 / #474, which only moved the refresh onto the render thread.
What's wrong
When a clone completes, the render thread runs
Clones.RefreshIfRequested(RefreshPage)(ProjectDirector/ProjectDirector.cs~L689).RefreshPage(~L812-821) only callsUpdateClonedStatusforOptions.Repos[Options.BaseRepo], i.e. whatever repo is selected now, not the repo that was cloned.CloneTrackerdoes not record which path finished.Failure scenario
Clones.TryRun(repo.LocalPath, …), ~L717).RefreshPageupdates Y's cloned status and re-runs Y's comparison.Options.ClonedRepos: its indicator stays grey, andFetchAllReposIfStale, Fetch All and Pull All (which iterateClonedRepos) skip it.RefreshPagealso only checks the selected repo, so the state persists across restarts until X is selected again or a full scan runs.Side effect: any clone completion restarts the comparison for the selected repo and resets its browser path to the root.
Why it matters
Selecting another repo while a clone runs is the natural thing to do (clones take a while), and the outcome is a silently untracked working copy that never gets fetched.
Suggested fix
Have
CloneTrackerrecord the local paths that completed; on the render thread callUpdateClonedStatusfor each of those repos (or the parameterless fullUpdateClonedStatus()), and only re-runSwitchPagewhen the completed repo is the selected one or one of its similar repos.Acceptance criteria
ClonedReposand shows as cloned.CloneTrackerasserts the completed path is reported to the refresh callback.Not covered by #439 / #474, which only moved the refresh onto the render thread.