diff options
Diffstat (limited to 'renderer/src')
| -rw-r--r-- | renderer/src/App.tsx | 12 | ||||
| -rw-r--r-- | renderer/src/components/Header.tsx | 41 | ||||
| -rw-r--r-- | renderer/src/styles/globals.css | 6 |
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; |
