Commit Graph
2208 Commits
Author SHA1 Message Date
Codeman maintainer 6a5b818f65 chore(docker): the two review items of #822
A comment says why the wait after the kill keeps its 2>/dev/null (bash 3.2
prints a Terminated job line there, bash 5.2 does not, so CI would not
notice its removal), and the two probe tests use the file's own imports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:03:18 +01:00
Codeman maintainer 507116f019 docs(tmux): name the tmux releases a one-binding list-keys answer is blank on (#821)
The blank list-keys -T answer is not a development-build quirk: tmux commit
09bd686327 sent a one-binding listing to a status message instead of stdout,
and it shipped in 3.7, 3.7a, 3.7b and 3.7c until 7ec94fda08 fixed it for 3.8.
The comments, the tests and the invariants doc now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:02:36 +01:00
Codeman maintainer 8202e07286 fix(watchers): the two review items of #818
The fs.watch failure tests skip on macOS, where chokidar 3 never calls
fs.watch for these watchers (fsevents, or polling without it), so the stub
never fired and the waits timed out. TeamWatcher.stop() clears its outage
set, so a stop() and start() on the same instance warns again about a
watcher that still fails; a new test pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:02:07 +01:00
Codeman maintainer 6222444e82 Merge #820: Send on Enter for the pinned CJK input field
A per-device mode for the pinned CJK field on phones: a typed answer stays in the field while the terminal scrolls and goes out only on Enter.
2026-11-20 04:00:05 +01:00
Codeman maintainer 1207c316c0 Merge #834: codeman tui attaches by session name
codeman tui <name> attaches by an exact session name as well as by list number.
2026-11-20 04:00:05 +01:00
Codeman maintainer 923db64a10 Merge #831: the wheel is forwarded for any CLI whose registry entry asks for it
The wheel gate reads each CLI's wheelForward rule from the registry (window.__codemanWheelForward) instead of a list of ids, so a custom full-screen CLI in clis.json can opt in.
2026-11-20 04:00:05 +01:00
Codeman maintainer 756d8d875e Merge #818: a chokidar watcher whose fs.watch fails is closed instead of retrying forever
A persistent:false watcher closes on its first error (closeWatcherOnError), so a failing fs.watch costs one warning instead of an endless climb to /, and TeamWatcher re-creates a stopped watcher from its 30 s poll.
2026-11-20 04:00:05 +01:00
Codeman maintainer f25e94141f Merge #825: proxied dashboards render in a web tab (dsh token, relative base, dynamic imports)
The DeepSeek Harness web tab trades the dsh web launch token for its session cookie, a relative <base href> resolves against the document's own directory, and root-absolute import("/...") inside scripts is rewritten onto the proxy prefix.

# Conflicts:
#	src/web/routes/webview-routes.ts
#	test/routes/webview-routes.test.ts
2026-11-20 04:00:05 +01:00
Codeman maintainer c31e4fc716 Merge #824: the header CPU reading shows CPU use, not the load average per core
Busy time across all cores, sampled over a window of at least a second (#823).
2026-11-20 03:59:10 +01:00
Codeman maintainer 99a69a87cf Merge #822: Start-Codeman.sh gives each port probe about a second
A dropped 127.0.0.1 connect (seen on WSL) no longer stalls the first run on the kernel's connect timeout.
2026-11-20 03:59:10 +01:00
Codeman maintainer 5df5628518 Merge #821: a key table reduced to one binding is read from the full listing
tmux 3.7 to 3.7c print a one-binding list-keys -T answer as a status message instead of stdout; Codeman now falls back to the full list-keys listing.
2026-11-20 03:59:10 +01:00
Codeman maintainer 4344ce8c11 Merge #827: a trusted web tab's WebSocket leg no longer forwards Codeman's session cookie
The WebSocket upgrade filters codeman_session out of the Cookie header the same way the HTTP leg already did.
2026-11-20 03:59:10 +01:00
JD c7b6e1cb4e fix(watchers): re-arm a stopped TeamWatcher watcher from the poll
chokidar 3 reports a one-off ENOENT race (a new file gone between its
stat and its watch) through the same TypeError as a lasting EMFILE, so a
watcher that stayed closed ended live team and task updates until a
restart. Each poll tick now re-creates a stopped watcher, as
WorkflowRunWatcher already does, and an outage warns once rather than
once per attempt. Also imports getErrorMessage from the types barrel.
2026-11-19 02:52:40 -05:00
Kamil KaliszandClaude Opus 5.5 974b85493c test(cli): the tui operand is now [session]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 23:52:17 +01:00
Kamil KaliszandClaude Opus 5.5 a36b875363 feat(tui): attach by session name, codeman tui <name>
codeman tui <session> takes a list number or a session name. Digits only
stay a number; anything else matches the session name exactly
(case-sensitive, never a prefix, folder or prompt). Names are not unique,
so two live matches refuse and print their numbers; a name only a RECENT
row carries says the session has finished. The target is resolved before
the TTY check, so scripts get these answers without a terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 23:23:56 +01:00
Kamil KaliszandClaude Opus 5.5 c639b38c1a fix(mobile): case sheet lift on a partial pan, live placeholder language
- The phone case sheet (#mobileCasePickerModal) is inside .app, so once
  .app follows a pan it takes the same insideLift as the bars. The layout
  gap on top lifted it twice (186px above the keyboard at offsetTop 100).
  Comment, architecture-invariants and a test case updated.
- setHoldUntilEnter() writes the placeholder before the unchanged-mode
  early return, only when the text differs, so a live language switch
  shows up without touching the rest of the field.
- Settings-Reference: Shift+Enter needs a hardware keyboard.
- styles.css: the #cjkInput cap is a backstop now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:08:26 +01:00
Kamil KaliszandClaude Opus 5.5 e85bb83353 fix(mobile): pinned field on phones: swipes, focus scroll, viewport pan, iOS lift
Found on a real Android phone (Chrome) and iPhone (Safari) with Send on Enter:

- A swipe that started on the live screen closed the keyboard: the content
  touchstart blurred the focused input before the gesture was known to be a
  tap or a scroll. It now skips the visible #cjkInput
  (_contentTouchStartBlurs()); a real tap still closes it (inert content, a
  link, a long press).
- Focusing the field scrolled the terminal off screen: KeyboardHandler's
  focusin scrollIntoView({ block: 'center' }) centred the fixed field in its
  ancestors. isInputElement() skips #cjkInput like xterm's inputs.
- Android pans the visual viewport to reveal the field (offsetTop 285 in a
  458/744 viewport), leaving only the terminal's last line visible. On phones
  .app now follows visualViewport.offsetTop while the keyboard is up, and the
  fixed bars inside .app are lifted from .app's bottom, so a partial pan does
  not lift them twice. Non-phone branches and resetLayout() clear the shift.
- On iOS the first keyboard open reported innerHeight as the visual height
  (323 vs 640), zeroing the bars' lift; the layout height is now the larger of
  innerHeight and documentElement.clientHeight.

Tests in test/keyboard-handler-pinned-field.test.ts and
test/terminal-touch-tap.test.ts; docs in architecture-invariants and
src/web/CLAUDE.md; changeset sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:45:20 +01:00
JD 3ef4900e60 fix(web): forward the wheel for any CLI whose registry entry asks for it
The browser's wheel gate named copilot, pi, claude and codex by id, so a custom clis.json entry that launches pi could not get the forwarding #771 gave stock pi: after every tab switch or reload its wheel scrolled an empty local buffer. Copying pi's altScreen value into such an entry made it worse, since the mouse DECSETs were then stripped while nothing forwarded the wheel.

The server now publishes every CLI's wheelForward rule as window.__codemanWheelForward, disabled entries included because disabling a CLI leaves its sessions running, and _shouldForwardWheelToApp reads that map instead of an id list. Stock CLIs keep their behaviour, and a minVersion that is not MAJOR.MINOR.PATCH refuses forwarding instead of comparing as passing.
2026-11-17 00:43:09 -05:00
Kamil KaliszandClaude Opus 5.5 3c5b7e2199 fix(mobile): Send on Enter placeholder i18n, one-line field on desktop
- input-cjk.js translates its placeholder with CodemanI18n.t(), like the
  prompt composer, since i18n.js skips <textarea> subtrees; the zh-CN
  entries now show.
- The field only grows on touch devices, where it is position: fixed.
  On a desktop it sits under the terminal, so growing would shrink the
  terminal box and resize the PTY on every line; it stays one line and
  scrolls there.
- Input And Voice: a line break needs a hardware keyboard (no Shift+Enter
  on a phone keyboard, and the extended bar's newline key goes to the CLI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 06:42:37 +01:00
Kamil KaliszandClaude Opus 5.5 57fdb52f7c fix(mobile): turning Send on Enter off drops the held draft
setHoldUntilEnter going from on to off clears the stashed drafts and
resets the field, so live mode's next flush sends only the new key, not
a held multi-line draft. The invariants doc and the _handleCjkInput
comment name _sendCjkPrompt as the path a held answer takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 02:37:01 +01:00
Kamil KaliszandClaude Opus 5.5 387cb830f4 fix(mobile): the clear-line key discards a Send on Enter draft
clear({ discard: true }) skips the owner stash, drops any older stash of
the owner and keeps the owner; clearTerminalInput() (the keyboard bar's
clear-line key) uses it, so a cleared draft does not come back on a
same-tab reload or a switch back. @fileoverview gains a Send on Enter
section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 00:37:16 +01:00
Kamil KaliszandClaude Opus 5.5 673a656538 fix(mobile): Send on Enter keeps drafts on every path, Ctrl stays in a held field
- CjkInput remembers which session the field's text belongs to (set by
  restoreDraft) and clear() stashes a held draft under it, so the paths
  that drop the active session before the next cleanup (goHome,
  _replaceTileGrid, _onTileAdoptedElsewhere) keep the answer.
  discardDraft() drops the owner of a removed session.
- Tile focus no longer stashes again for a tile closed from this tab.
- With a draft in the field, Ctrl shortcuts (undo, select all, copy) are
  the field's; they reach the CLI only while it is empty, like Backspace
  and the arrows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:25:02 +01:00
Kamil KaliszandClaude Opus 5.5 b5ad7afebe fix(mobile): Send on Enter fourth review fixes
- selectSession restores the CJK draft after _activateFileBrowserSession,
  which test/file-browser-search.test.ts pins right after the
  activeSessionId assignment.
- A lone digit while the session has a pending permission_prompt or
  elicitation_dialog goes out without the delayed Enter: the dialog acts
  on the digit, and the Enter would confirm whatever comes next. Same
  rule as the Approvals Inbox and the Discord bridge.
- Changeset mentions the toolbar Enter sending the CJK field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 21:53:27 +01:00
Kamil KaliszandClaude Opus 5.5 80d719df5f fix(mobile): keep the Send on Enter draft when going Home
goHome() nulled activeSessionId without stashing the field, so picking the
session again cleared the draft. Stash it first.

Docs: src/web/CLAUDE.md lists cjkInputHoldUntilEnter among the per-device
keys the strict schema does not declare, and notes the sendEnterKey()
exception for the visible CJK field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:38:20 +01:00
Kamil KaliszandClaude Opus 5.5 64ee504247 fix(mobile): Send on Enter second review fixes
- Never send a held answer as text + CR in one write: Codex folds an Enter
  in the same burst into a paste. A single character is typed, then CR
  ~120 ms later to the session captured at Enter; anything longer goes
  through _sendComposedPrompt. Drops HELD_DIRECT_MAX. No session keeps the
  text in the field.
- Cap #cjkInput at 68px on every device, not only touch.
- _autoGrow adds the border height and skips a hidden field.
- setHoldUntilEnter returns early when the mode is unchanged.
- Per-session held drafts: stashed on switch and tile focus, restored on
  return, dropped when the session is removed.
- Toolbar Enter presses Enter in the visible CJK field (commits an active
  composition first).
- Blank-only field sends a bare Enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:39:22 +01:00
Kamil KaliszandClaude Opus 5.5 95fb147e9c fix(mobile): Send on Enter review fixes
- A long single line (over 64 characters) or several lines now go through
  the composer's _sendComposedPrompt: one bracketed paste, then Enter as a
  separate delayed write to the session captured at Enter. Claude Code took
  a long `<text>\r` burst as a paste and left it unsent, and the old delayed
  Enter followed a tab switch. A refused prompt keeps the text in the field.
- Deleting held text no longer sends Backspace to the PTY. It goes out only
  when the field was already empty (the phantom itself deleted), so
  select-all + delete is covered too.
- With the one-shot Ctrl armed, the next single typed character skips the
  hold and reaches _handleCjkInput, which turns it into the control byte;
  any other change spends the modifier, as in live mode.
- A reload of the session already shown (tapping its tab, the geometry
  retry) keeps a held draft.
- With the keyboard down the field stays one line tall, so it no longer
  covers the terminal's last rows.
- zh-CN strings for both field placeholders, and a test pinning
  cjkInputHoldUntilEnter as per-device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:18:18 +01:00
Kamil KaliszandClaude Opus 5.5 14dccd462f fix(pwa): fetch the manifest with credentials so password installs can be installed
Browsers fetch the web app manifest without cookies unless the link sets
crossorigin="use-credentials". With a password set, manifest.json needs
the codeman_session cookie, so it answered 401 and Chrome refused to
install Codeman as an app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:51:27 +01:00
ArizeSky 677e393fc3 fix(webview): stop forwarding the session cookie on the websocket leg
The WebSocket leg sent the browser's whole Cookie header to a trusted dashboard, including Codeman's own codeman_session, which the dashboard could then replay against the API. Filter it through filterCookieHeader like the HTTP leg, and omit the header when nothing remains.
2026-11-16 16:46:10 +08:00
ArizeSky 2a3496b7b3 fix(webview): keep the browser's cookies on the websocket leg
The HTTP leg puts the server-held dsh credential in front of the browser's own
cookies; the upgrade leg replaced them with it. A managed dsh tab is trusted, so
its other cookies must survive there too. Filter the request the way the HTTP
leg does and merge the credential in front.

Order is the point: a `Cookie` header can name the same cookie twice, and the
first value is the one parsers keep, so appending the credential let a stale
browser copy of the same dsh cookie shadow the one the running process minted -
the tab would come back to the 401 this path exists to prevent. Both legs now
lead with it, and a route-level test asserts the bytes the upstream sees on the
upgrade, not only on the HTTP request.
2026-11-16 16:30:25 +08:00
ArizeSky 44a10cff39 fix(deepseek): skip a tokenless banner line while scanning
The scanner now takes the first `dsh web:` line that parses as an http(s)
URL AND carries a token, as the boot contract describes, instead of
settling on an earlier plain URL and reporting no launch URL. The
tokenless line is still what identifies an older, ungated dsh in the wait
loop.
2026-11-16 16:14:45 +08:00
ArizeSky 06100a5506 fix(webview): rewrite dynamic imports only inside script bodies
The root-absolute import("/...") rewrite ran over the whole document, so
visible text such as <pre>import("/x")</pre> was rewritten too. Run the
specifier rewrite per <script> body and leave markup text untouched.
2026-11-16 16:12:53 +08:00
ArizeSky cc413afdd1 fix(webview): resolve a relative base against the document directory
rebaseRelativeBase resolved a relative <base> against the proxy root, so
a document served from a subdirectory of its dashboard (for example
/webview/<cap>/app/page.html with <base href="./">) pointed at
/webview/<cap>/ and loaded its assets one level too high. Pass the
request's wildcard path into rewriteHtml and resolve the base against
the document URL, which keeps the proxy root for the landing page.
2026-11-16 16:11:58 +08:00
ArizeSky 238853f96a fix(webview): keep dashboard cookies alongside the injected one
The managed DeepSeek tab is trusted, so the browser's own cookies for the
dashboard are forwarded. The injected dsh credential replaced that header
instead of joining it, dropping any other cookie dsh had set. Append the
pair to the filtered browser cookies and leave the rest untouched.
2026-11-16 16:10:51 +08:00
ArizeSky 7f729ee87b fix(deepseek): only exchange a banner for the spawned loopback port
The launch URL comes from the child's output but fetching it is a request
made by the Codeman server, so a banner naming another host or another
local service could aim it. Require 127.0.0.1 and the port just spawned
before the exchange runs, and mark the server as unusable for reuse if
the check fails.
2026-11-16 16:10:10 +08:00
ArizeSky b1bcd1e3af fix(deepseek): restart a server whose token exchange failed
Reuse returned the running server whenever it answered HTTP and matched
the authority, including one whose launch token could not be exchanged
for a cookie. That server answered 401 forever, so the restart the
warning asks for could never happen. Track the failed exchange and skip
reuse, which makes the next start request stop and respawn it.
2026-11-16 16:09:16 +08:00
ArizeSky 4ce9abde7d fix(deepseek): scan every dsh web line for the launch URL
The banner parser and the boot wait each took the FIRST `dsh web:` match,
so a diagnostic such as `dsh web: loading profiles` printed before the
banner made parsing return null on every poll and boot gave up after four
seconds. Scan every line and take the first payload that parses as an
http(s) URL, and only scan complete lines in the wait loop so a banner
split across two output chunks is waited for instead of being parsed
truncated.
2026-11-16 16:08:19 +08:00
ArizeSky 6e3d6ebad9 test(webview): cover the managed dsh cookie at the route level
Drive the real proxy route against loopback listeners and assert the
Cookie header dsh would receive: the minted port gets it, another port,
an unmanaged tab and a multi-user owner without the grant get none, and
a granted multi-user owner still gets it.
2026-11-16 16:06:34 +08:00
ArizeSky 28ed4016bd fix(webview): require the owner's privilege grant for the dsh cookie
`managed` is accepted from the client on POST/PATCH /api/webviews and
GET /api/deepseek/web publishes the live port, so a saved managed record
pointing at that port was enough to receive the dsh-auth cookie. Gate it
on the same privileged-commands grant POST /api/deepseek/web requires,
fail closed for an ownerless record in multi-user mode, and record the
user whose request started the process so the supervisor only hands its
cookie to that identity. A request from another owner restarts the server
rather than reusing a cookie that is not theirs.
2026-11-16 16:05:22 +08:00
ArizeSky 0ea97d62ec chore(webview): name a root-absolute request that escapes the proxy
When a web tab's boot module (or any asset it builds at runtime) escapes the
`/webview/<cap>/` prefix, the request reaches Codeman's 404 with nothing to relay
to: the frame's document URL is masked, so its `Referer` carries no capability
and the existing fallback declines. The tab then shows a blank page or a spinner
that never resolves, and the log says nothing — the failure mode that made the
DeepSeek Harness tab un-diagnosable twice.

Classify that shape conservatively on the 404 path (asset-shaped
`Sec-Fetch-Dest`, same-origin `Referer` at the masked landing path, not `/api`,
not one of Codeman's own files) and log the path once per five minutes. Nothing
is relayed or rewritten: this only turns a silent blank tab into one grep.

Also document the boundary in `docs/web-tabs.md` — the root-absolute URLs the
proxy never sees (runtime-built `import()`, imports inside external `.js`, static
imports in inline scripts, service-worker registration, `url()` in external
stylesheets) — so the next occurrence starts from the list instead of from zero.
2026-11-16 10:09:37 +08:00
ArizeSky 0b3087918f fix(deepseek): make the Harness web tab render, not just authenticate
`dsh web` gates its own index behind a per-process launch token it prints on
boot, and only that URL mints the `dsh-auth-*` cookie every later request needs.
The managed tab stores the clean URL, so nothing on the browser side could
present the token: the iframe rendered dsh's 401 text, a blank tab.

Read the token out of the captured boot output, trade it for the cookie once at
startup (`redirect: 'manual'`, since the 303 is what carries Set-Cookie), and
let the proxy present it on both the HTTP and WebSocket legs. Scoped to the
exact loopback authority the cookie was minted for; a token-less banner (an
older dsh) keeps the previous behaviour untouched. The banner is scanned on its
own 256 KB budget rather than the 16 KB error-tail buffer: a chatty profile can
fill that cap before the banner prints.

Authentication alone was not enough. dsh ships `<base href="./">`, which a
browser resolves against the DOCUMENT url — and the proxy's runtime shim
rewrites that url to strip the `/webview/<cap>/` prefix. The base therefore
landed on Codeman's root: every module script 404'd and the page painted its
inline `#151517` background with nothing on it (the black screen that replaced
the white one). `rewriteHtml` now resolves a relative base against the proxy
prefix before the mask can run, leaving a cross-origin base exactly as written.

Verified against dsh 0.2.1-rc.5 and a live Codeman build: bare GET 401, captured
cookie 200, proxied `/api` WebSocket 101, and a headless-Chrome load of the
proxied tab boots the full Harness UI with no console errors.
2026-11-16 09:47:23 +08:00
Ludo FourrageandClaude Opus 5.5 9304f98efb fix(header): the CPU reading shows CPU use, not the load average per core
The header's CPU figure was the 1-minute load average divided by the core
count, capped at 100. Load counts runnable tasks, not busy time, so a host
with bursty processes, or a VM whose vCPU threads count as runnable, read
100% while most cores were idle. It is now busy time across all cores
since the previous reading, from os.cpus(), with a one-second minimum
window on the monotonic clock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:56:33 -08:00
Aamer Akhter 0e913eedf2 fix(docker): bound Start-Codeman.sh's port probe to about a second
port_in_use() connected with bash's /dev/tcp and waited for the answer.
A listening port answers at once and a closed one is normally refused
at once, but on WSL a connect to a closed 127.0.0.1 port is dropped
and only fails at the kernel's connect timeout, minutes later
(measured: still waiting after 10 s; ::1 is refused at once). The
first-run port search tries up to 100 ports from 3000 and the start
path checks the chosen port again, so a first run on WSL stalled.

Each connect now runs in a background subshell that port_answers()
waits on for at most 20 x 50 ms, then kills; no answer in time reads
as free. Bash 3.2 clean: no `timeout` (macOS ships none), no `wait -n`.

Test: a python3 listener with a full accept queue (Linux drops further
SYNs, the same no-answer a WSL closed port gives) must be given up on
within 3 s; a listening port and a closed one still answer at once.
With the old unbounded connect the first test fails at its 10 s cap.
2026-11-15 15:09:20 -05:00
Aamer Akhter c497869ee5 fix(tmux): read a one-binding key table from the full listing
A tmux built from master (`tmux -V`: next-3.7) prints nothing, exit 0,
for `list-keys -T <table>` when the table holds exactly one binding.
tmux 3.4 prints the line. One binding is the shape
restrictTmuxPrefixTable leaves behind (`<prefix> send-prefix`), so on
that tmux the reduced table read as needing a reset and every session
create reset it again. `codeman tui` read its prefix table the same
way, so readPrefixBinding called a bound key free and readDetachKey
found no detach key.

A blank answer is now read from the full `list-keys` listing, keeping
only that table's lines. The parsers already match on `-T <table>`.

Tests: recorded-command cases for the blank answer (reduced table kept,
stray binding still reset) and TuiClient cases for both reads. The
real-tmux helper reads tables through the same fallback, and the
escaped `C-\` check accepts the unescaped form the full listing prints.
2026-11-15 15:06:07 -05:00
Kamil KaliszandClaude Opus 5.5 e0e2f689cf feat(mobile): Send on Enter for the pinned CJK input field
A per-device setting next to CJK Input keeps typed text in the pinned
field until Enter instead of streaming it to the PTY, so a phone user can
scroll the terminal and edit an answer before sending (Termux-style).
One line goes as text + CR, several lines as one bracketed paste with a
delayed Enter, like the prompt composer. Shift+Enter is a newline,
Escape clears, Backspace on an empty field still reaches the PTY, and
autocorrect is on in this mode. The field grows with its text and the
keyboard layout reserves its real height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 18:38:25 +01:00
JD 10e443a309 fix(watchers): stop a chokidar watcher whose fs.watch fails instead of retrying forever
chokidar 3 with `persistent: false` has no guard for an `fs.watch` that throws (EMFILE once the inotify instance limit is used up, ENOSPC once the watch limit is). It emits the error, then a TypeError, then retries on the parent directory, and ends up re-adding `/` forever. TeamWatcher only logged its `'error'` events, so one failed watch became an endless stream of stack traces. WorkflowRunWatcher already closed its watcher on error, but `close()` removes every listener, so the TypeError from the same pass became an unhandled rejection, one per 10 s poll, and the server exits after five of those in a minute.

`closeWatcherOnError()` closes the watcher on its first error, keeps a no-op listener on it, and turns its `add()` into a no-op, since a callback chokidar still has in flight can otherwise re-add a path and reopen it. TeamWatcher logs one line per watcher and relies on its 30 s poll; WorkflowRunWatcher still drops the watcher and re-arms it on the next poll.
2026-11-14 15:14:35 -05:00
Codeman maintainer d44b049c51 chore(web): remove the teammate terminal windows nothing can open
A subagent window could host an xterm attached to a teammate's tmux pane,
but only for a teammate listed in teammatePanesByName, and the SSE
listeners that filled that map were removed in February. Since then the
branch could not be taken, and the code behind it was unreachable:

- initTeammateTerminal and the lazy dispose / restore pair that parked a
  teammate terminal while its window was minimized or hidden;
- the two maps (teammatePanesByName, teammateTerminals) and every loop
  over them: window close and reconnect cleanup, the live font-weight
  save and the skin switch;
- the two early returns in renderSubagentWindowContent that protected a
  terminal which could not exist.

Subagent windows render their activity list exactly as before, and a
teammate still gets its name and badge from the agent description. The
server side is untouched: TeamWatcher still holds respawn back while
teammates are active, and the teammate-pane routes remain.

Tests and docs that described "Agent Teams panes" now name what a font
or skin change really reaches: the main terminal, the tiles and the
split pane.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 20:35:32 +01:00
Codeman maintainer 259cabd738 chore(web): remove the Ralph wizard and its plan-generation UI
The wizard's only entry point was the "Start Ralph Loop" button on the
start screen, removed in 1.50.0, so none of this could be opened or
triggered from the app any more:

- ralph-wizard.js (the wizard, plan generation flow and the floating plan
  subagent windows) and the #ralphWizardModal markup;
- the "Plan Wizard Agents" section of the monitor panel with its cancel
  button, and the five plan:* SSE handlers that only fed these surfaces;
- the wizard branches in the subagent window code: connection lines to
  the wizard and to plan agents, window placement beside the wizard, and
  the wizard cleanup on reconnect. The ordinary path (agent window to its
  parent tab) is unchanged, only un-nested;
- the wizard's state on the app object and its z-index constant;
- its styles: 67 classes, three keyframes and a second identical
  @keyframes spin.

What stays: the Ralph panel, the Ralph tab in session options, the plan
routes (/api/generate-plan, /api/generate-plan-detailed,
/api/cancel-plan-generation, the ralph-wizard file routes) and the
plan:* SSE events, which are part of the public API. A client that
starts plan generation over the API still gets its events; the page no
longer draws anything for them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 20:29:31 +01:00
Codeman maintainer 03cb6a68b4 chore: drop obsolete scripts and a stale dev dependency, make knip report clean
- Nine one-off scripts from January and February that nothing references:
  three Ralph wizard drivers that click the start-screen button removed in
  1.50 (against the production port, with a personal case name), a respawn
  monitor with a hardcoded session id, link-detection experiments for
  patterns that no longer exist, and two screenshot and data helpers.
- @types/uuid: uuid 14 ships its own types and TypeScript already
  resolves them from the package.
- config/knip.json now describes the workspace layout it runs in (its
  top-level entry and project keys were being ignored), names the manual
  scripts as entries, lists the system binaries tests shell out to, and
  honours @knipignore. `npm run knip` reports nothing; CLAUDE.md says so.
- Two more unused tap helpers in the mobile test toolkit.
- Docs that pointed at files which no longer exist: the browser testing
  guide (four deleted test files), the orchestrator panel's file name, two
  spawn modules in the Ralph guide, the respawn mock utilities.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 14:25:41 +01:00
Codeman maintainer 6fb8b27768 chore(web): remove frontend code and styles nothing reaches
The frontend JS is outside ESLint and knip, so this pass used an AST scan
(every method, function and top-level constant in src/web/public, counted
against identifiers, strings and index.html) plus a selector scan of both
stylesheets. Each hit was confirmed by text search before it went.

JavaScript
- The ten run<Cli>() one-line wrappers and the quickStart() alias: run()
  has dispatched to _runCliMode(mode) since the launcher consolidation and
  nothing called the wrappers except tests, which now call the launcher.
- The Agent Teams panel code that lost its event listeners in February:
  the team tasks panel, the teammate pane window, rebuildTeammateMap and
  the three maps that nothing filled any more.
- Unreferenced methods: redockSession, refreshOrchestratorStatus,
  toggleSubagentPanel, minimizeSubagentWindow,
  openAllActiveSubagentWindows, pickBetterPath, getTodoIcon, deletePreset,
  closeRunSummary, saveSessionOptions, getAgentParentSessionId,
  _isUltracodeAgentMinimized.
- Six unused constants and a few unused locals (an unused frame-time
  computation in the touch scroll loop among them).

CSS
- 62 classes and one id that no markup, script or test names: the old
  settings-item / settings-section layout, the pre-redesign respawn and
  context-settings rows, the existing-wizard card and others. 116 rules
  and about 770 lines. A dead class inside an :is() list only loses that
  alternative; the rule stays.

Checked in a browser against an isolated instance: no console errors on
desktop or phone, a shell session runs, and 96 screenshots (desktop,
tablet and phone; settings, session options, add case, panels) are
pixel-identical before and after, apart from clock times.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 14:18:13 +01:00
Codeman maintainer f604deba3e chore: remove backend code nothing references
Found with knip (exports, types, class members) and confirmed by a text
search of src, test, scripts and packages before each removal.

- Per-CLI get<Cli>NotFoundMessage() (nine of them) with their message
  constants: missingCliMessage() builds that text from the registry now.
- Registry leftovers: renderCliCommand, asCliId, cliIds, isCliRunnable,
  createCliResolverForTest, profileExists, and two name lists that only
  repeated schema enums.
- A task-description cache in Session that was written on every chunk of
  terminal output (one regex pass per line) and never read since the
  subagent watcher takes descriptions from transcripts. The cache module,
  its pattern and both parse methods go with it.
- Session.parentAgentId / childAgentIds: never set by anything, so the two
  optional SessionState fields were never on the wire.
- Unreferenced methods on TmuxManager (pipe-pane pair, syncMouseMode),
  RespawnController, StateStore.recoverFromBackup (load() already falls
  back to the .bak file), TeamWatcher, SseStreamManager and the AI
  checkers' getErrorVerdict.
- updateCaseEnvVars: the settings.local.json env path that envOverrides
  replaced.
- Re-exports in the utils, cli-registry, routes and prompts barrels that
  no importer used, and unused test helpers (MockStateStore, the mobile
  throttle helpers and others).

Eight mobile tests imported the WebServer type from a path that does not
exist (../src instead of ../../src); type-only, so nothing failed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 13:58:22 +01:00