Opening a project showed a toast on success and a bare code (`E_FORBIDDEN`) on failure: no reason, no retry, and a workspace card that kept claiming "Instance stopped" because `instance_state` frames were dropped by the socket layer. - The dialog validates a non-absolute path inline, sends `alias` (the field the daemon persists), maps the daemon's status/code/message to a specific sentence (`~` expansions, missing directory, roots allowlist, permissions), and keeps itself open on a spawn failure with the daemon's reason plus a retry that re-sends only `instance.ensure`. - `lib/ws` handles `instance_state` by invalidating `workspaces`/`health` (coalesced at 250 ms across sockets) so the grid reflects reality. - A never-started workspace renders as "not started · opens on demand" instead of "stopped", and a degraded/stopped instance shows `instance.reason`.
pi2-web
React port of the pi2 web UI prototype, built into web/dist and served statically by pi2 daemon.
Development
# Start dev server with proxy to daemon (:7676)
pnpm --dir web dev
# Typecheck
pnpm --dir web typecheck
# Run test suite
pnpm --dir web exec vitest run
# Run only changed tests or specific file
pnpm --dir web exec vitest run --changed
pnpm --dir web exec vitest run tests/chat.composer.test.tsx
# Watch mode
pnpm --dir web test
For performance tuning, concurrency settings, and DOM environment details, see docs/testing.md.