Commit Graph

23 Commits

Author SHA1 Message Date
nntrivi2001 6c7554dbdc docs(locks): document cross-lane named locks (D) 2026-08-04 11:41:54 +07:00
nntrivi2001 c068f0cac6 style(i18n): restore literal UTF-8 chars in lanes.json locale files
The lock-indicator commit's JSON edit re-serialized both files through
something that escaped every non-ASCII character (—, …, ·, ▶, ■) as
\uXXXX, touching ~180 unrelated lines for a two-key addition. No
functional change (JSON \u escapes are semantically identical) — just
restoring the literal-character convention every other locale file uses.
2026-08-04 11:37:18 +07:00
nntrivi2001 1f3a5ff51d feat(locks): show a lock indicator on the lane card (D) 2026-08-04 11:32:34 +07:00
nntrivi2001 4a8725f136 feat(locks): add ccam lock status/acquire/release CLI (D) 2026-08-04 11:08:43 +07:00
nntrivi2001 7488a375e3 feat(locks): expose GET/POST /api/locks over named-lock.js (D) 2026-08-04 10:58:58 +07:00
nntrivi2001 2312c53788 feat(locks): add cross-lane named locks (mkdir-atomic, staleness floor) (D) 2026-08-04 10:53:58 +07:00
nntrivi2001 e783a2a946 docs(lanes): clarify --no-build is up-only; add A3 spec+plan docs
Help text for "lanes up|down" implied --no-build applied to both;
it's only read by up. Also commits the A3 profile-scaffolding design
spec and implementation plan that weren't yet in git.
2026-08-04 10:06:01 +07:00
nntrivi2001 4d9a385c5e feat(lanes): lane runtime UI, docs, and env additions (A1+A2)
Client-side rendering for the per-lane runtime facts (slot, ports,
database, Redis index, service liveness) added in the server-side
A1/A2 work, plus the doc updates (README, CLAUDE.md, docs/API.md,
client/server READMEs) describing the new profile.env keys, hook
environment contract, and REST endpoints.
2026-08-04 10:04:58 +07:00
nntrivi2001 9d145865dd feat(lanes): per-lane database, Redis, and .env isolation (A1+A2)
Gives each lane its own slot-derived runtime (ports, detached process
lifecycle, profile-driven hooks) and its own database/Redis logical
index/.env file, so two lanes running the same repo's stack at once no
longer share state. Machine-level DB/Redis credentials live at
~/.ccam/secrets.env (mode 0600, never returned by any route); a hook's
output is redacted of that password (raw and URL-encoded forms) before
it reaches a log file or the lane_hook_output websocket broadcast.
Wired into provision/up/reset/remove; reset accepts --keep-db to skip
the drop/recreate/migrate/reseed block entirely.
2026-08-04 10:03:40 +07:00
nntrivi2001 d71086f677 docs(lanes): document ccam lanes profile init/check (A3) 2026-08-04 09:52:58 +07:00
nntrivi2001 113ed01504 test(lanes): prove profile scaffolding end to end with a real boot (A3) 2026-08-04 09:48:01 +07:00
nntrivi2001 c024534475 feat(lanes): add ccam lanes profile init/check CLI (A3) 2026-08-04 09:42:25 +07:00
nntrivi2001 c3546f568a fix(lanes): add error handling for unreadable hook files in checkProfile 2026-08-04 09:36:58 +07:00
nntrivi2001 fa489016b4 feat(lanes): validate a scaffolded profile with checkProfile (A3) 2026-08-04 09:28:59 +07:00
nntrivi2001 9f9879cc3d feat(lanes): scaffold .ccam/profile/ from detected Node facts (A3) 2026-08-04 09:20:22 +07:00
nntrivi2001 c4b11799dc feat(lanes): detect docker-compose database/Redis and wire ENV_REWRITE (A3) 2026-08-04 09:13:20 +07:00
nntrivi2001 0ecc2eec24 feat(lanes): detect a Node.js project's layout and boot scripts (A3) 2026-08-04 09:06:45 +07:00
nntrivi2001 2c313084a8 fix(test): stop FORCE_COLOR/CCAM_COLOR leaking into spawned ccam CLI children
The sandbox's ambient FORCE_COLOR=3 was inherited by every ccam-cli.test.js
child process spawn, defeating the CLI's own "colors off when piped" default
and breaking every plain-text output assertion (help text, piped output,
offline-mode rendering).
2026-08-04 09:04:59 +07:00
nntrivi2001 72f74f9104 Merge pull request 'fix(lanes): stop the stuck "waiting for your input" banner and idle status' (#1) from fix/lane-waiting-and-running-status into main
Reviewed-on: #1
2026-07-31 04:13:03 +00:00
nntrivi2001 b673363351 feat(theme): dark/light mode with a Radix Colors-based palette
Adds a working Dark/Light toggle (next to the language switcher, same row
as EN/VI) and re-themes the whole dashboard, not just the handful of
components that already used semantic tokens.

- Tailwind darkMode:"class" + CSS-variable color tokens (client/src/index.css,
  tailwind.config.js): surface.0-5, border/border-light, accent/accent-hover,
  fg.primary/secondary/muted, status.success/danger/warning. One class flip
  on <html> re-themes everything — no per-element dark: variant pairs.
- useTheme() hook: localStorage-persisted, defaults to dark, no
  prefers-color-scheme fallback (client/src/hooks/useTheme.ts).
- Mechanical, table-driven migration (scripts/migrate-color-tokens.mjs,
  scripts/tokenize-status-colors.mjs, scripts/darken-status-colors.mjs) of
  every raw neutral/gray/slate + emerald/red/amber Tailwind utility across
  client/src onto the new tokens, so every badge/button/component pulls the
  same shade per status/role instead of each picking its own.
- Palette values are the literal Radix Colors (radix-ui.com/colors) scale
  constants — slate/blue/green/red/amber steps 1-12 — adopted after three
  rounds of hand-picked values that kept overshooting (flat, then too dark,
  then glaring); see docs/superpowers/specs/2026-07-31-color-redesign-
  dark-light-mode-design.md for the full history and role mapping.
- PipelineMap: done/current/failed/passed-no-evidence/detected share one
  visual language (border + text + translucent wash of the same status
  color); `current` alone stays a solid accent fill, the one state that
  gets to look bolder ("you are here").
- LaneCard: removed the stage/kind/auto-stage chips that duplicated the
  Workspace lane-detail header already showing them.

Categorical/decorative hues (violet, indigo, cyan, teal, sky, rose, pink,
orange, yellow, and blue where it plays a role-coloring part e.g. message
bubbles) are deliberately out of scope — collapsing those onto shared
tokens would erase the distinction between different kinds of thing, not
a status.
2026-07-31 10:54:31 +07:00
nntrivi2001 4905d63b97 fix(lanes): clear stale detection on real stage transitions, exclude scratch dirs from implement detect
setStage() left detected_stage/signal/at untouched across a real transition,
so a prior task's leftover inference (e.g. `tests` from earlier work) both
misrepresented a fresh task's progress and — because recordDetection is
forward-only — silently rejected every real detection behind it until the
old one aged past DETECTION_TTL_MS. A real stage change now clears the
detection columns; a same-stage heartbeat leaves a live detection alone.

Also excludes `.superpowers/` from the `implement` node's Write detect rule
- brainstorm-companion scratch files were being counted as implementation
work.

fix(client): disable Node's default --experimental-webstorage in tests

Node 25 enables --experimental-webstorage by default, which defines a
broken global `localStorage` (no backing file configured) ahead of jsdom's
own full polyfill. Every test touching real localStorage failed with
"localStorage.clear/getItem is not a function" — not flaky, not test-specific,
just this one Node default. NODE_OPTIONS=--no-experimental-webstorage on the
test scripts lets jsdom's polyfill take over as before.
2026-07-31 10:53:07 +07:00
nntrivi2001 9b1fa67385 fix(lanes): stop the stuck "waiting for your input" banner and idle status
Two lane-card symptoms, one source: touchLaneFromHook.

needs_action was stamped on every Notification hook, including Claude
Code's bare idle nudge ("Claude is waiting for your input"), which fires
~60s AFTER Stop. Nothing later arrives to clear it, so the card kept a
permanent amber "needs you" while the user was simply not typing. The
nudge now clears the flag instead of raising it - it proves the CLI is
parked at an idle prompt. Permission/AskUserQuestion messages are
unchanged.

lane.status only moved through the dashboard run lifecycle (run_id), so
a lane driven by `claude` in a terminal read "idle" for the whole time
Claude was working in it. For lanes the dashboard did not launch, the
turn hooks now mirror it: UserPromptSubmit/PreToolUse/PostToolUse ->
running, Stop/SessionEnd/idle-nudge -> idle. SubagentStop is excluded (a
subagent finishing is not the end of the turn) and provisioning/failed
are never stomped.

Side effect: classifyLiveness treats status=running as "expect live", so
a turn with no hook for more than LANE_DEAD_SEC (300s) now shows the dead
dot. That is the detector working as designed; raise LANE_DEAD_SEC if a
long single Bash trips it.
2026-07-30 15:27:26 +07:00
nntrivi2001 57dc91585d feat: Claude Code Monitor — lanes, pipelines and a merged workspace
Internal SmartGift build of a Claude Code monitoring dashboard.

Lanes: a durable unit of parallel agent work, one per working directory,
tracked across session restarts. Managed lanes are git worktrees the
dashboard provisions and can reset or remove behind a three-check destroy
guard and a counted preflight; adopted lanes are directories you already
own and are never destroyable.

Pipelines: a lane moves through pipeline stages. A stage the agent declares
with evidence renders green; a stage inferred from the tool-event stream
renders dashed amber and never counts as done. Detection is forward-only
within a 30-minute window, and never writes the declared stage.

Workspace: one page at /run with a lane grid, the selected lane's pipeline,
and a full Claude console behind a disclosure.
2026-07-30 14:39:03 +07:00