Fix socket singleton lifecycle: add and auto-reset on disconnect so page remounts always get a fresh authenticated connection
Add explicit WebSocket transport preference () to avoid polling fallback
Filter socket events by to prevent cross-conversation event bleed when switching conversations mid-stream
Use pattern so event handlers see current without stale closures or listener re-registration on every render
On , append accumulated streaming text as assistant message to local state (matching TUI approach; Pi session is in-memory so DB reload would miss the assistant response)
Preserve REST persist of user messages for conversation history on page reload
Clear streaming state on conversation switch
Fix : show animated typing indicator before first token arrives (previously returned when text was empty)
Fix : exclude worktree auto-generated docs from format check (pre-push hook blocker)
Test plan
Login to web UI and navigate to /chat
Create a new conversation via '+ New' or the Start button
Send a message — verify user message appears immediately, streaming indicator shows, assistant response streams in and is appended on completion
Switch between conversations — verify streaming state clears, messages load correctly for each conversation
Send message without selecting a conversation — verify auto-creation works
Verify no duplicate messages or stale events from previous conversations
## Summary
- Fix socket singleton lifecycle: add and auto-reset on disconnect so page remounts always get a fresh authenticated connection
- Add explicit WebSocket transport preference () to avoid polling fallback
- Filter socket events by to prevent cross-conversation event bleed when switching conversations mid-stream
- Use pattern so event handlers see current without stale closures or listener re-registration on every render
- On , append accumulated streaming text as assistant message to local state (matching TUI approach; Pi session is in-memory so DB reload would miss the assistant response)
- Preserve REST persist of user messages for conversation history on page reload
- Clear streaming state on conversation switch
- Fix : show animated typing indicator before first token arrives (previously returned when text was empty)
- Fix : exclude worktree auto-generated docs from format check (pre-push hook blocker)
## Test plan
- [ ] Login to web UI and navigate to /chat
- [ ] Create a new conversation via '+ New' or the Start button
- [ ] Send a message — verify user message appears immediately, streaming indicator shows, assistant response streams in and is appended on completion
- [ ] Switch between conversations — verify streaming state clears, messages load correctly for each conversation
- [ ] Send message without selecting a conversation — verify auto-creation works
- [ ] Verify no duplicate messages or stale events from previous conversations
Closes #120
🤖 Generated with Claude Code
- Fix socket singleton lifecycle: add destroySocket() and auto-reset on disconnect
so page remounts always get a fresh authenticated connection
- Add explicit WebSocket transport preference to avoid polling fallback
- Filter socket events by conversationId to prevent cross-conversation bleed
when switching between conversations mid-stream
- Use activeIdRef pattern so event handlers see current activeId without
stale closures or listener re-registration on every render
- On agent:end, append accumulated text as assistant message to local state
(matching TUI pattern; Pi session is in-memory so DB reload would miss it)
- Preserve REST persist of user messages for conversation history on reload
- Clear streaming state on conversation switch
- StreamingMessage: show animated typing indicator before first token arrives
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The .claude/worktrees/ directory contains auto-generated markdown reports
from the QA automation system that are not authored code and should not
be subject to Prettier style enforcement.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Test plan
Closes #120
🤖 Generated with Claude Code