Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

docs(changelog): 2026-08-10/11 batch entries (#250)

Yaowei Zhengef880c0bd7f4
diff --git a/changelog/unreleased/2026-08-07-core-runtime.md b/changelog/unreleased/2026-08-07-core-runtime.md
index e61e47d1..df47ddb8 100644
--- a/changelog/unreleased/2026-08-07-core-runtime.md
+++ b/changelog/unreleased/2026-08-07-core-runtime.md
@@ -1,4 +1,4 @@
-# Core: unlimited default turn cap, model-window-derived limits, slower and simpler retries, trace integrity
+# Core: unlimited default turn cap, model-window-derived limits, slower and simpler retries, trace integrity under concurrency and crashes
## Unlimited default turn cap
@@ -16,6 +16,8 @@ Running against a small-window OpenAI-compatible endpoint (e.g. a local vLLM wit
The retry ladder's base goes 250ms → 2000ms (2s/4s/8s/16s/30s, ≈60s total patience; count and ceiling unchanged), so transient provider failures get a real recovery window and every planned wait clears the web app's countdown display floor. Classification is simplified to "every LLM error retries except auth": explicit auth signals still stop immediately, everything else — bare 403s, 400s, 429s, 5xx, quota/subscription messages, transport errors — rides the ladder and fails only after exhaustion. The quota-detection machinery (`isQuotaExhaustedError` and its message heuristics) is removed. Deliberate tradeoff: genuinely permanent errors now burn the full ladder before surfacing.
-## Trace integrity under concurrent writes
+## Trace integrity under concurrent writes and crashes
Trace appends are serialized inside the writer, so concurrent producers (parallel tools, the model stream) can no longer tear a multi-megabyte record — e.g. a base64 image Data URL — into invalid JSONL (#215). Trace reads are best-effort: a malformed middle line in files damaged before the fix is skipped with a truncated stderr diagnostic and every parseable record is kept, so previously corrupted sessions resume and render again (the skip is O(n) even for heavily damaged files); server-side Trace import still validates strictly, and truncated-last-line tolerance is unchanged. The Session-index head reader shares the tolerant path, so a damaged head window no longer blocks reconciliation forever.
+
+A field incident closed the remaining tear window (#249): `fs.appendFile` splits payloads larger than 512 KiB into multiple underlying writes, which is how a pre-serialization build spliced a `request_end` event into the middle of a 1.48 MB image record at exactly the 524288-byte chunk boundary — and even with serialized appends, a process death between chunks would still leave a partial record that later appends glue onto. Each record is now appended with a single `write(2)` on an O_APPEND handle, so a crash can at most truncate the last record, never split one mid-file. Before Session resumption continues a pre-existing shard, the writer probes the tail: a file not ending in a newline gets the next record started on a fresh line, so a crash-torn tail never swallows the records appended after it (a mid-record append failure such as ENOSPC heals the same way). Both guarantees are documented on the docs' sessions-and-traces page.
diff --git a/changelog/unreleased/2026-08-10-web-chat-ux.md b/changelog/unreleased/2026-08-10-web-chat-ux.md
new file mode 100644
index 00000000..53c44672
--- /dev/null
+++ b/changelog/unreleased/2026-08-10-web-chat-ux.md
@@ -0,0 +1,25 @@
+# Web App: chat UX batch — password notice, process list, draft conversations, panel sequencing, queued-send correctness
+
+## Startup initial-password notice (server + CLI)
+
+The seeded admin password is persisted in `<root>/initial-admin-password` (0600) while it remains the initial one. Every server start re-prints it framed in ASCII with a change-it reminder, and `penguin web` attaching to an already-running instance prints the same notice (new side-effect-free subpath export `@prismshadow/penguin-server/initial-password`). Any admin password update — self change, desktop set, or an admin reset — deletes the file; legacy roots without the file stay silent. Docs (`quickstart` / `web-app` / `server-api`, READMEs) updated.
+
+## Conversation details: merged stats entry, process list, trace file row
+
+The Token / cost / elapsed chips move to the toolbar's far right and are themselves the details trigger on `sm+` viewports (below `sm`, only the info icon shows). While the conversation has live background processes, a green running-services count rides right of the elapsed chip. The details card shows Model / Workspace / created time / stats one per line (tokens with an input / cached / output breakdown), then an interactive process list (cmd, start time, pid; the stop button kills the whole process group) and a trace-file row naming the actual `.jsonl` path with a deep link to the trace page (replacing the "view trace" button).
+
+## Background-process plumbing and lifecycle (core + server)
+
+`ManagedSession` keeps `cmd`/`cwd`/`startedAt` and exposes `pid`; the registries gain enumeration and kill-by-id; core `Session`/`Environment` expose `listBackgroundCommands()` / `killBackgroundCommand()`; new routes `GET /api/sessions/:id/processes` and `POST /api/sessions/:id/processes/:processId/kill` (active runtime only). Deleting a Session/Agent/Project now disposes the runtime after its drive settles — background processes die with the conversation — and idle eviction skips entries with live background processes (eviction would strand the OS process with no remaining stop control).
+
+## Parked draft conversations
+
+Clicking any new-chat entry point while the composer holds typed text parks the draft as a row in a new sidebar Drafts group (per user × Project in localStorage, newest first, cap 50). Rows open at `/chat/draft-<id>` with all selections restored, can be edited (auto-saved), sent (becomes a real session, row removed), or deleted (confirm dialog). The skills quick-invoke / import prompts park instead of silently overwriting typed text.
+
+## Panel and stream polish
+
+Opening the workspace panel while the agents panel is open (or vice versa) retracts the open panel fully before sliding the new one in, so the swap reads as a real retract instead of a wipe; mobile Sheets keep the instant switch. A ResizeObserver re-snaps the message stream to the bottom (under the existing follow guards) when the container or content resizes outside a stream commit — the initial-password banner no longer leaves a fresh conversation sitting a banner-height above the bottom. The benchmark case browser expands both material groups by default and pins the readme auto-preview to the statement group; clicking the composer's read-only model chip toasts that `/model` switches models.
+
+## Queued follow-up correctness
+
+Two races around the mid-run send path are fixed: a `/steer` that returns `409 not_running` during the completion boundary now re-routes the whole draft through the existing `queueIfBusy` Task path instead of a bare `POST /tasks` that could land `409 task_in_progress` and drop the draft (#227, closes #89); and the per-turn thinking level picked in the composer now rides the follow-up queue path too — previously `onQueueFollowUp` posted only the input, silently dropping the level on the very send it was picked for (#246).
diff --git a/changelog/unreleased/2026-08-11-web-session-and-schedule-forms.md b/changelog/unreleased/2026-08-11-web-session-and-schedule-forms.md
new file mode 100644
index 00000000..d706ecce
--- /dev/null
+++ b/changelog/unreleased/2026-08-11-web-session-and-schedule-forms.md
@@ -0,0 +1,8 @@
+# Web App: copyable Session id, schedule-form pickers, saved toast, {{SHELL}} placeholder
+
+Four chat/settings tweaks (#245):
+
+- **Copyable Session id.** The chat details card gains a Session id row under the model line; the id is a click-to-copy button (label flips to "Copied", optimistic so it works regardless of clipboard-permission context).
+- **Schedule form selectors match the Project defaults dialog.** New-Session mode uses the same form-variant `ModelSelect` / `WorkspaceSelect` pickers instead of a native `<select>` plus a raw path input (leaving the project default selected still means "follow the default"); Bind-Session mode replaces the free-text Session-id input with a searchable dropdown fed by the agent's session list, matching on title or id.
+- **Saved toast for Project new-chat defaults.** Saving the defaults block surfaces a "Saved" toast — the dialog stays open, so success was previously silent.
+- **`{{SHELL}}` placeholder restored.** The Agent Prompt tab's placeholder list showed 12 entries while the default system prompt uses 13 — `{{SHELL}}` was missing, so rebuilding the Environment block from the click-to-insert list silently dropped the shell line. Added in prompt order, with a unit test deriving the expected tokens from core's real `DEFAULT_SYSTEM_PROMPT` so the list can't drift again.
diff --git a/changelog/unreleased/README.md b/changelog/unreleased/README.md
index 56052f09..7c3212d3 100644
--- a/changelog/unreleased/README.md
+++ b/changelog/unreleased/README.md
@@ -1,12 +1,18 @@
# Unreleased
+- [2026-08-11] Web App: the chat details card gains a click-to-copy Session id, the schedule form adopts the Project-defaults model/workspace pickers and a searchable session dropdown, saving Project new-chat defaults toasts, and the missing `{{SHELL}}` placeholder is restored to the prompt-placeholder list (drift-proofed by a test against the real default prompt). ([details](2026-08-11-web-session-and-schedule-forms.md))
+
- [2026-08-11] Web App: leaving a still-running conversation (switch or "new conversation") no longer fires a phantom completion that reloaded the session/Agent lists — the reload trigger is now guarded by session identity, removing an occasional app-wide flicker right after the click (#242). ([details](2026-08-11-chat-phantom-idle-reload.md))
- [2026-08-10] Core: MCP Server support lands on the reserved `tools.mcpServers` seam — official TypeScript SDK v2, three transports (stdio / Streamable HTTP / legacy SSE), tools exposed as `mcp__<server>__<tool>` under the unchanged execution and approval contract, `readOnlyHint` → read-only permission, vault kept out of server processes, unreachable servers skipped with a warning; the agent settings page gains form-based MCP Server management with a connectivity test; session creation no longer blocks on MCP connects — the wait streams as `mcp_connect_begin/end` events (unified chat step row shared with compaction, CLI lines, a Trace-timeline span) and the toolset moves from `session_meta.tools` into a new `tool_list_ready` event (**breaking**: pre-split Traces' embedded tool record is no longer displayed) (#242; closes #239, #229). ([details](2026-08-10-mcp-servers.md))
- [2026-08-10] Web App: the chat header statistics move to the far right and double as the details-card trigger (numbers when wide, info icon when narrow, a live running-services count beside the elapsed time), the card gains a copyable Session id and lists the session's background processes with a working Stop (new `/processes` endpoints; deletion now ends a conversation's processes, idle eviction spares runtimes with live ones) and names the trace file path, typed-but-unsent new-chat text parks as sendable draft conversations in a sidebar Drafts group, docked panel swaps retract before expanding, the seeded admin password is stored in the data root and re-printed framed on every start until changed (CLI attach included), conversations open pinned to the bottom under the notice banner, the scheduled-task form's model/workspace/session pickers match the defaults dialog (searchable session dropdown), saving Project defaults toasts "已保存", copy feedback is unified onto the button, the `{{SHELL}}` placeholder returns to the prompt tab, benchmark case materials open expanded, and the locked model chip points at `/model`. ([details](2026-08-10-web-app.md))
-- [2026-08-07] Core: default `max_turns` becomes -1 (unlimited, SDK fallback aligned), request caps and the compaction threshold derive from the model's context window (vLLM-class small windows work; #218), the LLM retry ladder slows to a 2s base with "everything except auth retries" classification, and Trace appends are serialized with best-effort tolerant reads for damaged files (#215). ([details](2026-08-07-core-runtime.md))
+- [2026-08-10] Web App: chat UX batch — the seeded admin password is persisted and re-printed at every server start until changed, header stats merge into a details card with a live background-process list (kill controls; processes die with the conversation and block idle eviction) and a trace-file deep link, typed new-chat text parks as sidebar draft conversations, docked panels retract before swapping, the stream stays bottom-pinned across resizes, and mid-run sends survive the steering completion race with the per-turn thinking level carried on queued follow-ups (#241, #227, #246). ([details](2026-08-10-web-chat-ux.md))
+
+- [2026-08-07] Core: default `max_turns` becomes -1 (unlimited, SDK fallback aligned), request caps and the compaction threshold derive from the model's context window (vLLM-class small windows work; #218), the LLM retry ladder slows to a 2s base with "everything except auth retries" classification, and Trace appends are serialized with best-effort tolerant reads for damaged files (#215); each record now lands via a single `write(2)` and resumption heals crash-torn tails, so a big record can no longer be split at the 512 KiB chunk boundary (#249). ([details](2026-08-07-core-runtime.md))
+
+- [2026-08-07] Memory: an agent keeps long-term notes between Sessions under `agent_state/memory/` — a user scope (`memory/user/`, read by every Session) plus one directory per Workspace, each with its own `MEMORY.md` index; only the indexes enter the context (capped at 200 lines / 25,000 chars per scope), bodies read on demand. A temporary Workspace gets the user scope only. The template's `{{MEMORY}}` placeholder expands to the agent's own `memory.prompt` (+ `memory.workspace_prompt` in a persistent Workspace), both editable on the Memory tab; a pre-Memory template injects nothing until its one-click placeholder insert. Agent settings gain a Memory tab: memories grouped by scope with view / delete (index lines pruned) / edit-via-chat. ([details](2026-08-07-memory.md))
- [2026-08-06] Desktop app: penguin brand icons on every platform, task-completion system notifications (renderer-only, desktop sessions), explicit single-user mode (user/member management rejected with `desktop_single_user` and hidden), and a bundled `penguin` CLI on PATH (automatic on deb; menu-driven install elsewhere, no system Node needed). ([details](2026-08-06-desktop-app.md))
@@ -20,8 +26,5 @@
- [2026-08-06] Release tooling: repo versions realigned with the shipped 0.2.1, and the release workflow now refuses a tag push whose version does not match `package.json` (the drift that made every dev build nag about updates); the bump is documented as a release-prep step. ([details](2026-08-06-release-version-guard.md))
-<<<<<<< HEAD
- [2026-08-03] Web App: at medium desktop widths the chat toolbar's Agents/Workspace actions stay icon-only until the large-screen breakpoint, so they no longer overlap the running indicator and live statistics (#151). ([details](2026-08-03-chat-toolbar-layout.md))
-=======
-- [2026-08-07] Memory: an agent keeps long-term notes between Sessions under `agent_state/memory/` — a user scope (`memory/user/`, read by every Session) plus one directory per Workspace, each with its own `MEMORY.md` index; only the indexes enter the context (capped at 200 lines / 25,000 chars per scope), bodies read on demand. A temporary Workspace gets the user scope only. The template's `{{MEMORY}}` placeholder expands to the agent's own `memory.prompt` (+ `memory.workspace_prompt` in a persistent Workspace), both editable on the Memory tab; a pre-Memory template injects nothing until its one-click placeholder insert. Agent settings gain a Memory tab: memories grouped by scope with view / delete (index lines pruned) / edit-via-chat. ([details](2026-08-07-memory.md))
->>>>>>> origin/main
+