Skip to content

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

docs(changelog): 2026-08-10 chat UX batch entries (#241, #245) (#244)

Yaowei Zheng94961f5f9083
diff --git a/changelog/unreleased/2026-08-10-web-app.md b/changelog/unreleased/2026-08-10-web-app.md
new file mode 100644
index 00000000..1b3cf849
--- /dev/null
+++ b/changelog/unreleased/2026-08-10-web-app.md
@@ -0,0 +1,37 @@
+# Web App: session details card with live process control, draft conversations, sequenced panel swaps, a persistent initial-password notice, and chat polish
+
+## Header statistics become the details card, with the session's processes inside
+
+The chat toolbar's Token / cost / elapsed statistics move to the far right and are now themselves the details entry: on wide viewports clicking the numbers opens the details card (no separate info icon), and narrow viewports collapse the whole trigger to the single info icon. While the conversation has live background processes, a green running-services count rides to the right of the elapsed time.
+
+The details card shows Model, the **Session id** (selectable mono text with a copy button beside it), Workspace, creation time and statistics as sections, the statistics as a bulleted list with one figure per line — the tokens bullet reads `总 Token <total>(缓存命中率 <pct>)`, the hit rate being cached reads over all recorded input. Below them sits an interactive **session processes** list: background processes the conversation started (an `exec_command` outliving its yield window — a dev server on localhost:3000, say) each show their command, start time and pid, and running rows carry a Stop button that kills the whole process group and drops the row. The former "View trace" button becomes a **trace file** section in the same label-plus-value anatomy, the actual `.jsonl` path being an underlined link that deep-links into trace observability.
+
+Under the hood, command sessions now expose enumeration (`listBackgroundCommands` on the environment and core Session; process id, pid, command, cwd, start time, running state) and kill-by-id, served over two new endpoints (`GET /api/sessions/:id/processes`, `POST /api/sessions/:id/processes/:processId/kill` — answered from the active runtime only, never resurrecting one). Two real lifecycle gaps close with it: deleting a Session, Agent or Project now disposes the runtime once its in-flight drive settles, so background processes die with the conversation instead of running forever; and the active table's idle eviction skips entries that still have running background processes — evicting one would strand the OS process with no remaining stop control.
+
+## Typed-but-unsent text becomes a draft conversation
+
+Clicking any "New chat" entry point — the sidebar button, group-header "+", the collapsed rail, the agents page, or the skill library's quick invoke (which previously overwrote typed text silently) — while the new-chat composer holds text now parks that draft as a **draft conversation**: a row in a Drafts group at the top of the session list (per user × Project in localStorage, newest first, capped at 50). Opening a row (`/chat/draft-<id>`) resumes the full draft — text, Agent, Workspace, model, approval mode and selected skills — for editing and sending at any time; sending creates the real Session and removes the row, and rows can be deleted behind a confirmation. The active draft slot keeps only the model carry-over ("switch becomes default", as after a send), so a new chat always starts on an empty composer and typed content never lingers invisibly.
+
+## The initial admin password stays visible until it is changed
+
+The seeded admin password used to be printed exactly once, at first start; if that line scrolled away unread, the credential was gone. It is now kept in the data root (`initial-admin-password`, owner-only permissions) for as long as it remains the initial one, and every server start re-prints it framed in ASCII with a change-it reminder — `penguin web` attaching to an already-running instance prints the same notice. Any password update for admin (self change, desktop set, or an admin reset, whose chosen value is never persisted) deletes the file; roots seeded before this change have no file and stay silent. Docs updated accordingly.
+
+## Panel swaps retract before they expand
+
+Switching between the Agents panel and the Workspace panel used to run both width transitions simultaneously: the total width stayed constant, so the closing panel's content never moved — it was simply wiped over by the incoming panel, which read as "no retract animation". Docked swaps are now sequenced: the open panel retracts fully (the chat column takes the space back), then the other slides in. Mobile Sheets keep the instant switch — they overlay rather than share width.
+
+## Conversations open pinned to the bottom under the notice banner
+
+The message stream re-pins itself to the bottom whenever its scroll container or content resizes outside a stream commit — the initial-password banner mounting after `/api/me` resolves, or a late-loading image, previously left a freshly opened conversation sitting a banner's height above the bottom with no scroll event to correct it.
+
+## Scheduled tasks: pickers aligned with the defaults dialog
+
+The scheduled-task create/edit form now uses the same form-style pickers as the Project new-chat defaults dialog: in "new session each run" mode the Model and Workspace controls are the shared dropdown / directory-browser (not a bare `<select>` and a raw path input), and selecting the project default — or leaving it — means "follow the default", so a later change to the project's default model keeps flowing through. The "bound Session" mode replaces its free-text Session-id field with a **searchable dropdown** over the agent's full session list, matching on title or id. The three form pickers (model, workspace, session) now share one trigger component.
+
+## Copy feedback is consistent, and always on the button
+
+Every copy control routes through one shared button: the feedback lands on the button itself — the icon becomes a check, the tooltip reads "已复制", and where there's room the "已复制" text shows too — and it never replaces a nearby label. (The details card's Session id row was the one exception, flipping its "Session id" label; it now behaves like the rest.)
+
+## Smaller refinements
+
+Saving the Project new-chat defaults now confirms with a "已保存" toast (the dialog stays open, so a successful save was previously silent). The Agent Prompt tab's "available placeholders" list regains the missing `{{SHELL}}` entry — the default system prompt uses thirteen placeholders and the list showed twelve — with a test pinning the list against the real default prompt so it cannot drift again. The benchmark case-detail dialog opens with both material groups (task materials and rubric) expanded, the readme auto-preview staying with the task materials so the two never race for the preview pane. And the session composer's read-only model chip is now clickable: it explains that `/model` switches models, continuing the conversation in a new session.
diff --git a/changelog/unreleased/README.md b/changelog/unreleased/README.md
index ef459145..56052f09 100644
--- a/changelog/unreleased/README.md
+++ b/changelog/unreleased/README.md
@@ -4,6 +4,8 @@
- [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-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))
@@ -18,4 +20,8 @@
- [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