From 73d2680b83ccbdbd8dfec2d319533e98b379b830 Mon Sep 17 00:00:00 2001 From: bndw Date: Wed, 4 Mar 2026 21:36:32 -0800 Subject: feat: Thread optional `phase` param into `db/sessions.ts::cre… (+7 more) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ✅ Thread optional `phase` param into `db/sessions.ts::createSession()` - ✅ Thread optional `phase` param into `ipc/handlers.ts` sessions:create handler - ✅ Thread optional `phase` param into `preload.ts` createSession API - ✅ Update Plan phase system prompt to gracefully handle missing research.md - ✅ Update Implement phase system prompt to gracefully handle missing plan.md - ✅ Create `renderer/src/components/NewSessionModal.tsx` - ✅ Update `App.tsx`: add modal state, split handler, add modal JSX - ✅ Add modal CSS to `globals.css` --- renderer/src/styles/globals.css | 160 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) (limited to 'renderer/src/styles') diff --git a/renderer/src/styles/globals.css b/renderer/src/styles/globals.css index c463432..dc7d4a5 100644 --- a/renderer/src/styles/globals.css +++ b/renderer/src/styles/globals.css @@ -1711,6 +1711,166 @@ html[data-theme="light"] .settings-textarea:focus { margin-left: 4px; } +/* ── New Session Modal ───────────────────────────────────────── */ +.modal-backdrop { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.55); + display: flex; + align-items: center; + justify-content: center; + z-index: 200; +} + +.modal { + background: var(--bg-secondary); + border: 1px solid var(--border); + border-radius: 4px; + width: 400px; + display: flex; + flex-direction: column; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); +} + +.modal-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 16px; + border-bottom: 1px solid var(--border); +} + +.modal-title { + font-size: 13px; + font-weight: 600; + color: var(--text-primary); + text-transform: uppercase; + letter-spacing: 0.08em; +} + +.modal-close { + background: transparent; + border: 1px solid var(--border); + border-radius: 2px; + color: var(--text-secondary); + font-size: 14px; + width: 22px; + height: 22px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: background 0.15s; +} + +.modal-close:hover { + background: var(--bg-tertiary); + color: var(--text-primary); +} + +.modal-body { + padding: 20px 16px 16px; + display: flex; + flex-direction: column; + gap: 12px; +} + +.modal-prompt { + font-size: 12px; + color: var(--text-secondary); + text-transform: uppercase; + letter-spacing: 0.08em; +} + +.phase-cards { + display: flex; + flex-direction: column; + gap: 6px; +} + +.phase-card { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2px; + padding: 10px 12px; + background: var(--bg-primary); + border: 1px solid var(--border); + border-radius: 3px; + cursor: pointer; + text-align: left; + transition: border-color 0.15s, background 0.15s; + width: 100%; +} + +.phase-card:hover { + border-color: var(--accent); + background: var(--bg-tertiary); +} + +.phase-card.selected { + border-color: var(--accent); + background: var(--bg-tertiary); +} + +.phase-card-label { + font-size: 12px; + font-weight: 600; + color: var(--text-primary); +} + +.phase-card.selected .phase-card-label { + color: var(--accent); +} + +.phase-card-desc { + font-size: 11px; + color: var(--text-secondary); +} + +.modal-footer { + display: flex; + justify-content: flex-end; + gap: 8px; + padding: 12px 16px; + border-top: 1px solid var(--border); +} + +.modal-btn-secondary { + background: transparent; + border: 1px solid var(--border); + border-radius: 2px; + color: var(--text-secondary); + font-size: 12px; + padding: 5px 12px; + cursor: pointer; + font-family: inherit; + transition: background 0.15s; +} + +.modal-btn-secondary:hover { + background: var(--bg-tertiary); + color: var(--text-primary); +} + +.modal-btn-primary { + background: var(--accent); + border: 1px solid var(--accent); + border-radius: 2px; + color: #fff; + font-size: 12px; + padding: 5px 12px; + cursor: pointer; + font-family: inherit; + font-weight: 600; + transition: background 0.15s; +} + +.modal-btn-primary:hover { + background: var(--accent-hover); + border-color: var(--accent-hover); +} + .mcp-tools-empty { font-size: 11px; color: var(--text-secondary); -- cgit v1.2.3