feat(lanes): git login from the dashboard, merge and conflict resolution (#45)

Part A — a fetch/pull/push against a remote that needs a login no longer
dies on "terminal prompts disabled": the server answers 409 EGITAUTH with
the host, the git bar asks for a username + password/access token and
resends the same action. AgentHub keeps its OWN credential store
(<CLAUDE_HOME>/agenthub-git-credentials/, 0700/0600), one login per host,
shared by every user of the install, managed from Settings -> Git
credentials. A login is only sent to one of the repo's own remote hosts,
saved only after git accepted it, never returned by any route, and reaches
git through an exclusive credential helper (never argv).

Part B — merge a branch (or the diverged upstream) from the git bar; a
merge that stops on conflicts lists them in the Changes panel with Keep
mine / Take theirs / Mark resolved, then Complete merge or Abort merge
(confirm gate). Clean tree, repo-root lane and an existing ref only;
pull/switch/hunk actions are blocked mid-merge; staging a conflicted file
with markers left is refused. Rebase/reset/stash stay out.
This commit is contained in:
2026-09-25 10:44:40 +07:00
parent 605ca9d65e
commit f514602697
30 changed files with 2005 additions and 59 deletions
+26 -1
View File
@@ -253,5 +253,30 @@
"changes.hunkOf": "{{n}} of {{total}}",
"changes.noEditBinary": "Binary file — not editable here",
"changes.noEditTooBig": "Too large to edit here (over 1 MB)",
"changes.noEdit": "Not editable here"
"changes.noEdit": "Not editable here",
"gitBar.loginTitle": "Git needs a login for {{host}}",
"gitBar.loginRejected": "The server rejected that username or token.",
"gitBar.loginUser": "Username",
"gitBar.loginPassword": "Password or access token",
"gitBar.loginRemember": "Remember for everyone using this AgentHub",
"gitBar.loginTokenHint": "On Gitea: Settings → Applications → Generate token, with repository read/write.",
"gitBar.loginInsecure": "This dashboard is on plain http — the token crosses the network unencrypted.",
"gitBar.loginSubmit": "Log in and retry",
"gitBar.loginCancel": "Cancel",
"gitBar.merge": "Merge into current",
"gitBar.mergeHint": "Merge the selected branch into the branch this lane is on",
"gitBar.mergeUpstream": "Merge {{upstream}}",
"gitBar.mergeUpstreamHint": "The branch has diverged from its upstream: merge it in (conflicts are resolved in the Changes panel)",
"gitBar.mergeConfirm": "Merge {{branch}} into {{current}}? Files in this lane change now — if an agent is working in this lane, let it finish first.",
"gitBar.mergeConflicts": "Merge stopped on {{count}} conflicted file(s) — resolve them in the list below.",
"gitBar.merging": "A merge is in progress: finish or abort it first",
"changes.conflictsGroup": "Merge conflicts",
"changes.mergeBanner": "Merge in progress — {{count}} file(s) still conflicted",
"changes.mergeReady": "Merge in progress — every conflict is resolved",
"changes.mergeCommit": "Complete merge",
"changes.mergeAbort": "Abort merge",
"changes.mergeAbortConfirm": "Click again to abort the merge",
"changes.takeOurs": "Keep mine",
"changes.takeTheirs": "Take theirs",
"changes.markResolved": "Mark resolved (after editing out the markers)"
}