chore: one changeset for the release, and no new em-dashes

Consolidates the four contributor changesets, and rewords the em-dashes this release
added in comments and docs. The five in test/settings-save-failure-ui.test.ts stay:
they assert existing toast text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-04 17:31:48 +01:00
1 parent eb3b08d58b
commit 4960bee779
36 files changed
+117 -106

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ const PATTERNS: Record<TokenPattern, RegExp> = {
'model-plain': /^[a-zA-Z0-9][a-zA-Z0-9._\-/]*$/,
// codex --model, and the value a custom-model `launchModel` is forced onto it. Same
// shape as `model-plain` (leading alphanumeric, so a flag cannot ride the flag) plus
// `:` — Ollama-style ids like `qwen3:32b` must survive onto the command line.
// `:`, since Ollama-style ids like `qwen3:32b` must survive onto the command line.
'model-plain-colon': /^[a-zA-Z0-9][a-zA-Z0-9._\-/:]*$/,
// buildPiCommand — `:` for a thinking suffix (`sonnet:high`), `/` for `provider/id`
'model-pi': /^[a-zA-Z0-9._\-/:]+$/,
+2 -2
View File
@@ -594,13 +594,13 @@ const capabilitiesSchema = z
launchModel: launchModelTemplate,
// State that must survive the isolated-directory redirect, symlinked by name from
// the CLI's real home (deepseek: profiles/sessions/settings.yaml). Single path
// segments only — the consumer joins them, so a traversal here would escape the
// segments only: the consumer joins them, so a traversal here would escape the
// real home. See the field's comment in cli-registry/types.ts.
linkFromRealHome: z.array(homeSegmentName).max(8).optional(),
// Which of `linkFromRealHome` are directories (missing ones are created before
// linking; missing files are skipped). Same segment pattern, see types.ts.
linkFromRealHomeDirs: z.array(homeSegmentName).max(8).optional(),
// The real home's fallback location, relative to the user's home: ONE segment —
// The real home's fallback location, relative to the user's home, ONE segment:
// a leading dot is legitimate (`.dsh` is what ships) but separators, `..` and
// bare `.` are not; the consumer joins it under the user's home, a traversal
// here escapes that home and `.` IS that home (linking THROUGH it unshielded).
+1 -1
View File
@@ -1581,7 +1581,7 @@ const DEEPSEEK: CliEntry = {
// deliberately replaces the user's own for the session rather than linking it.
// `sessions` and `profiles` are directories: dsh creates them itself on a first
// turn, and a fresh/relocated $DSH_HOME that never ran one would otherwise get a
// dangling link whose every write fails ENOENT — the consumer creates missing
// dangling link whose every write fails ENOENT: the consumer creates missing
// directory targets and skips missing file targets like `settings.yaml`.
linkFromRealHome: ['profiles', 'sessions', 'settings.yaml'],
linkFromRealHomeDirs: ['profiles', 'sessions'],
+5 -5
View File
@@ -861,11 +861,11 @@ export interface CliCapabilities {
*
* `appendV1Suffix` (env kind only): the raw `endpoint.baseUrl` gets `withV1Suffix()`
* applied before being written to `baseUrlVar`, instead of being used verbatim. Only
* copilot declares it — its OpenAI-style route is `<base>/v1/chat/completions`, and a
* copilot declares it: its OpenAI-style route is `<base>/v1/chat/completions`, and a
* gateway saves the bare root. claude/gemini must NOT get it: Claude Code's own SDK was
* confirmed working end-to-end against the RAW `baseUrl`, so appending a suffix there
* would be wrong, not just redundant. The per-session config-file recipes do not need
* this flag at all — `renderConfigFile()` applies the suffix inside every template
* this flag at all: `renderConfigFile()` applies the suffix inside every template
* (deepseek's patch included), so no configDir entry carries a raw base URL.
*/
customModelInjection:
@@ -890,11 +890,11 @@ export interface CliCapabilities {
launchModel?: string;
/**
* Names of entries under this CLI's REAL home that must be symlinked into the
* isolated directory after the generated file is written — the same trick
* isolated directory after the generated file is written: the same trick
* `linkSharedProjectsDir()` plays for claude's `projects`. Declared for CLIs whose
* home carries state that must survive the redirect (deepseek's `sessions` transcript
* root and `profiles` bundles, plus `settings.yaml`, which would otherwise stop
* applying and — for `sessions` — get deleted by `removeConfigDir` on clear/close).
* applying and, for `sessions`, get deleted by `removeConfigDir` on clear/close).
* A CLI that saves a linked file by rename replaces the link: dsh does, so the first
* in-session settings write turns `settings.yaml` into a local file.
* Never include `fileName` itself: the generated file owns that name in the isolated
@@ -905,7 +905,7 @@ export interface CliCapabilities {
/**
* Which of `linkFromRealHome` are DIRECTORIES (`sessions`, `profiles`) rather than
* files (`settings.yaml`). A missing directory target is created (mode 0700, what
* dsh does itself on a first turn) before linking — linking a nonexistent directory
* dsh does itself on a first turn) before linking: linking a nonexistent directory
* leaves a dangling symlink the CLI's own `mkdir` under it fails on with ENOENT on
* EVERY turn. A missing FILE target is skipped instead of linked (dangling-file
* links serve no purpose the CLI could not do itself). Must be a subset of
+1 -1
View File
@@ -109,7 +109,7 @@ export interface CustomModelHost {
/**
* The context window to apply for `modelId` on `host`: the discovered per-model figure when
* discovery has one, else the endpoint's user-set `defaultContextLength`, else undefined
* (no override applied, never a guess). ONE helper for every read site — the swap route,
* (no override applied, never a guess). ONE helper for every read site: the swap route,
* the quickstart route and boot recovery each re-write the CLI's config files, and a site
* that forgot the fallback silently loses the endpoint default on the next respawn.
*/
+8 -8
View File
@@ -32,7 +32,7 @@ export function customModelConfigDir(sessionId: string): string {
* (the dir-redirect var plus any `extraEnv` the config file references by
* name). The generated files stay under `baseDir`, but a recipe that declares
* `linkFromRealHome` additionally links (and, for missing directory targets,
* creates) entries in the CLI's REAL home — the caller is still responsible
* creates) entries in the CLI's REAL home: the caller is still responsible
* for choosing an isolated `baseDir` (never the user's real `~/.codex`,
* `~/.pi`, etc.), it is just no longer the only directory touched.
*
@@ -46,7 +46,7 @@ export function applyConfigDirInjection(
injection: ConfigDirInjection,
/**
* The value this SESSION's own env overrides set for `injection.dirEnvVar`, when it
* set one — a user who relocated the CLI's real home (an allowlisted key like
* set one: a user who relocated the CLI's real home (an allowlisted key like
* DSH_HOME) must have their state linked from THAT directory, not the server's.
*/
sessionHomeOverride?: string
@@ -66,10 +66,10 @@ export function applyConfigDirInjection(
* into the otherwise-isolated `baseDir`, so redirecting `dirEnvVar` moves only the
* generated config file and not the state that has to survive the session (deepseek:
* the `sessions` transcript root `removeConfigDir` would otherwise delete, the `profiles`
* bundles the patch composes over, and `settings.yaml`). Declared per entry in stock.ts —
* bundles the patch composes over, and `settings.yaml`). Declared per entry in stock.ts:
* this consumer is recipe-driven and names no CLI itself.
*
* Home resolution: the session's own override first (unless it IS `baseDir` — a re-apply
* Home resolution: the session's own override first (unless it IS `baseDir`, a re-apply
* onto a session already holding a previous injection's value must not self-link), then
* the server's environment, then the recipe's `realHomeFallback`. Only ABSOLUTE values
* are considered: a set-but-relative `DSH_HOME`-style home resolves against the CLI's
@@ -101,24 +101,24 @@ function linkRealHomeEntry(target: string, link: string, isDir: boolean): void {
try {
if (lstatSync(link)) return; // already linked (idempotent re-apply) or a real dir wrote one
} catch {
// ENOENT — nothing is here yet, the only state in which a link gets created
// ENOENT: nothing is here yet, the only state in which a link gets created
}
if (!existsSync(target)) {
if (!isDir) return; // missing FILE target: skip, never plant a dangling file link
// Missing DIRECTORY target: a dangling directory link is not inert — the CLI's own
// Missing DIRECTORY target: a dangling directory link is not inert, since the CLI's own
// recursive mkdir THROUGH it fails ENOENT on every turn (dsh writing under
// `$DSH_HOME/sessions` on a fresh/relocated home). Create it first, 0700, exactly
// what dsh itself does on a first turn.
try {
mkdirSync(target, { recursive: true, mode: 0o700 });
} catch {
return; // e.g. the target's parent refuses writes — no link rather than a dangling one
return; // e.g. the target's parent refuses writes: no link rather than a dangling one
}
}
try {
symlinkSync(target, link, platform() === 'win32' ? 'junction' : 'dir');
} catch {
// best-effort only — a platform that refuses symlinks keeps the documented
// best-effort only: a platform that refuses symlinks keeps the documented
// side effect for this session rather than failing the whole apply over it
}
}
+7 -7
View File
@@ -87,11 +87,11 @@ export interface ConfigDirInjection {
* `customModelInjection.launchModel` template, never hand-built per CLI.
*/
launchModel?: string;
/** Carried from the registry recipe — see `cli-registry/types.ts` `linkFromRealHome`. */
/** Carried from the registry recipe, see `cli-registry/types.ts` `linkFromRealHome`. */
linkFromRealHome?: string[];
/** Carried from the registry recipe — see `cli-registry/types.ts` `linkFromRealHomeDirs`. */
/** Carried from the registry recipe, see `cli-registry/types.ts` `linkFromRealHomeDirs`. */
linkFromRealHomeDirs?: string[];
/** Carried from the registry recipe — see `cli-registry/types.ts` `realHomeFallback`. */
/** Carried from the registry recipe, see `cli-registry/types.ts` `realHomeFallback`. */
realHomeFallback?: string;
}
@@ -181,7 +181,7 @@ function withLaunchModel<T extends EnvInjection | ConfigDirInjection>(
/**
* One quarter of the window is held back for the reply, capped at 8192 tokens (a small local
* model's window must not lose a disproportionate slice to the reservation). Returns undefined
* for an unknown or non-finite size — opencode then keeps its own default guess, which is the
* for an unknown or non-finite size: opencode then keeps its own default guess, which is the
* pre-fix behaviour; never invent a limit here.
*/
function opencodeModelLimit(contextLength: number | undefined): { context: number; output: number } | undefined {
@@ -189,8 +189,8 @@ function opencodeModelLimit(contextLength: number | undefined): { context: numbe
const total = Math.trunc(contextLength);
if (total <= 0) return undefined;
const output = Math.max(1, Math.min(8192, Math.floor(total / 4)));
// `limit.context` is the FULL window as far as opencode is concerned — it reserves for
// the reply itself — so the discovered total is passed through, never a shrunk figure.
// `limit.context` is the FULL window as far as opencode is concerned: it reserves for
// the reply itself, so the discovered total is passed through, never a shrunk figure.
return { context: total, output };
}
@@ -256,7 +256,7 @@ function renderConfigFile(
config: {
providers: {
'codeman-custom': {
// By NAME only (never the literal key — see CUSTOM_MODEL_API_KEY_ENV_VAR).
// By NAME only (never the literal key, see CUSTOM_MODEL_API_KEY_ENV_VAR).
apiKeyEnv: CUSTOM_MODEL_API_KEY_ENV_VAR,
api: 'openai-completions',
baseURL: baseUrl,
+3 -3
View File
@@ -10,7 +10,7 @@
* yields a CANDIDATE: the image-looking paths in its command and output, with the call's
* start and end time. Whether a candidate file was actually produced by the call (its
* mtime falls inside that window) is decided later by whoever can stat it, locally or on
* the remote host — this module does no IO.
* the remote host: this module does no IO.
*
* Chunked input: a transcript is read in byte ranges, so a Bash `tool_use` and its result
* can land in different chunks. Unanswered calls are handed back as `pending` and passed
@@ -50,7 +50,7 @@ export interface EditHunk {
}
export interface EditRecord {
/** The `tool_use_id` of the edit — unique per edit, used to deduplicate. */
/** The `tool_use_id` of the edit: unique per edit, used to deduplicate. */
id: string;
/** ms since epoch, from the result line's `timestamp` (0 when missing). */
ts: number;
@@ -103,7 +103,7 @@ const EXT_END = '(?![\\w-])(?!\\.\\w)';
const TOKEN_CHAR = '[^\\s\'"`<>|;&()=,:*?]';
const PATH_TOKEN_RE = new RegExp(
[
// 1. file:// URL (Codex: `Saved to: file:///…`) — may contain spaces up to the extension.
// 1. file:// URL (Codex: `Saved to: file:///…`), which may contain spaces up to the extension.
// The lazy scan stops at the next `file://`: otherwise it runs to the line end from
// every `file://` of a line that repeats it (quadratic). `:` stays allowed, so a
// timestamped name (`plot-12:30.png`) is still found.
+2 -2
View File
@@ -4,8 +4,8 @@
*
* Sources are the main transcript (`main`) and each subagent transcript
* (`subagents/agent-<id>.jsonl`). Each has a cursor:
* - `offset` — the next byte to read forward; always a line boundary.
* - `floor` — the lowest byte already parsed; > 0 while older lines are unread
* - `offset`: the next byte to read forward; always a line boundary.
* - `floor`: the lowest byte already parsed; > 0 while older lines are unread
* ("ältere laden" reads `[floor − budget, floor)`, see `olderRange`).
* The reader (`edit-history-local-source.ts`) reads forward from each `offset` of the
* current conversation, a file without one from `budget` bytes before its end, and hands the
+1 -1
View File
@@ -84,7 +84,7 @@ Frontend JS modules have `@fileoverview` with `@dependency`/`@loadorder` tags. L
⚠️ **`sendEnterKey()` MUST go through `terminal._core.coreService.triggerDataEvent('\r', true)`** — not `sendInput()`, and never a raw POST to `/api/sessions/:id/input`. `localEchoEnabled` defaults to `MobileDetection.isTouchDevice()`, so on every phone the characters you type are buffered in the `LocalEchoOverlay` and have **never reached the PTY**; the `onData` Enter branch in terminal-ui.js is what flushes `pendingText` first and only then sends `\r` (after an 80ms delay so text lands first). Sending a bare `\r` submits an empty line and strands the typed text on screen, so the button looks dead. Replaying the keypress reuses the overlay flush, the flushed-offset cleanup and the ordering instead of reimplementing them. `KeyboardAccessory.sendKey()` is for escape sequences (arrows/Esc) and is the WRONG template to copy for input.
⚠️ **Skin overrides outrank plain class rules.** `styles.css` nests its skin block inside `html:not([data-skin="og"]) { … }`, so a bare `.btn-toolbar` rule in there resolves to specificity **(0,2,1)** and beats a `.btn-toolbar.btn-x` rule **(0,2,0)** in `mobile.css` regardless of load order. Toolbar-button colors set from mobile.css therefore need `!important` — that is why mobile.css leans on it so heavily. Symptom: only your `!important` properties land and everything else silently renders in generic toolbar grey. Press feedback on the phone bars sidesteps this: the `:active` rules for `.btn-toolbar`, the mobile icon buttons and `.accessory-btn` (mobile.css) use `transform` and `filter` only, which nothing on these buttons sets at a higher specificity, so one rule reads the same on every skin; a background `:active` lost to the skin block on all but og, and an inset `box-shadow` lost to the skin hover rules, which is why neither is used. The light skins darken instead of brightening, and `prefers-reduced-motion` drops the scale.
⚠️ **Skin overrides outrank plain class rules.** `styles.css` nests its skin block inside `html:not([data-skin="og"]) { … }`, so a bare `.btn-toolbar` rule in there resolves to specificity **(0,2,1)** and beats a `.btn-toolbar.btn-x` rule **(0,2,0)** in `mobile.css` regardless of load order. Toolbar-button colors set from mobile.css therefore need `!important`: that is why mobile.css leans on it so heavily. Symptom: only your `!important` properties land and everything else silently renders in generic toolbar grey. Press feedback on the phone bars sidesteps this: the `:active` rules for `.btn-toolbar`, the mobile icon buttons and `.accessory-btn` (mobile.css) use `transform` and `filter` only, which nothing on these buttons sets at a higher specificity, so one rule reads the same on every skin; a background `:active` lost to the skin block on all but og, and an inset `box-shadow` lost to the skin hover rules, which is why neither is used. The light skins darken instead of brightening, and `prefers-reduced-motion` drops the scale.
**Connection-loss UI** (`computeConnectionLossUi()` in constants.js, writer `_updateConnectionLossUi()` in app.js): the service worker serves the cached app shell, so an unreachable server (phone off the tailnet, VPN down, server stopped) used to render a normal-looking empty dashboard whose only tell was the 8px header dot, which reads as "no sessions", not "no connection". Two surfaces now: a full-screen **overlay** while no server state has loaded this page load (nothing behind it is worth preserving), and a non-blocking **banner** once it has (the terminal scrollback stays readable). ⚠️ A **2.5s grace** is load-bearing: a COM deploy restarts the server and SSE is back in ~200ms, and a banner on every deploy trains the user to ignore it. `navigator.onLine === false` skips the grace, since that is never a blip. Retry re-arms SSE **and** the terminal WS (`planWsReconnect` can 'give-up', and the SSE backoff caps at 30s).
+1 -1
View File
@@ -119,7 +119,7 @@ function breathe(): Promise<void> {
* Bash candidates whose probed file is a regular file with an mtime inside the call's window
* (files claude sent to the user skip the window: they exist and were shown on purpose).
* A candidate whose file version is already recorded is skipped: `known(path)` is the newest
* entry time for that path, and an entry at or after `mtime − slack` saw this version — the
* entry time for that path, and an entry at or after `mtime − slack` saw this version: the
* `ls *.png` right after the render, or a Write followed by a listing. Candidates are taken
* in call order so a batch dedupes itself the same way.
*/
+3 -3
View File
@@ -1013,7 +1013,7 @@ Object.assign(CodemanApp.prototype, {
* Resolves the raw route payload rather than a model id so the caller can tell the
* three answers apart: llama-swap naming a model; `isLlamaSwap: false`, which is what
* the route answers for EVERY failure it catches (a server without a `/running`
* route, a refused or unresolvable endpoint, a 401 from a wrong key) — safe to
* route, a refused or unresolvable endpoint, a 401 from a wrong key): safe to
* explain in the UI as long as the wording also fits an endpoint that is down; and
* `null`, only when Codeman's own request to the route failed or the client-side
* bound below won the race, which stays silent, since the endpoint may merely have
@@ -1175,7 +1175,7 @@ Object.assign(CodemanApp.prototype, {
})
.join('');
modal.classList.add('active');
// A fresh open always starts unfiltered with the caret in the search box — the
// A fresh open always starts unfiltered with the caret in the search box: the
// list was just rebuilt, so clearing the input is the whole reset; focus is the
// user's next keystroke away. Inside the generation guard above, so a
// superseded probe can neither focus nor clear a modal that now shows another
@@ -1203,7 +1203,7 @@ Object.assign(CodemanApp.prototype, {
* query restores the list byte for byte. ⚠️ `.run-mode-option` carries its own
* `display: flex` (styles.css, restated in mobile.css), which outranks the UA
* `[hidden]` rule, so styles.css re-asserts `display: none !important` for
* these rows — without it the filter would silently do nothing.
* these rows: without it the filter would silently do nothing.
*/
filterCustomModelPick(value) {
const list = document.getElementById('customModelPickList');
+2 -2
View File
@@ -7815,7 +7815,7 @@ html[data-skin="og"] .welcome-primary:hover {
}
/* The picker's search box reuses .session-sidebar-filter-input's theme-token
styling (same reasoning as the .set-scope pill above) — only its own spacing
styling (same reasoning as the .set-scope pill above): only its own spacing
and the no-matches line are added here. 0.35rem is the standard gap the
modal's neighbouring form fields already use (`.form-hint`'s own margin-top):
the global `* { margin: 0 }` reset left the box sitting flush under the CLI
@@ -22681,7 +22681,7 @@ html .toolbar .btn-git-status[aria-expanded='true'] {
/* ── Edit history: header button + panel (edit-history-ui.js) ───────────────── */
/* "Edit history" header button — opt-in (App Settings → Header & Panels), hidden by default.
/* "Edit history" header button: opt-in (App Settings → Header & Panels), hidden by default.
Same marker pattern as the Attachments button: a base inline-flex !important so an inline
style can't override it, and a more-specific marker rule to hide. Phones hide it regardless
(mobile.css). */
+4 -4
View File
@@ -364,7 +364,7 @@ async function discoverModels(
// itself calls loaded. Listed figures above are unaffected: reading them triggers nothing.
const hasStatusField = entries.some((m) => m && typeof m === 'object' && 'status' in m);
const slotCounts: Record<string, number> = {};
// Ids whose figure THIS round's loaded-model probe answered — the listed figure remains
// Ids whose figure THIS round's loaded-model probe answered: the listed figure remains
// the source only for the ids NOT in this set (see the per-slot correction below).
const ctxFromProbe = new Set<string>();
if (hasStatusField) {
@@ -412,13 +412,13 @@ async function discoverModels(
}
}
// llama-swap documents the LISTED `context_length` as the PER-SLOT window, so whenever
// the listed figure is the one taken this round — the model was not loaded, or the
// probe answered nothing — its slot count is 1 by definition: the floor check must NOT
// the listed figure is the one taken this round (the model was not loaded, or the
// probe answered nothing), its slot count is 1 by definition: the floor check must NOT
// divide a per-slot figure a second time. Without recording 1 here, the count a loaded
// round stored survives the merge (applyDiscoveredModels keeps what a later round does
// not overwrite): 262144 @ 4 slots stored, model unloaded, listed 65536 → 65536 with 4
// slots → a false 16384-per-slot warning. Even a count this round's launch command
// parsed must yield — pairing a per-slot listed figure with the cmd's --parallel is the
// parsed must yield: pairing a per-slot listed figure with the cmd's --parallel is the
// same double division. Same rule the /props branch above applies. Ids whose figure the
// probe DID answer keep their probe-derived count untouched.
for (const id of Object.keys(contextLengths)) {
+2 -2
View File
@@ -1535,7 +1535,7 @@ export class WebServer extends EventEmitter {
// already fired once) and the session-env real-home lookup: the injected VALUES are
// never persisted, so after a real restart the session can no longer carry its
// allowlisted `DSH_HOME` either (`getEnvOverridesForPersist()` keeps only
// `CLAUDE_CODE_*`/`CLAUDE_CONFIG_DIR`) — the lookup could only ever hit on the first
// `CLAUDE_CODE_*`/`CLAUDE_CONFIG_DIR`): the lookup could only ever hit on the first
// apply in-process. Real-home resolution therefore falls back to the SERVER's
// `DSH_HOME` or the recipe's `realHomeFallback` (~/.dsh).
return applyCustomModelInjection(
@@ -1556,7 +1556,7 @@ export class WebServer extends EventEmitter {
* bookkeeping must come from the CURRENT recipe, not from the saved record: this is the
* first feature where a shipped recipe changed KIND (deepseek: env redirect -> per-session
* patch home), so a selection saved by an old build restores with e.g. no `configDir`
* while the new recipe writes one — and clearing it later could then never delete the
* while the new recipe writes one, and clearing it later could then never delete the
* generated dir. `envKeys` is the UNION of saved and applied keys: the tmux session may
* still carry `setenv`s from both, and a clear has to unset every one.
*/