feat(worktrees): création intelligente (auto) + commit/push/promotion + grille agrandissable

- addWorktree résout la branche par dépôt (branchExists) : checkout si présente, suivi de origin/<b> si seulement remote, sinon création (-b) depuis la branche par défaut. Corrige le 'fatal: invalid reference' sur les groupes hétérogènes ; newBranch -> mode (déprécié, mappé en route).
- Nouvelles opérations git : commit (add -A), push (upstream auto), promotion « en principal » (la branche du worktree devient le checkout principal, sans merge ni conflit, ancienne branche conservée). Routes /worktrees/{commit,push,promote} auditées + GET /repos/:id/branches.
- Web : actions Commit/Push/Promouvoir sur WorktreeCard, sélecteur de branche de base (datalist) dans RepoSection et GroupSessionModal, agrandissement d'un terminal au choix dans TerminalGrid.
- Court-circuite la session de groupe quand aucun worktree n'a pu être créé (fini le masquage par « no resolvable worktree »).
- Tests : git.ts (branchExists/listBranches/commitAll/auto), worktree-manager (commit/promote/branches) ; acceptance P5 étend le scénario worktree de groupe sur branche neuve + commit + promotion.
This commit is contained in:
2026-06-22 19:55:45 +02:00
parent e84c6a7f6d
commit f4fb6c3b52
18 changed files with 732 additions and 62 deletions

View File

@@ -113,14 +113,15 @@ export default {
modeMain: 'Main checkouts',
branchLabel: 'Branch name',
branchPlaceholder: 'feature/…',
newBranch: 'create branch',
baseRefLabel: 'Base ref (optional)',
branchHint: 'Created where missing, reused where it already exists in the repo.',
baseRefLabel: 'Base branch (optional)',
baseRefPlaceholder: "repo's default branch",
commandLabel: 'Session',
reposLabel: 'Repos in this session',
launch: 'Launch session',
launching: 'Launching…',
close: 'Close',
ok: 'worktree created',
ok: 'worktree ready',
error: 'failed',
skippedLabel: 'skipped',
done: 'Group session started.',
@@ -146,6 +147,8 @@ export default {
creating: 'Creating…',
branch: 'Branch',
newBranch: 'create branch',
baseRefLabel: 'Base branch',
baseRefPlaceholder: 'default branch',
start: 'Start',
starting: 'Starting…',
startNone: 'no session',
@@ -161,6 +164,16 @@ export default {
confirmDelete: 'Confirm delete',
forceDelete: 'Force delete',
prune: 'Prune',
commit: 'Commit',
commitPlaceholder: 'Commit message',
committing: 'Committing…',
push: 'Push',
pushing: 'Pushing…',
promote: 'Make main',
promoting: 'Promoting…',
promoteConfirm:
'Branch “{branch}” will become the repositorys main checkout; this worktree will be removed (the previous main branch is kept). Continue?',
forcePromote: 'Force (dirty tree)',
main: 'main',
detached: 'detached',
locked: 'locked',
@@ -176,6 +189,8 @@ export default {
notAttachable: 'This session runs outside Arboretum — fork it to interact, or resume it once it has stopped.',
fullscreen: 'Fullscreen',
exitFullscreen: 'Exit fullscreen',
maximize: 'Maximize',
restore: 'Restore',
},
push: {
enable: 'Enable notifications',

View File

@@ -115,14 +115,15 @@ const fr: typeof en = {
modeMain: 'Checkouts principaux',
branchLabel: 'Nom de branche',
branchPlaceholder: 'feature/…',
newBranch: 'cer la branche',
baseRefLabel: 'Réf. de base (optionnel)',
branchHint: 'Cée si absente, réutilisée si déjà présente dans le dépôt.',
baseRefLabel: 'Branche de base (optionnel)',
baseRefPlaceholder: 'branche par défaut du dépôt',
commandLabel: 'Session',
reposLabel: 'Dépôts de la session',
launch: 'Lancer la session',
launching: 'Lancement…',
close: 'Fermer',
ok: 'worktree créé',
ok: 'worktree prêt',
error: 'échec',
skippedLabel: 'ignoré',
done: 'Session de groupe démarrée.',
@@ -148,6 +149,8 @@ const fr: typeof en = {
creating: 'Création…',
branch: 'Branche',
newBranch: 'créer la branche',
baseRefLabel: 'Branche de base',
baseRefPlaceholder: 'branche par défaut',
start: 'Démarrer',
starting: 'Démarrage…',
startNone: 'aucune session',
@@ -163,6 +166,16 @@ const fr: typeof en = {
confirmDelete: 'Confirmer',
forceDelete: 'Forcer la suppression',
prune: 'Élaguer',
commit: 'Commit',
commitPlaceholder: 'Message de commit',
committing: 'Commit…',
push: 'Push',
pushing: 'Push…',
promote: 'Passer en principal',
promoting: 'Promotion…',
promoteConfirm:
'La branche « {branch} » deviendra le checkout principal du dépôt ; ce worktree sera supprimé (lancienne branche principale est conservée). Continuer ?',
forcePromote: 'Forcer (arbre modifié)',
main: 'principal',
detached: 'détaché',
locked: 'verrouillé',
@@ -179,6 +192,8 @@ const fr: typeof en = {
'Cette session tourne hors dArboretum — dupliquez-la pour interagir, ou reprenez-la une fois arrêtée.',
fullscreen: 'Plein écran',
exitFullscreen: 'Quitter le plein écran',
maximize: 'Agrandir',
restore: 'Réduire',
},
push: {
enable: 'Activer les notifications',