Adds a new worktree setting that fetches the configured remote and rebases the task branch onto the latest default-branch tip before the merger attempts to merge it back. Catches concurrent pushes from other collaborators or fusion workers on other hosts before they surface as merge conflicts — anything the rebase can't fast-forward flows into the existing smart/AI resolve pipeline (attempts 1–3) rather than needing new handling. - `settings.worktreeRebaseBeforeMerge` (bool, default true) — gates the step. - `settings.worktreeRebaseRemote` (string, default "") — which remote to fetch; empty falls back to git's configured remote for the default branch, then to the sole remote if there's only one, then to "origin". - Rebase runs inside the task's worktree; failure aborts and falls through to the merge cascade. Rebase errors are warn-logged but never throw. - Dashboard SettingsModal Worktrees section now has a toggle for the setting plus a remote dropdown populated from `/api/git/remotes/detailed`. The dropdown defaults to "Use git default" so no explicit selection is needed on first configure. Also aligns the Last/Next heartbeat spans on the agent list card — both now share the `.agent-heartbeat-last, .agent-heartbeat-next, .agent-heartbeat-saving` font-size rule with a consistent line-height and inline-flex alignment so the labels don't drift vertically when they share a row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
771 KiB
771 KiB