Fix auto-sync remaining enabled after PR merge - #162
Open
0101 wants to merge 2 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c7fa2749-60bc-40e0-822a-6853b5cca357
There was a problem hiding this comment.
Pull request overview
Fixes stale auto-sync state after PR reconciliation detects a merge.
Changes:
- Removes merged branches from auto-sync preferences.
- Clears associated accepted-revision records.
- Adds regression coverage and updates the Branch Sync specification.
Show a summary per file
| File | Description |
|---|---|
src/Server/RefreshScheduler.fs |
Deactivates auto-sync during merged-PR reconciliation. |
src/Tests/SchedulerTests.fs |
Tests merged-branch cleanup and open-branch preservation. |
docs/spec/worktree-monitor.md |
Documents automatic deactivation behavior. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
| if newPersisted <> persisted then | ||
| MergedPrStore.setForRepo services.MergedPrStore repoId newPersisted | ||
|
|
||
| deactivateMergedAutoSync services.AutoSyncStore root effectiveMap branchScope.GitData |
Comment on lines
+285
to
+287
| mergedAutoSync | ||
| |> List.map fst | ||
| |> List.iter (AutoSyncStore.clear store) |
…c-not-deactivated-after-merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When PR reconciliation detected that a pull request had merged, auto-sync correctly stopped acting on the branch but left its persisted
autoSyncBranchespreference enabled. The dashboard therefore continued showing an active auto-sync toggle on a merged card.Fix
autoSyncBrancheswhen their reconciled provider PR is merged.Tests
dotnet test src\Tests\Tests.fsproj --filter "Category=Fast" --no-restore