aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components/Header.tsx
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/components/Header.tsx
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/components/Header.tsx')
-rw-r--r--renderer/src/components/Header.tsx41
1 files changed, 16 insertions, 25 deletions
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