aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'renderer/src/components')
-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