fix(dashboard): remove duplicate integration-advances UI; Sync working tree skips origin

Two cleanups in Git Manager → Status:

- Removed the duplicate "Sync local tip" button (gm-integration-actions)
  and the second "Recent integration advances" list (gm-recent-advances)
  that rendered above the highlighted block. Also dropped the dead
  mergeAdvanceEvents state, fetcher, and SSE subscription that only
  fed the deleted UI.

- Sync working tree is now pure-local. Added skipOriginFetch to
  PullGitBranchOptions.integration (and the matching POST /api/git/pull
  body field). When set, pullGitBranch skips tryFastForwardFromOrigin
  entirely — the sequence is just auto-stash → git reset --hard
  refs/heads/<integration> → restore stash. The Sync button passes
  skipOriginFetch: true because the "N need action" recovery is for
  catching the worktree up to a *local* merger ref-advance; touching
  origin could silently pull in unrelated remote commits.

Help disclosure rewritten to reflect the pure-local behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-23 19:24:35 -07:00
parent 6e7f1e570e
commit 5d35b64bd1
3 changed files with 45 additions and 109 deletions

View File

@@ -0,0 +1,11 @@
---
"@fusion/dashboard": patch
---
fix(dashboard): remove duplicate integration-advances UI; Sync working tree is now pure-local (no origin fetch)
**Removed duplicate UI** — Git Manager → Status had two overlapping sections rendering the same data: a `Sync local tip` button + a `Recent integration advances` list, sitting above the highlighted `Recent integration-branch advances` block (the one with the lost-work warnings). Deleted the duplicate (`gm-integration-actions` + `gm-recent-advances`) along with the dead `mergeAdvanceEvents` state, fetcher, and SSE subscription that only fed it.
**Sync working tree is now pure-local** — for the "N need action" case the merger has already advanced `refs/heads/<integration>` locally and the worktree just needs to follow. Previously the button called the integration-mode pull which ran `tryFastForwardFromOrigin` first, silently pulling in unrelated remote commits. New `skipOriginFetch` option on `PullGitBranchOptions.integration` (and the matching `POST /api/git/pull` body field) skips the origin step entirely. The Sync button passes `skipOriginFetch: true`, so the sequence is: auto-stash → `git reset --hard refs/heads/<integration>` → restore stash. Origin is not touched.
Help disclosure updated to match the new behavior.