Commit Graph
1304 Commits
Author SHA1 Message Date
g-butandClaude Sonnet 4.6 7eb5c8b72b fix(orchestration): inject session context into Claude next_best prompts
renderTaskForAdapter built prompts without the session file content.
buildPromptWithSession was already imported but unused in the claude path.
Wrapping the rendered prompt with session context means next_best, quality,
test_and_fix, etc. now see done/next/health from the last run before choosing work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 20:00:49 +02:00
g-butandClaude Sonnet 4.6 02b5ae7e9b fix(control): three-part fix for zero-injection-when-paused + UX polish
1. beacon popup countdown is now display-only (Cockpit is sole auto-injector)
   – shows "Cockpit continues in Xs · click to choose" so user knows what's happening
   – no independent auto-inject; web popup just closes when control panel fires

2. dismissed resets per cycle so ReadyBanner fires once per agent run
   – prevAgentRunning ref tracks false→true transition; setDismissed(false) on new run

3. orchestration/run cancels open beacon sessions (same as /api/inject)
   – missing cancel caused lock file to persist, blocking every subsequent stop hook

UX: replace MicOff (mute icon) with square stop icon + waveform bars in
control panel prompt input, matching beacon popup style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 19:56:47 +02:00
g-butandClaude Sonnet 4.6 f98eacfde4 fix(control): pause cancels beacon popup; add prompt queue; restore session summary; SSOT
**Pause bug fix:**
- /api/beacon/cancel endpoint cancels active beacon sessions for a project
- Clicking pause in the control panel now calls this endpoint so the beacon
  popup's independent 30s countdown can't fire after the user pauses

**Prompt queue:**
- usePromptQueue hook (localStorage-backed) for per-project queued prompts
- Queue button (ListPlus) in the prompt input + Alt+Enter keyboard shortcut
- QueueList shows numbered items with × removal in running and idle states
- ReadyBanner auto-inject drains the queue first, falls back to next_best
- ReadyBanner shows "Queue N" tag when items are waiting

**Session summary restored:**
- SessionSummary (up next / done) is now visible while agent is running
- RunningBanner clearly labels the active task; session.next below it shows
  what comes after — no more confusion between current and upcoming work

**SSOT / DRY:**
- lib/session-content.ts: shared parseSessionText() for session file parsing
- beacon popup page, beacon [id] API route both use the shared parser
- useWhisperMic extended: exposes waveformBars + recordingSeconds
- beacon popup replaced ~150 lines of custom mic code with useWhisperMic hook
- ReadyBanner uses stable refs for onSend/onAutoInject to prevent re-injection
  from unstable parent function references on every SSE render

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 19:02:04 +02:00
g-butandClaude Sonnet 4.6 0fa3234bdd feat(control): redesign running-state UX with pause/play, clear prompt display, expandable input
- RunningBanner: add "RUNNING" kicker, show "Custom prompt" title with prompt text as subtitle
  so users see exactly what the agent is executing, not a truncated prose fragment
- Hide SessionSummary (session.next arrow) while agent is running to eliminate confusion
  between "what's being done now" vs "what comes next"
- Pause/play toggle button added beside interrupt input in running state for auto-continue control
- Prompt input upgraded from single-line <input> to auto-expanding <textarea> (fieldSizing:content)
  with Shift+Enter for newlines and Enter to send

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:30:43 +02:00
g-butandClaude Sonnet 4.6 8c886d727e fix(stream): re-resolve Zellij tab names every 10s instead of once at connection
Bug Five: the SSE stream resolved each project's canonical tab name to its
live Zellij casing once when the EventSource connected. If a new Claude
session opened (adding a suffix like " Claude") or a tab was renamed, the
stream continued reading /tmp sentinel files under the stale name. The
project appeared frozen in the control panel until the connection dropped
and reconnected.

Fix: maintain a zellijTabCache variable and fire getZellijTabs() in the
background when the cache is older than 10s. Each tick re-runs
resolveEffectiveTab against the freshest known tab list before reading the
/tmp files. Max staleness is now ~12s (10s TTL + up to 2s tick).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:19:59 +02:00
g-butandClaude Sonnet 4.6 0ec334859e chore: delete dead Web Speech API hook
use-speech-recognition.ts is now unreferenced — AskIvyModal was the
last consumer and was migrated to useWhisperMic in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:12:06 +02:00
g-butandClaude Sonnet 4.6 9026647cda fix(ivy): replace Web Speech API with Whisper in Ask Ivy modal
useSpeechRecognition (Google's cloud STT, unreliable on Linux) swapped
out for useWhisperMic (local Whisper via /api/beacon/transcribe).
Mic button now has three explicit states: recording (pulsing red MicOff),
processing (spinner, disabled), and idle (Mic). Input ring and placeholder
update to match. Error message renders below the input on permission or
hardware failure. Mic is always shown — no 'supported' guard needed since
Whisper runs locally without browser API detection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:10:04 +02:00
g-butandClaude Sonnet 4.6 76fdb10350 fix(beacon): three-part fix for double-injection race (Bug Three)
Part 1 — atomic bash lock: replace TOCTOU check-then-write on
agent-stop-active-<tab> with POSIX noclobber `( set -C; : > lock ) 2>/dev/null`.
Concurrent stop hooks that both used to pass the test-before-write now
race atomically; only one wins. Stale locks (>90s) are overwritten.

Part 2 — cancel open beacons on panel inject: cancelActiveBeaconSessions()
scans /tmp/cockpit-beacon/*.json for active sessions matching the tab and
sets choice="" — the empty-string sentinel that causes beacon.py's polling
loop to return "" and bash to `exit 0` cleanly.
/api/inject calls this immediately after injectIntoTab() succeeds.

Part 3 — beacon popup auto-closes on cancellation: polls GET /api/beacon/:id
every 2 s; calls window.close() as soon as choice !== null (set by Part 2).
Clears on unmount or when the user submits their own choice first.

Together these three parts prevent the popup and the control panel from
both injecting prompts into the same Zellij tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:06:53 +02:00
g-butandClaude Sonnet 4.6 dde05aee3f fix(inject): replace 0.3s sleep heuristic with verified tab-switch in both paths
go-to-tab-name is fire-and-forget — it returns before Zellij has switched
the visible tab. Under load the 0.3s sleep was too short, causing write-chars
to type the prompt into whichever pane happened to be focused at that moment.

Both inject paths now poll zellij action dump-layout after go-to-tab-name and
wait until the focused tab matches the target (up to 1s, 50ms intervals).
In the common case the switch completes in <50ms, so typical injection is
faster than before; the edge case where it was silently misfiring is fixed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 17:56:52 +02:00
g-butandClaude Sonnet 4.6 27d9ce0171 feat(thoughts): add image and Mermaid diagram support to parser and renderer
- Parser: new 'image' block (![alt](src)) and 'code' block (fenced backtick blocks)
  Paragraph accumulator breaks on backtick fences and ![ so neither leaks into prose
- MermaidDiagram client component: dynamic mermaid import, dark theme matching
  Cockpit surface colors; SVG inline; falls back to raw text on render error
- Page: Next.js Image for image blocks with figcaption; MermaidDiagram for mermaid
  fenced blocks; pre/code for all other lang tags
- Images convention: /public/thoughts/{slug}/, referenced as /thoughts/{slug}/file

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 17:42:45 +02:00
g-butandClaude Sonnet 4.6 78780e7414 feat(mic): replace Web Speech API with Whisper in control panel; harden beacon popup mic
- Add useWhisperMic hook — MediaRecorder → /api/beacon/transcribe (local Whisper)
  replaces useSpeechRecognition in project-card-sections; always available, no Google
- PromptInput: processing spinner, error display below input, waveform placeholder text
- beacon.py WhisperThread: emit failed() on silence/empty/no-frames instead of silently
  resetting; add level pyqtSignal for real-time peak tracking; rec_tick shows ▮▯ meter
- beacon page: peakRef tracks amplitude via AnalyserNode; flat-waveform warning after 2s;
  amplitude guard before sending to Whisper; actionable permission-denied messages
- Thoughts post: anatomy of broken injection pipeline (18-min deep-dive)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 17:33:00 +02:00
g-butandClaude Sonnet 4.6 afa1f3ab44 fix(beacon): three-part fix for OrangeCat injection failure
Root cause: beacon.py called _cockpit_ready() using /api/control (slow DB+git
endpoint, 4+ seconds cold) with a 2s timeout. When OrangeCat fired rapid
consecutive stop hooks, this check failed even with Cockpit running, so
_start_cockpit() spawned extra npm run dev processes that inherited the bash
command substitution pipe (stdout). Their startup output flooded the captured
`choice`, jq parsing failed, and the script exited silently with no injection.

Fix 1: Add /api/health endpoint (instant response) — beacon.py now uses this
  instead of /api/control for all liveness checks; also fixes the curl check
  in agent-hook-bridge.sh.

Fix 2: Redirect _start_cockpit() subprocess stdout/stderr to DEVNULL — like
  _open_browser() already does. Prevents npm run dev from inheriting the pipe
  and polluting the captured choice.

Fix 3: Add concurrent stop guard at top of handle_stop — skips the popup if
  another stop is already active for the same tab (within 90s). Prevents
  beacon storms from rapid turn completions.

Also increased _poll_choice timeout from 3s to 8s to tolerate cold route
compilation without dropping choices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 16:21:03 +02:00
g-butandClaude Sonnet 4.6 d56c24a76d fix(control): treat stale currentPrompt as absent when agent isn't running
If the claude process crashes before the stop hook fires, the currentPrompt
/tmp file is never cleaned up. With the new !currentPrompt guard for isReady,
this left projects stuck on "Running: <stale task>" indefinitely.

Fix: in the display layer, treat currentPrompt as null whenever agentRunning
is false — if there's no process, there's no active turn, regardless of what
the file says. Uses agentRunning (now accurate after the argv0-basename fix)
as the authority on whether a process is alive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 15:46:59 +02:00
g-butandClaude Sonnet 4.6 f800d4c893 fix(control): drop DB fallback for currentPrompt — prevents stale "Running" after reboot
The DB currentPromptKey was used as a fallback when the /tmp file was absent.
After a system reboot, /tmp files are gone but DB still has the old value →
every project with a prior injection showed "Running: <stale task>" indefinitely.

currentPrompt is transient turn state — the stop hook always clears the /tmp file
when a turn ends, so the file's presence is the only reliable signal. The DB column
is still written by the inject route (for lifecycle event timing via currentPromptStartedAt)
but is no longer read back into the UI state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 15:42:24 +02:00
g-butandClaude Sonnet 4.6 0b6102d352 fix(control): agentRunning false positives + isReady never fires
- getAgentCwds: match argv[0] basename only, not full cmdline — prevents
  bash shell-snapshot processes (/home/g/.claude/shell-snapshots/...) from
  matching the 'claude' processMatcher and permanently setting agentRunning
- isReady: replace !agentRunning guard with !currentPrompt — the claude
  binary stays alive between turns, so agentRunning is always true while
  a session is open; currentPrompt is the reliable turn-tracking sentinel
- isOrchestrationReady: same !currentPrompt guard
- showRunningBanner: no longer requires isRunning — fires on currentPrompt
  alone so the banner appears even before the process shows up in /proc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 15:31:56 +02:00
g-butandClaude Sonnet 4.6 b2079c909f fix(beacon): popup positions on terminal screen, not cursor screen
Three fixes for the wrong-monitor popup problem:
- beacon.py: fallback uses primary screen instead of cursor position —
  cursor can be on any screen but the terminal is usually on primary
- agent-hook-bridge.sh: writes claude-screen-<PANE_ID> from xrandr at
  stop hook time if missing (context-limit continuations bypass the
  claude() bash wrapper which normally writes it at launch)
- ProjectCard.tsx: auto-continue defaults OFF — require explicit opt-in
  to prevent the Cockpit UI from auto-injecting a second prompt while
  the user is already typing their own message in the same terminal tab

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 15:16:40 +02:00
g-butandClaude Sonnet 4.6 49d52ad77e fix(control): enrich "Agent active" banner with session context
When an agent is running but no currentPrompt sentinel exists (e.g. agent
was running before Cockpit opened, or prompt wasn't injected via the UI),
the banner now shows session.next as a "Next:" hint — or session.done as
"Last:" if next is empty. Also aligns padding and font-weight with
RunningBanner for visual consistency across all active-agent states.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 14:36:31 +02:00
g-butandClaude Sonnet 4.6 c76a7458fe fix(stream): SSE uses resolveEffectiveTab so /tmp reads use exact zellij casing
The 2-second SSE tick was reading /tmp/agent-ready-<conf_name> but bash writes
/tmp/agent-ready-<zellij_exact_name>. On case mismatch the stream never saw
state updates and the Control panel lagged by the 30s polling fallback.

Fix: resolve each project's tab name to its exact zellij casing once at stream
startup (same getZellijTabs + resolveEffectiveTab that the main GET route uses).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 14:23:42 +02:00
g-butandClaude Sonnet 4.6 8223f9bc3d fix(inject): wrong-tab injection — exact zellij casing + shellEscape tab name
Root cause: resolveEffectiveTab returned conf-file casing ('OrangeCat') while
zellij may store the tab as 'orangecat'. go-to-tab-name is case-sensitive —
navigation silently failed and write-chars landed on whichever tab was focused.

Fixes:
- resolveEffectiveTab now always returns the exact casing from activeTabs
  (zellij's ground truth), never from the conf file
- injectIntoTab uses shellEscape() for the tab name argument so spaces and
  quotes in tab names no longer break the shell command

These two bugs together explain the "prompts go to the wrong tab" report from
the Control panel UX.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:57:52 +02:00
g-butandClaude Sonnet 4.6 b77c3cd8fd feat(beacon): rich submitted screen — shows dispatched action + what to expect
Replace the bare check-mark + "Running…" with a confirmation card that shows:
- The exact action that was dispatched (prompt icon + label, or custom text)
- Which project the agent is now running on
- A prompt to watch progress in the Control panel
- An "Open Control panel" button as an escape hatch

The window still auto-closes after 400ms; the screen is just visible during
the brief moment before it disappears.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:44:05 +02:00
g-butandClaude Sonnet 4.6 8581f24255 fix(beacon): mic transcription — explicit opus mimeType, expose stderr, early bail on empty
- Explicitly request audio/webm;codecs=opus from MediaRecorder (prevents Chrome
  from picking video/webm even on audio-only streams)
- Use recorder.mimeType on the assembled Blob so the MIME label matches actual codec
- Bail client-side when blob < 100 bytes (tap-and-immediately-release)
- Expose execFile stderr in the error response instead of the generic
  "Command failed: python3 ..." so the UI shows the actual Python traceback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:36:45 +02:00
g-butandClaude Sonnet 4.6 b56401438a feat(settings): prefer_browser_ready_ui toggle in Beacon settings
Expose the prefer_browser_ready_ui flag (read by agent-hook-bridge.sh to
decide between native PyQt popup and the web beacon) as a checkbox in the
Settings → Beacon section. GET returns the current value, PATCH persists it
to ~/.config/agent-dashboard-settings.json alongside countdown/model.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:21:44 +02:00
g-butandClaude Sonnet 4.6 eef6c39da6 fix(beacon): light/dark mode toggle + improved contrast
Remove hardcoded .dark wrapper from beacon layout — root ThemeProvider
already manages the class on <html> via next-themes + localStorage, so
the beacon now inherits the user's theme preference like any other route.

Add ThemeToggle (compact) to the beacon header so the user can switch
modes directly from the popup. Upgrade 11px hint text from text-text-muted
to text-text-tertiary for WCAG AA legibility at small sizes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:11:28 +02:00
g-butandClaude Sonnet 4.6 eb240daa6c feat(settings): Beacon section — edit countdown and Whisper model from UI
Previously the only way to change countdown_seconds or whisper_model was
to hand-edit ~/.config/agent-dashboard-settings.json.

- /api/beacon-settings GET+PATCH: reads/writes the settings JSON file,
  validates countdown (5–300s) and model (tiny/base/small/medium/large)
- BeaconSettings component: self-loading client component matching the
  existing ProfileSettings/ProjectsSettings pattern
- Settings page: BeaconSettings placed between Profile and Projects

Verified round-trip: GET returns {countdown_seconds:12, whisper_model:"base"},
PATCH updates the file and subsequent GET reflects the change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 12:30:50 +02:00
g-butandClaude Sonnet 4.6 8958642289 fix(beacon): countdown and whisper model now read from settings file
Both were SSOT violations — PyQt respected ~/.config/agent-dashboard-settings.json
but the web beacon hardcoded its own values.

- beacon.py _web_stop: reads countdown_seconds from settings, passes as
  ?countdown=N query param when opening the Chrome app URL
- beacon page: reads ?countdown from window.location.search on load
  (lazy useState initializer, SSR-safe via typeof window guard)
- /api/beacon/transcribe: reads whisper_model from settings file before
  invoking transcribe.py, falls back to "base" if missing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 12:21:37 +02:00
g-butandClaude Sonnet 4.6 e20c5b9374 feat(projects): session devLog visible in Projects view
Each beacon completion already writes a DevLogEntry to userProjects.dev_log.
That history was only shown in the Control panel's project profile sidebar.

- /api/projects/[id] now joins userProjects by name and returns devLog (20
  most recent entries, newest first) alongside the entity data
- ProjectData type gains devLog: DevLogEntry[]
- Projects overview tab shows a collapsible "Session Log (N)" section using
  the same entry cards as Control
- Extracted shared DevLogList component so both views stay in sync without
  copy-pasting the rendering logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 12:10:38 +02:00
g-butandClaude Sonnet 4.6 9241b7db67 feat(beacon): local Whisper mic transcription via MediaRecorder
Replace Web Speech API (cloud, silent failures) with MediaRecorder →
POST audio blob → Python Whisper (local, no internet) pipeline. Adds
real-time waveform visualisation, recording timer, and a clear
idle/recording/processing state machine with never-silent error display.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 11:49:33 +02:00
g-butandClaude Sonnet 4.6 f15cc0e770 feat(beacon): live mic transcription, word/char count, Cockpit link
- Mic: interimResults=true shows live text as you speak (italic overlay
  in the input field while result is still forming)
- Mic: pulsing ring animation on the button while recording
- Mic: "Recording…" status line + word·char count once text is entered
- Mic: aborted error is now silent (user stopped it, not a failure)
- Add "Cockpit" button in header — opens /control in a new tab so you
  can see the full project/process panel without losing the beacon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 11:34:21 +02:00
g-butandClaude Sonnet 4.6 e98d319e3b fix(beacon): typing never auto-submits + mic error feedback
Countdown bug root cause: cancelCountdown set pausedRef=false, so the
next interval tick saw c=0≤1 and called submit. Fix: set both
pausedRef=true and cancelledRef=true — two independent guards.

Three-layer defence matching PyQt _tick/_choose pattern:
  1. pausedRef.current check at interval entry
  2. cancelledRef.current check inside setCountdown callback (race-safe)
  3. Live input value check (mirrors PyQt: if custom text → cancel)

Additional: onFocus on input cancels countdown on click, not just on
first keystroke. handleCustomChange cancels on any change (not just
non-empty). Mic: explicit error messages for permission-denied, network,
no-speech; try/catch around rec.start(); continuous=false explicit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 10:56:14 +02:00
g-butandClaude Sonnet 4.6 6be78c045b fix(beacon): auto-fit web window to content, remove dead space
- Remove min-h-screen so the page doesn't expand to fill fixed height
- On load: resizeTo(520, scrollHeight) + moveTo to keep bottom-right
  anchor (reads screenLeft/screenTop before resize to reposition)
- Reduce initial Chrome window from 820→640px so less blank area before
  JS fires; loading/submitted states use compact fixed heights
- Sync _terminal_screen_position default height to match

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 10:47:33 +02:00
g-butandClaude Sonnet 4.6 c4d49126c6 feat(beacon): mic + pause/play + keyboard shortcuts + FOUC fix
- Web Speech API mic button appends transcript to custom input
- Pause/Play button halts the 30s countdown; Space key toggles
- Number keys 1–9 pick slots directly from keyboard (Esc closes)
- Typing in custom input cancels auto-countdown
- Inline style in layout prevents white FOUC before hydration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 10:33:30 +02:00
g-butandClaude Sonnet 4.6 be25043250 fix(beacon): remove unused cn import in beacon page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 09:56:39 +02:00
g-butandClaude Sonnet 4.6 df84ba957e feat(control+beacon): dev log per project + web beacon replaces transparent PyQt popup
- beacon.py: main() now calls _web_stop (Cockpit web page) instead of PyQt6 for stop
  mode — eliminates WA_TranslucentBackground transparency bug on Linux compositors
- _cursor_screen_position(): calculates bottom-right of cursor's screen via PyQt and
  passes --window-position to Chrome so the app window opens in the right place
- user_projects: add devLog JSONB column (array of DevLogEntry: date/done/next/tests/
  todos/health); schema pushed to DB
- beacon PATCH API: appends a DevLogEntry to the matched project when a choice is set —
  fire-and-forget so it never blocks the beacon response
- GET /api/user-projects/[id]: new endpoint so ProjectProfile can fetch devLog
- ProjectProfile: new DevLogSection (collapsed by default) shows last 12 entries with
  date, health badge, done summary, and next step — auto-populated from beacon sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 09:55:00 +02:00
g-butandClaude Sonnet 4.6 77c579a399 fix(control): profile toggle always visible — header persists when profile is open
Header was hidden when profileOpen=true, making the profile impossible to close.
Always render ProjectCardHeader; toggle profile vs content below it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 09:09:36 +02:00
g-butandClaude Sonnet 4.6 89ff537303 fix(beacon): 30s countdown + prominent timer display + typing hint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 08:33:57 +02:00
g-butandClaude Sonnet 4.6 887b2b88e7 fix(beacon): add /beacon/* to public paths in proxy so no-auth access works
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 08:29:20 +02:00
g-butandClaude Sonnet 4.6 50025a1cbd feat(beacon): replace PyQt6 popup with Cockpit web page for true design SSOT
- beacon.py stop mode now opens localhost:3000/beacon/<id> (Chrome --app mode)
  instead of a PyQt6 window; PyQt6 confirm popup stays for sync blocking
- /api/beacon + /api/beacon/[id] routes create/poll/submit sessions via /tmp files
- /beacon/[id] page uses the same ui-btn-primary, ui-panel, ui-kicker components as
  the rest of Cockpit — fonts, tokens, and layout are literally the same code
- Per-project agent+model prefs: modelPref column added to user_projects (pushed);
  ProjectState now carries id/agentPref/modelPref; launch modal pre-fills saved
  prefs and saves choice back after every launch; ProjectProfile agent selector
  persists to DB immediately
- Default agent changed from codex to claude in agent-preferences + hook fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 08:21:24 +02:00
g-butandClaude Sonnet 4.6 1bf7792a7b feat(prompts): single SSOT — agent-prompts.json drives both beacon and Cockpit
Previously beacon used ~/.config/agent-prompts.json and Cockpit used
dimension-prompts.ts (two separate files with overlapping, duplicated content).

Now agent-prompts.json is the single source of truth for all prompts:
- Added dimensionId field to every entry to group them in Cockpit's UI
- Added 16 new dimension-specific prompts (refactor, security, user flows, etc.)
- New /api/prompts/agent route reads the file and serves it to the browser
- ProjectProfile.tsx now fetches from the API instead of importing from a TS file
- Removed dimension-prompts.ts entirely

Beacon reads agent-prompts.json directly (no change).
Cockpit reads it via API on demand.
To add/edit/remove prompts: edit ~/.config/agent-prompts.json once.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 21:49:01 +02:00
g-butandClaude Sonnet 4.6 7cf7a376a0 fix(bootstrap): call DB directly instead of self-HTTP; modal gets max-h scroll
bootstrap/route.ts was calling /api/user-projects via relative HTTP fetch
which doesn't work server-side — replaced with direct createUserProject() call.
Modal gets max-h-[calc(100vh-2rem)] overflow-y-auto so tall review forms scroll.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 21:37:33 +02:00
g-butandClaude Sonnet 4.6 ec633b4f3c fix(beacon): scrollable summary card so all UP NEXT/DONE content is reachable
Wraps session summary in a QScrollArea (max 55% screen height) so content
never overflows the screen. DONE toggle now scrolls to reveal items instead
of resizing the window. Also bumps ai-brief timeout to 90s with user-visible
"~30s" hint so the CLI invocation no longer times out.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 21:25:36 +02:00
g-butandClaude Sonnet 4.6 d56187047e fix(theme): force dark mode — remove system preference override
ThemeProvider was set to defaultTheme="system" + enableSystem=true, causing
the UI to render in light mode on machines with a light OS theme. CLAUDE.md
mandates dark-first; switching to defaultTheme="dark" + enableSystem=false
enforces this regardless of system preference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 20:56:17 +02:00
g-butandClaude Sonnet 4.6 884a224a29 feat(control): bootstrap wizard + beacon progressive disclosure
- New /api/project/ai-brief — calls claude --json-schema to parse free-form startup idea into structured brief (name, tagline, features, stack, etc.)
- New /api/project/bootstrap — creates local dir, GitHub repo, Neon DB, registers in Cockpit; returns YC-style launchPrompt for Claude Code
- New BootstrapModal 4-step wizard: describe → review/edit → creating → launch (wired to "New" button in ControlPanel)
- beacon.py: progressive disclosure in session summary — first item always visible, "Show N more ↓" expands rest per section (UP NEXT / IN PROGRESS / DONE)
- beacon.py: card widened to 600px, summary card border-radius 12px, expand hover uses accent color

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 20:40:49 +02:00
g-butandClaude Sonnet 4.6 69209e167e fix(control): progressive disclosure on session summary — collapsed by default, expand on demand
Default view shows only the first 'Up next' item with a 'Show all ↓' button.
Expanded view shows all next/done bullets with section labels and '↑ Collapse'.
Uses ui-card-section and ui-kicker from the design system SSOT. Single-item
sessions with no done text show inline with no toggle (nothing to expand).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 20:14:29 +02:00
g-butandClaude Sonnet 4.6 48b674f1fa fix(control): session summary — base text size, bold labels, 3-unit spacing
Bump item text to text-base (16px) with leading-relaxed, increase inter-item
gap to space-y-3 and section gap to space-y-5, use bold uppercase labels with
explicit tracking. Makes the two sections visually distinct and each item
legible without squinting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 20:10:27 +02:00
g-butandClaude Sonnet 4.6 42ffc4eae9 fix(control): session summary — more breathing room between bullet items
Increase vertical spacing (space-y-2 per item, space-y-4 between sections),
bump outer padding to py-4, widen gap between arrow and text, use leading-relaxed
so items don't feel crammed when multiple bullets appear.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 20:07:42 +02:00
g-butandClaude Sonnet 4.6 646cf6194a fix(control): session summary — bullet points per item, Up next/Done labels
Splits next and done text on '; ' to render each semicolon-delimited item as
its own labeled bullet row. Adds 'Up next' (accent) and 'Done' (muted) section
headers so the two groups are immediately distinguishable. Each item is still
fully copyable (select-text).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 19:59:45 +02:00
g-butandClaude Sonnet 4.6 4e950e93c6 fix(control): show 'Agent active' fallback banner when running without tracked prompt
Running projects without a currentPrompt showed no activity indicator in the
card body — just a pulsing dot in the header. Now shows a compact accent-tinted
row with a spinner, 'Agent active' label, and today's commit count as evidence
of progress. Matches the RunningBanner style but doesn't require prompt tracking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 19:54:21 +02:00
g-butandClaude Sonnet 4.6 83e0dd502a fix(control): truncate verbose health badges, hide LAST RUN panel while agent running
SessionBadge now extracts only the first segment (before '—' or ',') so agents
writing "LINT CLEAN, BUILD CLEAN, 0 TS ERRORS, 674 TESTS PASSING" render as
"LINT CLEAN" with the full text in a tooltip. LAST RUN orchestration panel is
suppressed while the agent is active — it's context-before-action noise during runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 19:48:07 +02:00
g-butandClaude Sonnet 4.6 f06808120d fix(control): primary CTA button for next_best, secondary chip row, inline More toggle
Replaces equal-weight chip grid with state-driven layout: next_best gets a
full-width accent-tinted primary button with pause/play adjacent; action intents
(test_fix, quality, commit) become a compact secondary chip row; More toggle
inline at end of secondary row; expanded section uses border-t separator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 19:34:19 +02:00
g-butandClaude Sonnet 4.6 d8bbcc1b8f chore: remove unused SwitchableAgent import from control route
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 19:25:18 +02:00