Commit Graph
4214 Commits
Author SHA1 Message Date
Codeman maintainer a117955490 fix(web): the review item of #850 that goes on top
The Dock button's hidden attribute was set only when a preview opened, so
with a preview open, switching Codex files off left a Dock button that did
nothing and switching it on showed none until the next preview.
applyHeaderVisibilitySettings() now sets it beside the Response files
button, and a test flips the setting with a preview open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 10:16:05 +01:00
Codeman maintainer d3d1f7cde1 docs: the review item of #869 that goes on top
The Prompt uploads paragraph said the server keeps out what it "would
run"; the scope exclusion keeps out what an agent could run, the phrase
docs/api-reference.md and docs/architecture-invariants.md already use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 10:16:05 +01:00
Codeman maintainer 3397d11859 Merge #859: a chat view shows a Claude session's conversation, rendered and live (chat view 1/5)
# Conflicts:
#	docs/architecture-invariants.md
#	src/web/CLAUDE.md
#	src/web/public/settings-ui.js
2026-12-03 10:15:29 +01:00
Codeman maintainer ab5f197dcc Merge #850: Open Codex file links in a docked preview (COD-152) 2026-12-03 10:15:14 +01:00
Codeman maintainer 01380d8b26 Merge #854: feat(auth): sign in through a trusted reverse proxy in multi-user mode (experimental) 2026-12-03 10:15:13 +01:00
Codeman maintainer 95ad7f2d00 Merge #863: fix: a server running as root starts Claude, and a headless install gets past sudo 2026-12-03 10:15:12 +01:00
Codeman maintainer ef730de240 Merge #860: docs: add Japanese README 2026-12-03 10:15:12 +01:00
Codeman maintainer 7df0f11892 Merge #869: feat(uploads): prompt uploads accept .html and .htm as documents 2026-12-03 10:15:11 +01:00
Codeman maintainer 111fb323ee Merge #866: fix(web): a markdown table column no longer shrinks to one letter per line 2026-12-03 10:15:10 +01:00
Ludo FourrageandClaude Opus 5.5 5374d020d7 docs(uploads): the last three places describing the html refusal
api-reference limits the refused example to scripts and says html/htm are
admitted and inert, leaving svg as the markup type kept out.
architecture-invariants lists html/htm in the text family and drops html from
the scope exclusion, as CLAUDE.md does. The wiki says the File Viewer shows an
uploaded page's source, which is what a click on its path does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 13:28:58 -08:00
Ludo FourrageandClaude Opus 5.5 85c0f35972 feat(uploads): prompt uploads accept .html and .htm as documents
AI tools write specifications, reports and plans as HTML as often as
Markdown, and handing one to a session as context is the same job as
attaching a .md. Paste, drop and every Attach picker refused them with
"Unsupported file type".

.html/.htm join the text family (UTF-8, no NUL byte) on the server and in
every browser copy the parity test pins. An upload is stored to be read,
never rendered on Codeman's origin: file-raw serves it as octet-stream with
nosniff and html-view refuses a page under .codeman-uploads, both now pinned
by tests. Scripts (.sh, .py, .js) are still refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:32:25 -08:00
Michael GrundbergandClaude Opus 5.5 691ea6c87a fix(web): inline code and links in a table cell break anywhere
Chromium never breaks a line after `/`, so under the cells' `break-word` a
URL, an identifier or a hash in backticks set its column's width, and the
whole table scrolled sideways on a phone. Inline code and links in a cell
now break anywhere, and a cell holding one gets the 6em floor that cells
with a linked path had. In a 360 px column in Chromium and Firefox, URL,
identifier and hash tables fit as they did on master.

Two costs remain. A code-only column such as `-v` grows from 52 px to
80 px. CSS cannot tell an autolink from a link with a prose label, so a
long word in a label can break mid-word in a narrow column.

The test's selector lookup now splits a selector list only on commas
outside parentheses, so it can find the `:is()` and `:has()` rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:37:05 +01:00
Michael GrundbergandClaude Opus 5.5 5588a54e3f fix(web): a table column of linked paths keeps a readable width
The first commit left one case of the same squeeze. Codeman turns the
paths in an answer into links, and a linked path keeps
`word-break: break-all` so that it can wrap anywhere. That lets the
browser count every letter as a break point when it sizes the column,
so in a table whose headers fill the width, a column of paths shrank
to three or four letters per line. A cell that holds a linked path now
has a minimum width of 6em. Other cells keep their natural width, so a
narrow column such as row numbers stays narrow.

On a 390 px view in Firefox and Chromium, a path column went from 48 px
to 83 px, and a `#` column kept its 32 px.

The comment on the cell rule also said wrongly that a cell breaks a word
wider than its column. In automatic table layout a column is never
narrower than its longest word, so that never happens, and the comment
now says that.

The test reads every rule that names a selector, in styles.css and
mobile.css, with comments removed first, so a later override fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:50:00 +01:00
Michael GrundbergandClaude Opus 5.5 2ea593c2e2 fix(web): a markdown table column no longer shrinks to one letter per line
Rendered markdown sets `overflow-wrap: anywhere` so that a long path in
prose wraps, and table cells inherited it. With `anywhere`, the browser
counts every letter as a break point when it computes a cell's minimum
width. The header cells never wrap, so in a table whose headers fill the
width, the column under an empty header got only its minimum width, and
its labels stood one letter per line.

Table cells now use `overflow-wrap: break-word`. A cell still breaks a
word that is wider than its column, but its minimum width is its longest
word. In Chromium, the label column of a five-column table went from
36 px to 74 px and wraps between words. A table with an unbreakable
cell wider than the view scrolls sideways inside its wrapper, which the
wrapper already allows.

The Response Viewer and the File Viewer's markdown view share these
rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:01:47 +01:00
Aamer Akhter e3c156e6e8 fix(preview): COD-152 put Codex file extras behind a per-device setting
The Response files header button, taking a click on a Codex sidebar file
tab (and the link suppression on those rows) and the Dock control on file
previews now sit behind one per-device setting, codexFilePreviewsEnabled
(App Settings > Header buttons > Codex files), default off. With it off
none of the three exists, and Response files stays off phones even with
it on.

Also from the second review: the docked preview is z-index auto so it
sits under modals and the response viewer, a double-click no longer
opens the preview, the parsed conversation is cached per idle session
until its next turn, the Response files rows are buttons, and the two
tests that failed at the previous head pass. Documented in
Settings-Reference, Working-With-Files and src/web/CLAUDE.md.
2026-11-27 12:58:48 -05:00
Codeman maintainer c51a7134eb fix(install): a headless run with a passwordless sudo gets past the sudo step
A non-root account with a working passwordless sudo and no controlling
terminal (su - user -c, cron, a CI runner, cloud-init) ended on "Failed to
obtain sudo privileges". The /dev/tty node exists there and cannot be opened;
install.sh tested [[ -e /dev/tty ]] and then ran sudo -v < /dev/tty, whose
redirect fails before sudo starts. Measured 2026-11-27 in a fresh ubuntu:24.04
container: node present, open refused, sudo -n true fine, install dead at
"Installing Git via apt".

- tty_openable() opens the node, the probe has_tty() already used, and every
  redirect from /dev/tty now sits behind it instead of a file test:
  ensure_sudo, sudo_session_try, the message choice in sudo_session_start,
  and the three sites with the same shape (Homebrew, the Tailscale installer,
  tailscale up). With no terminal they fall back to the plain command.
- ensure_sudo returns as soon as sudo -n true works. sudo -v is no substitute
  for that test: it asks for a password as soon as one sudoers entry of the
  account asks for one, so an account in the sudo group with a NOPASSWD entry
  of its own (the cloud-image layout) runs sudo <command> freely and is
  refused by sudo -v (measured on sudo 1.9.15).

test/install-sh-invariants.test.ts fails for a file test on /dev/tty and for
a redirect from it that is not directly under the probe, and drives the sudo
helpers in a real bash with no controlling terminal against a stub sudo.

Checked in a throwaway ubuntu:24.04 container, through su - user -c with
CODEMAN_NONINTERACTIVE=1: the installer before this change stops at the sudo
step, this one installs git, tmux, Node.js and the build tools, clones and
was building when the check was stopped. The helpers were also run under
bash 3.2.57. The Homebrew branch could not be run here (no macOS).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:54:43 +01:00
Codeman maintainer d9fce03444 fix(launch): a server running as root starts Claude without the bypass flag
Installed and started as root (a VPS, an LXC container), every local Claude
session died at once: the default permission mode launches Claude Code with
--dangerously-skip-permissions, and Claude Code refuses that flag under uid 0
("cannot be used with root/sudo privileges for security reasons", pane dead
with status 1). Shell sessions were fine. Measured 2026-11-27 with the public
installer in a fresh ubuntu:24.04 container.

Docker cases already answer the same refusal for a root container with
overlays.docker.rootCommand. This is the host-level form, as registry data:

- An enum launch param may declare rootValue, a map from a value to the value
  it takes when the server process runs as uid 0 and the launch is local.
  Claude declares claudeMode: dangerously-skip-permissions -> normal. The
  schema holds keys and replacements to the param's values.
- applyRootValues() (config/cli-registry/root-launch.ts, pure) rewrites the
  param values before the argv engine sees them and hands back the object it
  was given when nothing changes, so a launch that is not root is
  byte-identical (the spawn goldens are untouched).
- serverRunsAsRoot() (utils/server-uid.ts) reads the uid at call time. Under
  vitest it answers false unless a test stubs it.
- The uid is asked in two places only. serverRootSpawnOptions() feeds the two
  tmux launches (createSession, respawnPane), which every local tmux launch
  goes through: new session, resume, dead-pane respawn, restartCli(), cron,
  quick-start, reboot restore. buildPermissionArgs() covers the two launches
  with no tmux, the direct-PTY fallback and the one-shot run.
- Remote and Docker pane commands never read it, and auto, allowedTools and
  normal are passed through unchanged. IS_SANDBOX is not set.
- Each swap is logged once per launch, naming the cause and the way out.

Checked end to end in a throwaway ubuntu:24.04 container running this tree's
server as root with Claude Code 2.1.332: the pane command carries no bypass
flag, the pane stays alive on Claude's first-run screen, and the log line is
there. The same run as an ordinary user keeps the flag.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:54:43 +01:00
Michael GrundbergandClaude Opus 5.5 c6fff5e6a8 feat(web): a chat view shows a Claude session's conversation, rendered and live
A local or Docker Claude session can show its conversation as rendered text,
the way the Response Viewer draws it, in place of the terminal. The terminal
stays attached and sized underneath, so switching views never resizes the pane,
and the user still types in the terminal. Discussion #858 has the background.

- A Chat / Terminal switch and Alt+Shift+C change the view, and each session
  remembers its choice on this device until the session is gone. Two per-device
  settings pick the default view and hide the switch. Phones, remote and
  adopted sessions keep the terminal.
- The server broadcasts `transcript:update`, at most one per 750 ms per session,
  and the view re-reads the conversation on it, so an answer fills in mid-turn.
- The server keeps each transcript's parse and the byte offset it reached, so a
  read parses only the bytes appended since the last one, in chunks with an await
  between them. Overlapping reads of one file share one pass. The Response
  Viewer and the Discord bridge read through it too.
- A full conversation read starts a transcript watcher for a session that has
  none, such as one picked up after a server restart.
- A Docker session's hook reports the container's transcript path, and the
  server watches the host's copy of that file.
- After `/clear`, Claude Code runs the statusline command with the new
  conversation's id and transcript path. The statusline exporter posts them, and
  the server follows the new conversation the way it follows a hook's report.
- Keep-warm turns are hidden, long prompts fold, a "Working" line shows the turn's
  running time, and a pending dialog shows a notice that opens the terminal.

The design note, docs/chat-view-plan.md, covers this and the four steps that
follow it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 10:18:29 +01:00
Ikko Eltociear AshimineandClaude Opus 5.5 58b923f2e5 docs: fix README.ja.md anchors and paste wording, guard translated READMEs in test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:24:25 +09:00
Codeman maintainer 6db166f3f8 chore: version packages codeman@1.52.0 xterm-zerolag-input@0.4.3 2026-11-27 08:19:14 +01:00
Ikko Eltociear Ashimine fd2b232efe docs: add Japanese README 2026-11-27 15:41:40 +09:00
Codeman maintainer b3e781696a test(web): #815's cleanup test knows the input settle #839 added
Both land in this release. #839 makes _cleanupPreviousSession() settle the
main pane's native input first, and #815's test drives that method on a
stub app that did not have it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 07:40:03 +01:00
Codeman maintainer 854f316809 chore: the release changeset names #815
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 07:37:39 +01:00
Codeman maintainer 00552ac04a docs: the maintainer bot also triages issues
The sentence had been sitting uncommitted in the shared checkout since
1.51.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 07:36:44 +01:00
Codeman maintainer 4936e07ca2 Merge #815: fix(web): manual Reload history action for the tmux repaint gap above live output (#814)
# Conflicts:
#	src/web/CLAUDE.md
2026-11-27 07:36:29 +01:00
Codeman maintainer 51852dbdbc chore: the release changeset names #840 and #853
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 06:13:56 +01:00
Codeman maintainer fcccdd07c5 fix(tui): the review items of #853 that go on top
The one-row nudge before a forced resize at an unchanged size runs only
for a tmux-backed session. On a direct PTY the process is the agent
itself, which got two height changes where master sent none. The
unrelated table reformatting in docs/tui.md is dropped.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 06:13:29 +01:00
Codeman maintainer f2c03e6bf3 Merge #853: fix(tui): the attached terminal takes the window size back after a browser resized it 2026-11-27 06:11:12 +01:00
Codeman maintainer d5fe0adfe7 test(tmux): the review item of #840 that goes on top
The live-pane close case moves into test/kill-pid-guard.test.ts, whose
harness answers ps from a fixed table. In tmux-manager.test.ts the mock
keeps the real execFile, so the walk read this machine's process table.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 06:10:21 +01:00
Codeman maintainer a4201b34a8 Merge #840: fix(tmux): see an exited agent on tmux 3.8, which blanks a dead pane's pid 2026-11-27 06:08:26 +01:00
13768039+zomby1 a69ceef4f0 docs(auth): say which requests the proxy example still redirects
The rule answers a request with a non-navigation Sec-Fetch-Mode with 401. A
client that sends no such header is redirected as before, and a WebSocket
handshake never followed the redirect.
2026-11-26 18:34:40 +01:00
13768039+zomby1 029adccb83 docs(auth): the two dead-capability requests with no route status to copy
A WebSocket upgrade and GET /webview/<cap> without the trailing slash get the
hook's 403 under a dead web-tab capability. Say so in section 10a, next to the
statuses.
2026-11-26 18:34:40 +01:00
13768039+zomby1 992819ba98 test(auth): pin the hook's 403 for the two dead web-tab requests
Under a dead web-tab capability, GET /webview/<cap> without the trailing
slash and a WebSocket upgrade have no route status to copy (the route
alone redirects, or accepts and closes with 4003). With trusted-proxy
sign-in on, the hook answers both with 403, no challenge and no count.
The refusal test sends each of them more often than the per-IP failure
limit, before its final Basic sign-in, so a counted one turns that
sign-in into a 429.
2026-11-26 18:34:40 +01:00
Kamil KaliszandClaude Opus 5.5 70ee1312d4 fix(tui): Redraw wins, leaks are told by process, detach unsets the whole hook array
Review follow-up on the follow-typing attach.

- Redraw (and every forced resize at an unchanged size) handed the window
  back to the terminal: an unchanged pty sends tmux no SIGWINCH, so the
  terminal stayed the latest client and the after-resize-window hook undid
  the resize-window. Session.resize() now nudges the pty one row first
  (FORCED_RESIZE_NUDGE_MS), then applies the size, so tmux counts the tab
  as the client used last; the second move bumps the guarded geometry
  revision too. Under manual with no attach the agent sees no change.
- With the nudge, client-active[91] alone covers every case, so the
  after-resize-window hook is gone. It kept latest through every browser
  resize and cost the agent three height changes per resize; now the first
  resize after the terminal was used costs two and later ones one. The
  cost is stated next to the hook.
- The leak sweep matched owners by tty, and Linux hands the next terminal
  the pty that just closed, so the common leak was never swept. The arm
  now records the TUI's pid (@codeman-tui-follow-pid), and the sweep keeps
  only sessions this process armed (a Set filled before the first write)
  or whose pid is another live process. One list-sessions call reads every
  owner. It also runs before each attach dresses its sessions, so
  `codeman tui <n>` gets it and a leaked hook cannot undo presizeWindow().
- `set-hook -u` on our index left an empty session-level array, which
  hides the user's global hook on that event. Disarm unsets the whole
  event when ours is its only entry, and arm refuses while the user has a
  global client-active hook.
- Arm and disarm are one tmux call to read and one to write (`;` lists).
- Docs: the "forced resize when a browser opens a session" wording was
  wrong (selectSession sends no force; only Redraw, a closing pop-out and
  the split pane do), fixed in tui-client.ts, docs/tui.md and the
  invariants, whose paragraph now stands on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 10:46:57 +01:00
Kamil KaliszandClaude Opus 5.5 9309500d40 fix(tmux): a pane pid of 0 falls back to the recorded pid on close
Review follow-up (owner's merge-time items, applied here).

- killSession() used `pane.pid ?? session.pid`, which kept tmux's 0 for
  an empty active pane (`split-window ''`: `1|0|` up to tmux 3.6, `0|0|`
  on 3.7) beside a running agent, so the close signalled nothing where
  master signals the agent's tree. `||` restores that; isSignalablePid()
  still refuses 0 or 1.
- kill-pid-guard.test.ts answered the old pid-only read, which the
  three-field parser read as no pid, so no case gave killSession() tmux's
  own 0. Its mock now answers the kill read, with cases for `1|0|`,
  `0|0|` and `0||` against a recorded agent pid and a recorded 0.
- Tests pin the whole kill read format, and the reconcile rule that a
  pane without a pid never overwrites a live pane's pid. Dropping
  `#{pane_dead_time}`, using `??` or `pane.pid` alone, or a plain
  `active.set(...)` each fail now.
- parsePaneKillRead() cases for `1|0|`, `0|0|` and `1|-1|`.
- Comments and docs: the blank pid with a late dead flag is tmux 3.8;
  on 3.4 only the seconds to collect the status were measured. A pid
  below 2 is no pid. The recorded pid is unreaped in the closing window
  only when it is the pane's start pid (`respawn-pane` breaks that).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 10:20:57 +01:00
13768039+zomby1 dcfa76125f docs(auth): send only page navigations to the proxy sign-in
Background requests from an open page followed the redirect to the sign-in
start, and each one replaced oauth2-proxy's CSRF cookie, so a real sign-in
could end on its CSRF error page. The example now answers them with 401 and
uses one CSRF cookie per sign-in.
2026-11-26 08:53:20 +01:00
Kamil KaliszandClaude Opus 5.5 95918b80b4 Merge master into fix/dead-pane-blank-pid
Resolves the killSession() conflict with babb55e4 (never signal pid 0
or 1). The dead-pane read decides first; a pid that is not signalable
(isSignalablePid) then also means nothing is signalled and only
`tmux kill-session` runs. killPaneProcessTree() sends every signal
through signalProcess().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:16:11 +01:00
Codeman maintainer 64c8d1c8a5 chore: the release changeset names the Mac app's server tabs
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 17:43:21 +01:00
Codeman maintainer b957eb8dea Merge #816: feat(desktop): server tabs, several Codeman servers open in one window 2026-11-25 17:43:21 +01:00
Codeman maintainer 6824fe666c chore: the release changeset names the four bugfixes and becomes a minor
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 17:43:05 +01:00
Codeman maintainer 5672e47a2d Merge #817: fix(desktop): pasting an image with Cmd+V works in the Mac app 2026-11-25 17:15:16 +01:00
Codeman maintainer 03916d75a1 Merge #819: fix(mobile): the phone toolbar sits on the keyboard, and the prompt's last line is no longer under it 2026-11-25 17:15:16 +01:00
Codeman maintainer 38c98529c4 Merge #857: fix(web): a dialog opened with the mouse hands the keyboard back to the terminal 2026-11-25 17:15:15 +01:00
Codeman maintainer 063476ec55 Merge #851: fix(tabs): keep the working spinner on a ledger cell 2026-11-25 17:15:15 +01:00
Codeman maintainer 7a3bbce7d5 chore: the changeset for the next release
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 16:11:57 +01:00
Codeman maintainer eb40f4aaa5 Merge #839: fix(web): synchronize iOS keyboard edits (#830) (@HadrienKerlero) 2026-11-25 16:11:57 +01:00
Codeman maintainer dfd661f9d1 docs(auth): the two wording nits of #838's review
An empty Authorization header is treated like a missing one, and the docs
say so. The comment on why hook-secret failures keep their own bucket no
longer claims a shared one would 429 a request without credentials.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 16:11:57 +01:00
Codeman maintainer fc41bb5b13 fix(files): the review items of #848 that go on top
A restore no longer pages through a whole large folder for an expanded
folder that is gone: directories are listed before files across pages, so
a loaded file ends the search, and the expansion is forgotten. An expanded
folder that waits for its turn in the restore says it is loading, and a
search-result folder opened while the tree was loading runs the restore
afterwards. The error line keeps its parts in separate elements so the
zh-CN entries apply, one local match reads in the singular, and the search
box labels the phone keyboard's Enter key.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 16:11:57 +01:00
Codeman maintainer 76c5f1a99b fix(installer): the review items of #847 that go on top
The manual multi-user start line is printed only where no service runs:
next to a working service it would start a second server on the same data
dir and tmux socket. The Environment= reader removes quotes wherever they
sit in a word, as systemd does, so a hand-written CODEMAN_MULTIUSER="1" or
CODEMAN_PASSWORD="my pass" survives a re-run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 16:11:57 +01:00
Codeman maintainer f109bdc23a docs(wiki): the review items of #845 that go on top
The drop-in is the right place because the installer and
`codeman service install` rewrite the unit file and drop
CODEMAN_ALLOWED_HOSTS, not because it sits outside the checkout. The unit
of a named instance is named.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 16:11:57 +01:00