From 428519335d5be26c3494556ecfe5811c08444464 Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Thu, 24 Sep 2026 13:30:30 +0700 Subject: [PATCH] fix(run,lanes): prompt autocomplete, per-lane Active runs, compact Changes header - The run form's prompt box offers suggestions again: `/` lists the run cwd's project and user commands and skills plus the CLI built-ins (claude lanes only), `@` lists files under the cwd; Enter picks while the list is open and sends otherwise. The 2f39f4e rewrite had left a bare textarea that ignored both. - Active runs lists only the current lane's runs and external sessions (sessions matched to the lane by longest path-boundary cwd), instead of every lane's. - The Changes panel's git line and its actions are one compact row in one card, and the mode/range toolbar is one wrapping row. - The lane card hides itself when it has nothing to show, instead of leaving an empty frame where the git row used to be. --- CLAUDE.md | 2 +- client/src/components/lanes/LaneCard.tsx | 4 +- .../src/components/lanes/LaneChangesPanel.tsx | 16 +- client/src/components/lanes/LaneGitBar.tsx | 101 +++--- client/src/components/lanes/LaneGitHeader.tsx | 101 +++--- .../lanes/__tests__/LaneGitHeader.test.tsx | 2 +- client/src/components/run/LaneConsolePane.tsx | 36 ++- client/src/components/run/RunSetup.tsx | 287 +++++++++++++++++- .../run/__tests__/LaneConsolePane.test.tsx | 52 ++++ .../run/__tests__/RunSetup.test.tsx | 65 +++- client/src/lib/api.ts | 19 +- client/src/pages/Workspace.tsx | 3 +- .../screens.snapshot.test.tsx.snap | 15 +- docs/API.md | 6 +- docs/LANES.md | 4 +- 15 files changed, 583 insertions(+), 130 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 17c3783a..c09b3a86 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # Claude Code Working Guide -_Last synced: v1.8.6 (2026-09-24) + the lane's git section MOVING from the lane card to the top of the Changes panel (`client/src/components/lanes/LaneGitHeader.tsx`: `useLaneGitFacts`, the working-copy line, `LaneGitFilesPanel` and `LaneGitBar`, sharing ONE facts read with `LaneChangesPanel`, which refreshes it after every stage/unstage/discard/commit while a git bar action re-reads the diff; `onNewLane` comes from `Workspace.tsx`, and `LaneCard` has no git row and no `onNewLaneFromRepo` any more) and the git bar losing its commit UI — the overview's staged-only box is the ONE commit path, the server's `commit` without `only` is unchanged + v1.8.3 (2026-09-23) + `GET /api/settings/info` reporting `server.memory.heapLimit` (V8's `heap_size_limit`), which the Dashboard's V8 Heap bar and Health Score now divide by instead of `heapTotal` + every `claude plugin install|update -y` (`cc-plugin-cli.js`, `skill-plugins.js`, both detached update helpers, `/agenthub-update`) retrying WITHOUT `-y` when an older Claude Code answers `unknown option '-y'` + `LaneDiffView.tsx` WINDOWING a diff above `WINDOW_THRESHOLD` (500) items at a fixed `ROW_PX` row height (`visibleRange`, spacers, a `ch` min-width off the longest line; at or below the threshold the DOM is unchanged) and clamping its mirrored split scroll (`clampScroll`/`follow`) + a git action that git itself refuses (a numeric exec exit status) answering 409 `EGIT` instead of 500 with a number for a code (`gitErrorCode` in `server/routes/lanes.js`), and one `parseNumstat` (`server/lib/git-diff.js`) shared by the Changes panel and `gitFacts.files` + the Dashboard heatmap ramp mixing `--accent` into `--surface-0` so it reads on every theme + the lane git surface being HARDENED (`server/lib/git-diff.js`, `server/lib/git-ops.js`, `server/lib/worktree.js`: every lane git call runs with `GIT_LITERAL_PATHSPECS=1` and `-z` porcelain, is scoped to the LANE's cwd — a subdir lane sees and acts on only its own paths, `gitFacts.files` included — and reads through `lanePath` at every rev; any file whose basename is `settings.local.json`, the lane router key file, is refused as `ESECRET`/403 on disk and at every rev; `commit` refuses with `ESTAGEDOUTSIDE` while anything outside the lane is staged, checked with `--no-renames`; `push` without a resolvable remote is `ENOREMOTE`; git writes serialize on the repo's absolute git dir, not the lane id) + the xterm terminal following the selected DARK theme (`client/src/lib/terminalTheme.ts`, live via `term.options.theme`) and chart colours using structural tokens + the Add-lane modal asking `POST /api/lanes/ensure` with `exact: true` (#42) — without it a directory NESTED inside an existing lane resolves to that parent lane with `created: false`, so the modal closed on the parent and no new card ever appeared; `exact` counts only a lane on that very directory, and a `created: false` answer now names the lane that owns the folder instead of closing. The CLI, the run console and Sagi keep the parent lookup + Settings → **Appearance** (`client/src/components/settings/AppearanceSettings.tsx`: mode Dark/Light/**System** — `prefers-color-scheme`, followed live — plus one NAMED theme remembered per mode: dark Default/Darcula/Apple Dark, light Default/Apple Light/IntelliJ Light/Canvas). A theme is a CSS-variable override block in `client/src/index.css` keyed by `data-theme` on `` (`.dark[data-theme=…]` / `[data-mode="light"][data-theme=…]`, `data-mode` is set on `` too), and `--tint-base`/light `--syn-plain` are now `var(--surface-3)`/`var(--fg-primary)` so no theme restates them; `hooks/useTheme.ts` is a `useSyncExternalStore` reader over `localStorage` (`theme` = `dark|light|system`, `agenthub.theme.dark|light`) that caches NOTHING in the module, so the Sidebar and Settings can never disagree — do not reintroduce per-instance `useState` there; an inline `