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) <noreply@runfusion.ai>
This commit is contained in:
gsxdsm
2026-07-05 19:51:35 -07:00
parent e347062e1f
commit f4f165640a
3 changed files with 31 additions and 2 deletions

View File

@@ -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).

View File

@@ -3130,7 +3130,19 @@ export function TaskDetailContent({
const mergeStrategy = settings?.mergeStrategy ?? "direct"; const mergeStrategy = settings?.mergeStrategy ?? "direct";
const autoMergeEnabled = autoMergeEnabledProp ?? (settings?.autoMerge ?? false); const autoMergeEnabled = autoMergeEnabledProp ?? (settings?.autoMerge ?? false);
const effectiveAutoMerge = resolveEffectiveAutoMerge({ autoMerge: task.autoMerge }, { autoMerge: autoMergeEnabled }); 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: FNXC:PlannerOversight 2026-07-04-17:00:
FN-7517 enablement rules for the nudge/stop/explain controls. Nudge and FN-7517 enablement rules for the nudge/stop/explain controls. Nudge and

View File

@@ -483,9 +483,19 @@ describe("TaskDetailModal", () => {
describe("tab toggle", () => { describe("tab toggle", () => {
it("restores planner Chat as the omitted non-done default when Chat-first is enabled", () => { 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( const { container } = render(
<TaskDetailModal <TaskDetailModal
task={makeTask({ prompt: "# Hello\n\nContent" })} task={makeTask({ prompt: "# Hello\n\nContent", plannerOversightLevel: "off" })}
taskDetailChatFirst taskDetailChatFirst
onClose={noop} onClose={noop}
onMoveTask={noopMove} onMoveTask={noopMove}