From f4f165640aee51a9c0735fe92676ba028ab32c52 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sun, 5 Jul 2026 19:51:35 -0700 Subject: [PATCH] FN-7607: fix manual PR flow gating to key off global auto-merge setting Fixes TaskDetailModal so manual PR affordances stay visible based on the live global auto-merge setting rather than the per-task effective override, and repairs a pre-existing test regression from the FN-7510 oversight default change. - isManualPrFlow now checks mergeStrategy === "pull-request" && !autoMergeEnabled (live global setting) instead of the per-task effective auto-merge override, fixing a regression from FN-7255 that stranded users without manual PR controls when a task's auto-merge override was true but global auto-merge was off. - Pinned plannerOversightLevel: "off" on the Chat-first default-routing test fixture so the FN-7510 autonomous-oversight default doesn't add an extra Activity-view option and break the test's actual intent (asserting Chat-first tab routing). - Added changeset documenting the fix. Files changed: .changeset/fn-7607-manual-pr-flow.md | 7 +++++++ packages/dashboard/app/components/TaskDetailModal.tsx | 14 +++++++++++++- .../TaskDetailModal.attachments-and-tabs.test.tsx | 12 +++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-7607 Fusion-Task-Lineage: f0b077d4-792f-4e43-8e40-43d325920be5 Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-7607-manual-pr-flow.md | 7 +++++++ .../dashboard/app/components/TaskDetailModal.tsx | 14 +++++++++++++- .../TaskDetailModal.attachments-and-tabs.test.tsx | 12 +++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .changeset/fn-7607-manual-pr-flow.md diff --git a/.changeset/fn-7607-manual-pr-flow.md b/.changeset/fn-7607-manual-pr-flow.md new file mode 100644 index 0000000000..9a4af33b9c --- /dev/null +++ b/.changeset/fn-7607-manual-pr-flow.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix manual PR actions hidden when a task auto-merge override was on but global auto-merge was off. +category: fix +dev: TaskDetailModal isManualPrFlow now keys off live global autoMergeEnabled, not the per-task effective override (regression from FN-7255). diff --git a/packages/dashboard/app/components/TaskDetailModal.tsx b/packages/dashboard/app/components/TaskDetailModal.tsx index a1edff3916..3f6f8fc86b 100644 --- a/packages/dashboard/app/components/TaskDetailModal.tsx +++ b/packages/dashboard/app/components/TaskDetailModal.tsx @@ -3130,7 +3130,19 @@ export function TaskDetailContent({ const mergeStrategy = settings?.mergeStrategy ?? "direct"; const autoMergeEnabled = autoMergeEnabledProp ?? (settings?.autoMerge ?? false); const effectiveAutoMerge = resolveEffectiveAutoMerge({ autoMerge: task.autoMerge }, { autoMerge: autoMergeEnabled }); - const isManualPrFlow = mergeStrategy === "pull-request" && !effectiveAutoMerge; + /* + FNXC:TaskDetailPr 2026-07-05-19:45: + Manual PR flow visibility must follow the LIVE GLOBAL auto-merge setting + (`autoMergeEnabled`), not the per-task effective auto-merge override + (`effectiveAutoMerge`). Otherwise a per-task auto-merge override of `true` + hides manual PR affordances even when global auto-merge is off, stranding + the user with no way to manually open/manage the PR (FN-7607; regression + introduced by FN-7255 / commit 924bcb97d, which switched this from + `!autoMergeEnabled` to `!effectiveAutoMerge`). The `autoMerge` prop passed + to PrPanel stays `effectiveAutoMerge` — only this flow-gating boolean is + keyed off the live global setting. + */ + const isManualPrFlow = mergeStrategy === "pull-request" && !autoMergeEnabled; /* FNXC:PlannerOversight 2026-07-04-17:00: FN-7517 enablement rules for the nudge/stop/explain controls. Nudge and diff --git a/packages/dashboard/app/components/__tests__/TaskDetailModal.attachments-and-tabs.test.tsx b/packages/dashboard/app/components/__tests__/TaskDetailModal.attachments-and-tabs.test.tsx index d61fdde6b1..959a10ec4b 100644 --- a/packages/dashboard/app/components/__tests__/TaskDetailModal.attachments-and-tabs.test.tsx +++ b/packages/dashboard/app/components/__tests__/TaskDetailModal.attachments-and-tabs.test.tsx @@ -483,9 +483,19 @@ describe("TaskDetailModal", () => { describe("tab toggle", () => { it("restores planner Chat as the omitted non-done default when Chat-first is enabled", () => { + /* + FNXC:PlannerOversight 2026-07-05-19:45: + FN-7510 made DEFAULT_PLANNER_OVERSIGHT_LEVEL = "autonomous", so a task + fixture with no per-task override and no resolvable workflow now + legitimately resolves oversight-active, which surfaces an additional + "Interventions" Activity-view option. This test's intent is to assert + Chat-first default routing (the omitted-tab default lands on Chat), not + oversight gating, so pin plannerOversightLevel: "off" to keep the + three-label Activity-view assertion meaningful and honest (FN-7607). + */ const { container } = render(