Files
antidrift/internal/web/static/app.css
T
felixm 7d69a1f320 Generalize the focus controller into a harness hosting swappable modes
Loosen AntiDrift's session controller into Keel's general collect→brain→act
loop. A new internal/harness runs at most one mode.Mode at a time, fanning
async completions out to the web SSE and status-bar surfaces.

- internal/mode: the Mode contract (Kind/Command/View/Active) plus optional
  EvidenceConsumer and Expirer ports, and the surfacing Envelope.
- internal/mode/focus: the former session/domain/statemachine packages moved
  under the mode, now satisfying the harness contracts unchanged.
- internal/mode/offscreen: a one-shot away-from-desk mode built on the new
  ai.Proposer, which turns a life-domain brief into one off-screen action.
- cmd/keeld replaces cmd/antidriftd; daemon wires focus + offscreen factories
  with per-mode persistence under ~/.keel/modes/<kind>.
- Finish the rename: KEEL_* env refs in the README, /keeld build artifact
  ignored, stale antidriftd binary removed.

Include the design + implementation plan this refactor was built from under
docs/superpowers/{specs,plans}/2026-06-04-controller-refactor*.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:00:49 -04:00

193 lines
6.8 KiB
CSS

:root {
color-scheme: dark;
--bg: #0d0f14;
--panel: #161922;
--line: #232733;
--ink: #e6e8ee;
--ink-dim: #8b91a6;
--ok: #34d399;
--warn: #f0b429;
--danger: #f06070;
--accent: #6b7280; /* default / locked */
}
/* The single state-driven knob: only --accent changes per state. */
[data-state="planning"] { --accent: #4c6ef5; }
[data-state="active"] { --accent: #34d399; }
[data-state="nudge"] { --accent: #f0b429; }
[data-state="drift"] { --accent: #f06070; }
[data-state="review"] { --accent: #a78bfa; }
* { box-sizing: border-box; }
body {
margin: 0;
font: 15px/1.5 system-ui, sans-serif;
background: var(--bg);
color: var(--ink);
}
main { max-width: 560px; margin: 7vh auto; padding: 0 20px; }
h1 {
font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
color: var(--ink-dim); margin: 0 0 14px 6px;
}
/* The HUD card: a stack of bands. */
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 14px;
overflow: hidden;
}
.band { border-top: 1px solid var(--line); padding: 16px 20px; }
.band:first-child { border-top: 0; }
.statusband {
display: flex; align-items: baseline; gap: 12px;
border-top: 3px solid var(--accent);
background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}
.pill {
font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
font-weight: 700; color: var(--accent);
}
.status-meta { font-size: 13px; color: var(--ink-dim); }
.timer {
font-size: 52px; font-weight: 700; line-height: 1;
font-variant-numeric: tabular-nums; color: var(--ink);
}
.action { font-size: 19px; font-weight: 600; }
.meta { color: var(--ink-dim); margin: 4px 0 0; }
label { display: block; font-size: 12px; color: var(--ink-dim); margin: 14px 0 5px; }
label:first-child { margin-top: 0; }
input {
width: 100%; padding: 10px 12px;
background: var(--bg); border: 1px solid var(--line);
border-radius: 8px; color: var(--ink); font: inherit;
}
input:focus { outline: 0; border-color: var(--accent); }
/* Checkboxes must opt out of the full-width text-input styling above, which
otherwise stretches the box across the row and shoves its label adrift. */
input[type="checkbox"] {
width: auto; flex: none; margin: 0; padding: 0; accent-color: var(--accent);
}
.enforce-toggle { justify-content: flex-start; }
.btn {
margin-top: 16px; padding: 10px 16px; border: 0; border-radius: 8px;
font: inherit; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #0d0f14; }
.btn-ghost { background: var(--line); color: var(--ink); }
.btn:disabled { background: var(--line); color: var(--ink-dim); cursor: not-allowed; }
/* Large tap targets for the launcher and off-screen primary actions. */
.btn-big { display: block; width: 100%; margin-top: 12px; padding: 14px 16px; font-size: 16px; }
.launcher .btn-big:first-of-type { margin-top: 4px; }
/* Drift/nudge actions live in the status band; lay them out below the text. */
.band-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.band-actions .btn { margin-top: 0; padding: 7px 12px; }
.drift-reason, .nudge-msg { color: var(--ink); margin: 4px 0 0; font-weight: 400; }
.statusband.col { flex-direction: column; align-items: stretch; gap: 6px; }
/* Evidence band */
.evidence .now { font-size: 13px; color: var(--ink); }
.health-ok { color: var(--ok); }
.health-bad { color: var(--warn); }
.buckets { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; color: var(--ink-dim); }
.buckets li {
display: flex; justify-content: space-between; padding: 2px 0;
font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums;
}
/* Review summary band */
.summary { font-size: 14px; }
.summary-row {
display: flex; justify-content: space-between; padding: 3px 0;
font-variant-numeric: tabular-nums; color: var(--ink-dim);
}
.summary-row span:last-child { color: var(--ink); font-family: ui-monospace, monospace; }
/* Planning: today's tasks as clickable seed chips */
.tasklist { display: flex; flex-wrap: wrap; gap: 8px; }
.task-chip {
padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
background: var(--bg); color: var(--ink); font: inherit; font-size: 13px;
cursor: pointer; text-align: left;
}
.task-chip:hover { border-color: var(--accent); color: var(--accent); }
/* Planning: standing-profile grounding indicator */
.knowline { opacity: 0.85; }
.reflectline { opacity: 0.85; }
.link {
background: none; border: none; padding: 0; font: inherit; font-size: 12px;
color: var(--accent); cursor: pointer; text-decoration: underline;
}
.enforce-note { opacity: 0.8; font-size: 0.85em; }
.enforce-toggle { display: flex; align-items: center; gap: 0.4em; }
.hint { opacity: 0.7; font-size: 0.85em; margin: 0.2em 0 0.6em; }
/* Settings: header gear + overlay modal */
.gear {
background: none; border: 0; color: var(--ink-dim); cursor: pointer;
font-size: 14px; padding: 0 4px; vertical-align: middle;
}
.gear:hover { color: var(--accent); }
.overlay {
position: fixed; inset: 0; background: rgba(0,0,0,.5);
display: flex; align-items: flex-start; justify-content: center;
padding: 8vh 16px; z-index: 10;
}
.overlay[hidden] { display: none; }
.modal {
width: 100%; max-width: 520px; background: var(--panel);
border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.modal h2 { margin: 0 0 12px; font-size: 16px; }
.modal-actions { margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions .btn { margin-top: 0; }
.path-row { display: flex; gap: 8px; align-items: center; }
.path-row input { flex: 1; }
.path-row .btn { margin-top: 0; white-space: nowrap; }
.set-error { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 1em; }
.browse {
margin-top: 10px; border: 1px solid var(--line); border-radius: 8px;
background: var(--bg); max-height: 260px; overflow-y: auto;
}
.browse[hidden] { display: none; }
.browse-dir {
padding: 8px 10px; font-size: 12px; color: var(--ink-dim);
font-family: ui-monospace, monospace; border-bottom: 1px solid var(--line);
position: sticky; top: 0; background: var(--bg);
}
.browse-list { list-style: none; margin: 0; padding: 4px 0; }
.browse-list button {
width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
color: var(--ink); font: inherit; font-size: 13px; padding: 5px 12px;
font-family: ui-monospace, monospace;
}
.browse-list button:hover { background: var(--line); color: var(--accent); }
/* Off-screen mode: pending spinner. */
.offscreen-pending { text-align: center; }
.spinner {
width: 28px; height: 28px; border-radius: 50%;
border: 3px solid var(--line); border-top-color: var(--accent);
animation: spin 0.8s linear infinite; margin: 4px auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }