FN-5839: prevent stale integration-advance sync prompts

Treat rewritten integration-branch advances as handled when the working tree is already aligned.

- Add a new `superseded` resolution for unreachable advance SHAs that remain after history rewrites while HEAD matches the local integration tip.
- Update Git status collection logic and route/API status typings to propagate the new resolution state.
- Update Git Manager modal messaging and dismiss behavior so handled `superseded` entries do not show a sync CTA.
- Extend dashboard route and modal tests, and refresh dashboard guide docs for the new classification behavior.

Files changed:
 docs/dashboard-guide.md                            |  5 +--
 packages/dashboard/app/api/legacy.ts               |  2 +-
 .../dashboard/app/components/GitManagerModal.tsx   |  6 ++--
 .../components/__tests__/GitManagerModal.test.tsx  |  5 ++-
 .../dashboard/src/__tests__/routes-git.test.ts     | 36 ++++++++++++++++++++--
 .../dashboard/src/routes/register-git-github.ts    | 13 ++++++--
 6 files changed, 55 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-5839

Fusion-Task-Lineage: 6b4afb73-587d-4319-8ad8-f1d5d54bc7bf
This commit is contained in:
gsxdsm
2026-06-01 11:52:02 -07:00
parent 4a20aa140e
commit 3602fb9a23
6 changed files with 55 additions and 12 deletions

View File

@@ -1371,12 +1371,12 @@ function StatusPanel({
</p>
<ul className="gm-status-advances-help-list">
<li><code>clean-sync</code> / <code>synced-with-edits-restored</code> — working tree is in sync; nothing to do.</li>
<li><code>reachable</code> / <code>subsumed</code> / <code>orphaned</code> — already handled (including history rewrites where equivalent content already landed or original SHAs disappeared).</li>
<li><code>reachable</code> / <code>subsumed</code> / <code>orphaned</code> / <code>superseded</code> — already handled (including history rewrites where equivalent content already landed, original SHAs disappeared, or HEAD is already aligned to the rewritten integration tip).</li>
<li><code>pending</code> + <code>off / not run</code> — auto-sync is disabled in Settings; the branch ref moved but your worktree didn&apos;t follow.</li>
<li><code>pending</code> + <code>stash-failed</code> / <code>would-conflict</code> / similar — auto-sync tried but couldn&apos;t reconcile (usually local edits collide with the new commit).</li>
</ul>
<p>
<strong>Fix:</strong> Fusion only shows <em>Sync working tree</em> when at least one advance is genuinely <code>pending</code> and HEAD is not aligned with the integration tip. If entries are already handled (subsumed/orphaned/reachable), no sync action is offered.
<strong>Fix:</strong> Fusion only shows <em>Sync working tree</em> when at least one advance is genuinely <code>pending</code> and HEAD is not aligned with the integration tip. If entries are already handled (subsumed/orphaned/reachable/superseded), no sync action is offered.
</p>
</div>
)}
@@ -1398,7 +1398,7 @@ function StatusPanel({
<span className="gm-status-sub">
{" "}· {new Date(advance.advancedAt).toLocaleTimeString()} · {advance.resolution}
</span>
{(advance.resolution === "orphaned" || advance.resolution === "subsumed") && (
{(advance.resolution === "orphaned" || advance.resolution === "subsumed" || advance.resolution === "superseded") && (
<button
type="button"
className="btn btn-xs"