The daemon hands the browser `http://127.0.0.1:<port>/#t=<token>`. The token is
read once, stored through the connection store (so the `pi2-connection` marker is
set too and a fresh browser does not bounce to /connect), and stripped from the
address bar and history while the query string survives.
The sidebar treated every workspace session as a root and only nested the
manifest sub-agents, so sub-session files showed up as siblings (the same child
twice); sub-sessions the plugin marked hidden were listed anyway.
- build the tree from `parentId` in a pure `buildSessionTree` model: orphans are
promoted to roots, cycles and duplicate ids are guarded, real child-session
rows win over the manifest projection, and the routed row force-opens its
ancestors
- honour the plugin's `:PiSessions` visibility (`visible: false`) with a "show
hidden sub-sessions" toggle, the routed-row exception and a dedicated
all-hidden empty state
- keep tree metadata across WS snapshots, reducer events, id migration and
parent removal; prefer a root row for the `/chat` index and add a "back to
parent" action
- document the session-row and `pi2:subagents` list metadata in the protocol
`pi2 daemon [start] [flags]` now starts the web-console daemon. The
`pi2d` executable, its bin entry and its entry module are removed: the
daemon keeps its lock -> token -> plugin socket -> listen -> daemon.json
lifecycle, its single stdout line (`pi2 daemon listening on ...`) and the
signal handling that leaves managed nvim instances running.
Service files are renamed to `pi2.service` / `com.pi2.daemon`, and the
smoke and e2e harnesses start the daemon through `pi2 daemon`.
BREAKING CHANGE: the `pi2d` command no longer exists; use `pi2 daemon`
(or `pi2 daemon start`). Existing systemd/launchd units installed under
the old names must be reinstalled with `pi2 install-service --write`.
- Pair through the public POST /api/v1/pair and persist the device scopes;
keep the allow-listed next deep link. Rename the manual field to pairing code.
- Authenticate the WebSocket with the raw device token (strip Bearer) and
recover from a 401 by clearing the connection once.
- Fix chat payloads: setModel/setThinking, attention/diff responses, subagent
dispatch items, queue ids/mode, task output and WS resume since.
- Render exactly one assistant message per turn: one-to-one snapshot/history
merge plus a stale-delta guard after message_end (fixes PONGONG).
- Fix dialogs (content above the overlay), unknown-session deep links
(error + retry, no silent fallback), device list/revoke, status identity and
live pairing code, reconnect banner and Playwright selectors.
- ws auth frame now carries the token top-level (docs §3.3); daemon accepts payload.token too
- entries route accepts workspaceId/sessionFile so disk-only sessions page history
- chat registers session metadata and pages history for non-live sessions
- e2e asserts a real ASSISTANT reply (PONG) and waits up to 180s
- visual.sh: real daemon + pairing + Playwright screenshots of the four pages