feat(dashboard): expose integrationBranch setting in the settings modal

Adds a text input for the canonical integration branch directly under
the Auto-completion mode select. Visible regardless of direct vs PR
mode since the setting applies to both.

Blank preserves the existing auto-resolution cascade
(integrationBranch → baseBranch → origin/HEAD → main). Setting it to
master/trunk/develop/etc. pins the resolution explicitly.

Field trims whitespace and stores undefined when cleared so the
auto-resolution stays active.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-23 16:31:48 -07:00
parent 99359b6536
commit 084bdc67f4
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
---
"@fusion/dashboard": patch
---
feat(dashboard): expose `integrationBranch` setting in the project settings modal
Adds a text input for the canonical integration branch (the branch Fusion merges tasks into, and the reference for all ahead/behind / overlap / pre-rebase computations). Lives directly under the Auto-completion mode select inside the merge-strategy panel — visible regardless of direct vs PR mode, since the setting applies to both.
Blank value (the default) preserves the existing auto-resolution cascade: `integrationBranch` → legacy `baseBranch``origin/HEAD` symbolic ref → fallback `main`. Setting it to `master` / `trunk` / `develop` / etc. pins the resolution explicitly without changing other settings.
Field trims whitespace and stores `undefined` (not empty string) when cleared so the auto-resolution remains active.

View File

@@ -4617,6 +4617,37 @@ export function SettingsModal({
</small>
</details>
</div>
<div className="form-group">
<label htmlFor="integrationBranch">Integration branch</label>
<input
id="integrationBranch"
type="text"
className="input"
placeholder="auto-detect (origin/HEAD → main)"
value={form.integrationBranch ?? ""}
onChange={(e) => {
const trimmed = e.target.value.trim();
setForm((f) => ({
...f,
integrationBranch: trimmed.length === 0 ? undefined : trimmed,
}));
}}
data-testid="integration-branch-input"
/>
<details className="settings-option-details">
<summary>More details</summary>
<small>
The canonical branch Fusion merges tasks into and uses as the reference for all
ahead/behind / overlap / pre-rebase computations. Leave blank to auto-resolve
(<code>integrationBranch</code> → legacy <code>baseBranch</code> →
<code>origin/HEAD</code> symbolic ref → fallback <code>main</code>). Set
explicitly for projects whose default branch is <code>master</code>,
<code>trunk</code>, <code>develop</code>, or any other name. Applies to both
direct merges and pull-request mode; individual tasks can still override via
task metadata.
</small>
</details>
</div>
{form.mergeStrategy !== "pull-request" && (
<>
<div className="form-group">