Files
pi2d/web
yuez 00c81a56f4 feat(web): persist session-dot acknowledgements across reloads
`flags.done`/`flags.error` are unread markers: the plugin keeps raising them
until nvim's own TabEnter, while `markSeen` only cleared them in the in-memory
store. The next snapshot — a reload, or a reconnect's resync — replayed the
flag, so a notification the user had already consumed blinked again and the
dot looked stuck on unread.

The acknowledgement is now durable in `localStorage` (`pi2-seen-sessions`, per
browser), recorded under the occurrence it was given for: the id of the
transcript's newest entry. A replayed snapshot ends on the same entry, so
ingress clears the flag; the next completed turn appends entries first, so its
token differs and that new notification blinks again. A row with no entries
cannot be scoped and keeps the in-memory-only behaviour. `removeSession`
forgets the ledger row and the `tmp-N` → real-id migration moves it. This stays
a client-side view concern — the wire, the reducer and `fixtures/` are
untouched.
2026-10-30 16:19:40 +08:00
..

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.