From 0da42e4fa414ab3268d4f71896455097239f8590 Mon Sep 17 00:00:00 2001
From: bndw <ben@bdw.to>
Date: Sat, 28 Feb 2026 20:45:23 -0800
Subject: feat: Complete 9 tasks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- ✅ **Change 1** — `src/main/git.ts`: Add `LOCK_FILES`, `buildTaskSubject`, `getStagedFileNames`, `buildFileSubject` helpers; rewrite `commitMsg` block in `autoCommitTurn`
- ✅ **Change 2a** — `src/main/ipc/handlers.ts`: Update import to include `ensureGitIgnore`; strip branch creation from `sessions:create`; add bare `ensureGitIgnore` call
- ✅ **Change 2b** — `src/main/ipc/handlers.ts`: Update `workflow:advance` to create branch on implement transition; return `{ phase, git_branch }`
- ✅ **Change 3** — `src/main/preload.ts`: Update `advancePhase` return type in `ClaudeFlowAPI` interface
- ✅ **Change 4** — `renderer/src/App.tsx`: Destructure `{ phase, git_branch }` from advance result; spread `git_branch` into `setSelectedSession`
- ✅ **Change 5a** — `renderer/src/components/Header.tsx`: Remove branch from `<option>` text
- ✅ **Change 5b** — `renderer/src/components/Header.tsx`: Add `phase !== "implement"` guard to rename button
- ✅ **Change 5c** — `renderer/src/components/Header.tsx`: Gate badge on `gitBranch` truthy; remove disabled/unavailable state
- ✅ **Change 6** — `renderer/src/styles/globals.css`: Delete `.branch-badge.branch-unavailable` rule
---
 renderer/src/App.tsx | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'renderer/src/App.tsx')

diff --git a/renderer/src/App.tsx b/renderer/src/App.tsx
index ecbb5b2..74b1f91 100644
--- a/renderer/src/App.tsx
+++ b/renderer/src/App.tsx
@@ -263,13 +263,17 @@ export function App() {
         selectedSession.phase === "research" ? "research.md" : "plan.md";
       await api.writeSessionArtifact(selectedProject.id, selectedSession.id, filename, documentContent);
 
-      const nextPhase = await api.advancePhase(selectedSession.id);
-      if (nextPhase) {
-        setSelectedSession({ ...selectedSession, phase: nextPhase });
+      const advanced = await api.advancePhase(selectedSession.id);
+      if (advanced) {
+        setSelectedSession({
+          ...selectedSession,
+          phase: advanced.phase,
+          git_branch: advanced.git_branch,
+        });
         // Trigger initial message for next phase
         setIsLoading(true);
         const initialMsg =
-          nextPhase === "plan"
+          advanced.phase === "plan"
             ? "Create a detailed implementation plan based on the research."
             : "Begin implementing the plan.";
         await api.sendMessage(selectedSession.id, initialMsg);
-- 
cgit v1.2.3

