From 14bf3e054046516dfd7a73979d3d547cbb5598ad Mon Sep 17 00:00:00 2001 From: "Fusion (runfusion.ai)" Date: Thu, 21 May 2026 16:41:00 -0700 Subject: [PATCH] feat(FN-5447): safely narrow checkout nullability in MergeAdvanceNotice Fixed a TypeScript nullability narrow in the `MergeAdvanceNotice` component, safely handling a potential null checkout value. This is a targeted type-safety fix for the integration branch advance banner. Fusion-Task-Id: FN-5447 --- packages/dashboard/app/components/MergeAdvanceNotice.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/app/components/MergeAdvanceNotice.tsx b/packages/dashboard/app/components/MergeAdvanceNotice.tsx index 24bb3a0f8..1cc70be03 100644 --- a/packages/dashboard/app/components/MergeAdvanceNotice.tsx +++ b/packages/dashboard/app/components/MergeAdvanceNotice.tsx @@ -113,7 +113,12 @@ export default function MergeAdvanceNotice({ projectId, apiBase = "/api" }: Merg return null; } - const localChangesPreserved = notice.userCheckout.dirty || notice.userCheckout.untrackedCount > 0; + if (!notice.userCheckout) { + return null; + } + + const checkout = notice.userCheckout; + const localChangesPreserved = checkout.dirty || checkout.untrackedCount > 0; const dismiss = () => { const next = [...dismissedShas.filter((sha) => sha !== notice.toSha), notice.toSha].slice(-50); @@ -148,7 +153,7 @@ export default function MergeAdvanceNotice({ projectId, apiBase = "/api" }: Merg
{notice.integrationBranch} advanced to {shortSha(notice.toSha)}.{" "} - Your checked-out copy at {notice.userCheckout.worktreePath} is behind. + Your checked-out copy at {checkout.worktreePath} is behind. {localChangesPreserved ? " (local changes preserved)" : ""} {pullError ? {pullError} : null} {pulling ? Pulling… : null}