One changeset for everything since 1.51.0: the eleven PRs merged on this
branch, #803's MLX row and #812 already on master, the dead-code cleanup and
the fixes applied while landing. It replaces the eight PR changesets. Patch
until the owner says otherwise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removing THROTTLE_DELAY_MS and STATS_POLLING_INTERVAL_MS in 6fb8b277 left
each neighbour carrying the deleted line's comment, so the toast maximum read
as a throttle delay and the terminal sync wait as stats polling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test pins the symlink and non-file branch of the reply store (a planted
link or a folder at the metadata path is never replaced, and replies are
still accepted), the @fileoverview names the file, its bounds, where the
bridge claims and the four rules a reader has to keep, and a comment left
from the #793 journal approach says store file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each allowed Discord reply is claimed by its message id in a small private store (discord-reply-dedupe.json, 0600) before the rate-limit and exited-agent checks; when the store fails the bridge falls back to memory and still types the reply.
The owner of a managed dsh tab is compared with the server's starter only in
multi-user mode: a record created there keeps its owner, while a single-user
start records none, so that tab would never get its cookie again (new route
test). CLAUDE.md and the invariants doc name the cookie rules. The third item,
Codeman's session cookie filtered on the WebSocket leg whether or not the dsh
cookie is injected, came in with the merge itself, where it met #827.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The format check passes again (Prettier breaks the createCpuUsageMeter call
one argument per line), and the load-average fallback answers 0 instead of
dividing by a core count of 0 on the platform it exists for, where cpus()
is empty.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
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.
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.
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
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.
A version-gated rule reads the session's cliVersion, which the server
probes only for an entry that declares capabilities.gates, so a custom
entry with version-gated and no gates never forwards. Also brings the
claude and copilot comments in line with the code that now reads them.
The --list column is rowLabel() cut to 48 characters: an unnamed session
shows its folder, a long name ends in an ellipsis, and neither resolves as
a name. Point at attaching by number instead. Review on #834.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review on #834: drop the Prettier reflow of docs/tui.md and keep only the
new example line and paragraph, put "two" back in the fast-paths
sentence, list <n|name> in the tui-app.ts fileoverview, and add a
codeman tui <name> line to the README and the Remote Access wiki page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- 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>
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>
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.
- 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>
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>
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>
- 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>
- 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>
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>
- 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>
- 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>
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>
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.
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.
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.
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.
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.
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.
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.