Repository navigation
agent-console 1.1.0: QA fixes, refreshed UI and icon, self-heal after a plugin host restart - #569
Open
qingnian108 wants to merge 1 commit into
Open
qingnian108 wants to merge 1 commit into
qingnian108 wants to merge 1 commit into
Conversation
…l after a plugin host restart - Settings: optimistic provider toggles, args/idle committed on blur with inline errors, theme follows Magpie, steer/default-mode hints - Launch command/args honoured, plan/permission modes clamped per agent, ACP segments persisted, codex config/reasoning/fileChange mapping - Queue: thread.queueRemove; turn-end duration fallback for ACP agents; localized daemon/http/ws errors and permission labels - UI: 720px column, bubble/composer/sidebar/run pill restyle with teal accents (Magpie accent not inherited), dark mode kept - Logo: chevron + chat bubble + teal underscore (icon.svg, magpie.icon, composer chip) - Self-heal: session.js carries ts + heartbeat; gate passes a validated Magpie back-URL; the page goes back through Magpie's plugin page (ac_lost) to pick up the new gate when the host restarts; no open redirect, token stays in the fragment - Host: first bind delayed (AGENT_CONSOLE_BIND_DELAY_MS), EADDRINUSE logged only after retries; daemon token printed only on a TTY - Tests: test/v1/ac11.test.ts + manager/plugin-entry additions
yetone
reviewed
Oct 31, 2026
yetone
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this. I reviewed it at 117e06f. The self-heal works, but there are three problems to fix before it can merge.
What was run at 117e06f
Everything below ran on macOS (Node 22) in a fresh worktree:
npm ci --workspaces=false, thennpm run check(tsc for the daemon and the web app): ok.npx vitest run: 46 files, 281 passed, 17 skipped.npm run verify:build: app/app.js, app.css, index.html and daemon/dist/main.js(.map) all rebuild byte-identical to what is committed.bun scripts/check.mjs agent-console: ok.- A real self-heal run in a sandbox HOME, in Playwright Chromium and WebKit:
- Setup: page/ was served under
/_magpie/plugin/<token>/page/index.htmlwith a stub bridge, andindex.mjs'sserver()ran as the host. - Hard kill: the page reached the daemon in about 1.5s. I then SIGKILLed the host (session.js left behind) and started a new host. Both engines went back through the Magpie page and onto the new daemon about 5.3s after the kill, and stayed there.
- Daemon crash: killing only the daemon (gate still up) also healed, in about 5.3s.
bin the fragment was the plugin page URL, assafeBackUrlexpects.
- Setup: page/ was served under
The safeBackUrl checks, the key/token split and the "only rewrite session.js while it is ours" rule all look right.
Must fix
-
Magpie's accent is thrown away and a teal palette is hard-coded.
- Where:
packages/agent-console/web/src/layout/applyMagpieTokens.ts:16-17skips every token matching/accent/i, andpackages/agent-console/web/src/styles/tokens.css:15-18sets--accent: #0f766e/--accent-2: #14b8a6and the rest of a fixed palette. - Reproduced: the stub bridge passed
tokens: {"--accent": "#ff0000"}, and the page still drew its primary buttons ("New project") teal. - Why it matters: a page in magpie's window is meant to look like magpie, and boot.js's own comment says the tokens are passed "so that page matches magpie". magpie's UI is quiet, with no colourful accents of a plugin's own.
- Fix: take the host's accent like the other tokens, and keep the teal only as the fallback for a standalone run (no
tokens).
- Where:
-
registry.json drops what a user needs to know before installing.
- Where:
registry.json:167-170. - What was dropped: the earlier summary said the page runs a local daemon on 127.0.0.1, that the daemon starts when the page opens and stops with magpie, that only its own page gets the token, the ~46 MB cold install (node-pty), and that Claude Code is not bundled.
- Why it matters: the new one-liner says none of this. The Plugins page shows this text, and for a page that starts a background service and runs agent CLIs, those lines are the disclosure.
- Fix: keep them, en and zh, and shorten the wording if you like.
- Where:
-
The rewritten pickers are still native
<select>.- Where:
packages/agent-console/web/src/components/Composer.tsx:575(effort),:594(mode) and:603(Cursor fast);packages/agent-console/web/src/components/Settings.tsx:162, 219, 224, 231, 237. - Why it matters: magpie's UI never uses a native select; dropdowns are an app menu. These were native before too. This PR rebuilt the Composer pickers into pill labels with an invisible
<select class="ip-sel">laid over them, so the macOS/GTK native popup still opens on click. - Fix: since they are being redone anyway, make them a menu of the page's own.
- Where:
Smaller, not blocking on their own
- EPIPE on every hard host kill. After the SIGKILL, the daemon's log line goes to stdout, a pipe whose reader is gone. It ends in
uncaughtException ... write EPIPEfromdaemon/src/log.ts:43, andplugin host closed the lifelineis logged twice, becausedaemon/src/main.ts:183-184handles bothendandclose. Seen in daemon-.log in both runs. Ignore EPIPE on stdout and runlifelineClosedonce. - session.js is rewritten every 4s for as long as magpie runs. This happens from the moment the gate binds (
index.mjsbeat,SESSION_BEAT_MS), whether or not the page is ever opened. That is fine for correctness. Worth a thought whether the beat could start on the first/open, or run less often, since boot only needs "newer than 12s / newer than ac_lost".
Not tried: magpie's real sandboxed frame, a real plugin host restart from magpie, Windows and Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent Console 1.1.0 — follow-up to #535.
Fixes (from a hands-on QA pass of 1.0.0 inside magpie)
thread.queueRemove).session.jsand reconnects through the new gate. The token still only travels in the URL fragment; the Host check and WS hello auth are unchanged.Look
Tests
npm testin the package: 281 passed.npm run check, build,bun scripts/check.mjs: OK.