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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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.
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.
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.
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>
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>
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.
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>
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>
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>
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>
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>