Two bugs were keeping the Merge Advance Notice banner stuck on screen
even when there was nothing for the user to do:
- Dismiss was dead: the `notice` memo never applied dismissedShas, so
clicking close (or a successful Pull, which calls dismiss()) updated
localStorage but the filter immediately re-matched the same event.
- Auto-sync success was ignored: with mergeAdvanceAutoSync defaulting
to "stash-and-ff", the merger snaps the project-root checkout
forward as part of the merge — nothing left to pull — but the banner
kept appearing. Clicking Pull then hit /api/git/pull which fetched
origin (no change, the merger only advanced the local ref) and
returned pull-clean with no real work done.
The notice memo now (a) filters dismissedShas, and (b) suppresses any
advance event whose autoSync entry for the current user's worktreePath
reports clean-sync or synced-with-edits-restored. Conflict + skipped
outcomes still surface so the user can recover.
Tests: dismiss removes the banner; clean-sync suppresses; pop-conflict
still surfaces; sibling-worktree success doesn't suppress this user.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
@fusion/dashboard
| @fusion/dashboard |
|---|
| patch |
fix(dashboard): unbreak Merge Advance Notice banner dismiss and suppress when auto-sync already handled it
Two bugs were keeping the banner stuck on screen even when there was nothing for the user to do:
- Dismiss was dead. The
noticememo never applieddismissedShas, so clicking the close button (or a successful Pull, which callsdismiss()after the API returns) updated localStorage but the same advance event kept matching the filter and the banner re-rendered immediately. - Auto-sync success was ignored. With the new
mergeAdvanceAutoSyncsetting at itsstash-and-ffdefault, the merger snaps the project-root checkout forward as part of the merge — there is nothing left to pull. The banner kept appearing anyway because the route'sautoSyncpayload wasn't consulted. Clicking Pull then hit/api/git/pull, which fetched origin (no change, since the merger only advanced the local ref) and returnedpull-cleanwith no actual work done.
The notice memo now (a) filters out dismissedShas, and (b) suppresses any advance event whose autoSync entry for the current user's worktreePath reports clean-sync or synced-with-edits-restored. Conflict and skipped outcomes (synced-with-pop-conflict, skipped-dirty, skipped-*, failed) still surface the banner so the user can recover.
Banner suppression checks the per-worktree path, so a multi-checkout project where auto-sync handled one root and a sibling root is still stale will keep showing the banner on the stale one.