aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-28 20:45:23 -0800
committerbndw <ben@bdw.to>2026-02-28 20:45:23 -0800
commit0da42e4fa414ab3268d4f71896455097239f8590 (patch)
tree72e951bdf8b591f4c949c6fd687ef780580c8783 /renderer/src
parentdc4156fec54a8efdab84834fe2f5bc90120e32c1 (diff)
feat: Complete 9 tasks
- ✅ **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
Diffstat (limited to 'renderer/src')
-rw-r--r--renderer/src/App.tsx12
-rw-r--r--renderer/src/components/Header.tsx41
-rw-r--r--renderer/src/styles/globals.css6
3 files changed, 24 insertions, 35 deletions
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() {
263 selectedSession.phase === "research" ? "research.md" : "plan.md"; 263 selectedSession.phase === "research" ? "research.md" : "plan.md";
264 await api.writeSessionArtifact(selectedProject.id, selectedSession.id, filename, documentContent); 264 await api.writeSessionArtifact(selectedProject.id, selectedSession.id, filename, documentContent);
265 265
266 const nextPhase = await api.advancePhase(selectedSession.id); 266 const advanced = await api.advancePhase(selectedSession.id);
267 if (nextPhase) { 267 if (advanced) {
268 setSelectedSession({ ...selectedSession, phase: nextPhase }); 268 setSelectedSession({
269 ...selectedSession,
270 phase: advanced.phase,
271 git_branch: advanced.git_branch,
272 });
269 // Trigger initial message for next phase 273 // Trigger initial message for next phase
270 setIsLoading(true); 274 setIsLoading(true);
271 const initialMsg = 275 const initialMsg =
272 nextPhase === "plan" 276 advanced.phase === "plan"
273 ? "Create a detailed implementation plan based on the research." 277 ? "Create a detailed implementation plan based on the research."
274 : "Begin implementing the plan."; 278 : "Begin implementing the plan.";
275 await api.sendMessage(selectedSession.id, initialMsg); 279 await api.sendMessage(selectedSession.id, initialMsg);
diff --git a/renderer/src/components/Header.tsx b/renderer/src/components/Header.tsx
index e56264f..fc0289d 100644
--- a/renderer/src/components/Header.tsx
+++ b/renderer/src/components/Header.tsx
@@ -152,21 +152,23 @@ export function Header({
152 {sessions.map((s) => ( 152 {sessions.map((s) => (
153 <option key={s.id} value={s.id}> 153 <option key={s.id} value={s.id}>
154 {s.name} 154 {s.name}
155 {s.git_branch ? ` · ${s.git_branch}` : " · git unavailable"}
156 </option> 155 </option>
157 ))} 156 ))}
158 </select> 157 </select>
159 )} 158 )}
160 <button onClick={onCreateSession}>+ Session</button> 159 <button onClick={onCreateSession}>+ Session</button>
161 {selectedSession && onRenameSession && !isRenamingSession && ( 160 {selectedSession &&
162 <button 161 onRenameSession &&
163 onClick={startRename} 162 !isRenamingSession &&
164 className="btn-rename" 163 selectedSession.phase !== "implement" && (
165 title="Rename session" 164 <button
166 > 165 onClick={startRename}
167 ✏️ 166 className="btn-rename"
168 </button> 167 title="Rename session"
169 )} 168 >
169 ✏️
170 </button>
171 )}
170 {selectedSession && onDeleteSession && ( 172 {selectedSession && onDeleteSession && (
171 <button 173 <button
172 onClick={handleDeleteSession} 174 onClick={handleDeleteSession}
@@ -204,26 +206,15 @@ export function Header({
204 )} 206 )}
205 207
206 {/* ── Branch badge ── */} 208 {/* ── Branch badge ── */}
207 {selectedSession && ( 209 {selectedSession && gitBranch && (
208 <button 210 <button
209 className={[ 211 className={["branch-badge", copied ? "branch-copied" : ""]
210 "branch-badge",
211 gitBranch ? "" : "branch-unavailable",
212 copied ? "branch-copied" : "",
213 ]
214 .filter(Boolean) 212 .filter(Boolean)
215 .join(" ")} 213 .join(" ")}
216 onClick={handleCopyBranch} 214 onClick={handleCopyBranch}
217 disabled={!gitBranch} 215 title={copied ? "Copied!" : `Click to copy: ${gitBranch}`}
218 title={
219 gitBranch
220 ? copied
221 ? "Copied!"
222 : `Click to copy: ${gitBranch}`
223 : "Git unavailable for this session"
224 }
225 > 216 >
226 ⎇ {gitBranch ?? "git unavailable"} 217 ⎇ {gitBranch}
227 </button> 218 </button>
228 )} 219 )}
229 220
diff --git a/renderer/src/styles/globals.css b/renderer/src/styles/globals.css
index 9d37742..ef0275e 100644
--- a/renderer/src/styles/globals.css
+++ b/renderer/src/styles/globals.css
@@ -206,12 +206,6 @@ html[data-theme="light"] .session-rename-input {
206 color: white; 206 color: white;
207} 207}
208 208
209.branch-badge.branch-unavailable {
210 border-style: dashed;
211 opacity: 0.5;
212 cursor: default;
213}
214
215/* ── Main Content ─────────────────────────────────────────────── */ 209/* ── Main Content ─────────────────────────────────────────────── */
216.main-content { 210.main-content {
217 flex: 1; 211 flex: 1;