Matt Toohey d6d58dffd3 feat: session persistence with tab state and sidebar recents (#22)
* feat: individual chat sessions with persistence and tab management

Add full chat session lifecycle — create, switch, persist, and restore
individual chat sessions backed by ACP. Key capabilities:

- Session persistence: messages saved to per-session directories,
  metadata consolidated in ~/.goose/sessions/metadata.json
- Tab state management: Zustand-based chatSessionStore with tab
  open/close/reorder/activate, persisted to ~/.goose/ui_state.json
- Session restoration: historical messages loaded lazily from backend
  on tab select; tab state restored and validated on app launch
- Sidebar recents: all sessions shown sorted by updatedAt, with
  visual distinction between open and background sessions
- ACP integration: multi-agent support via acp-client, provider
  selector in chat and home views
- UI foundations: skills/personas pages, projects sidebar, settings
  fixes, dev icons, chat components, and visual polish

Also includes earlier PR work: sidebar navigation, ACP client,
Tauri icon, dependency updates, and various bug fixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: fix Rust formatting in session and UI state commands

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve code review issues in session persistence and UI

- Fix race condition: acquire mutex in get_messages to prevent reading
  partially-written message files during concurrent add_message calls
- Log errors in save_metadata/save_messages instead of silently
  discarding them, aiding diagnosis of disk/serialization failures
- Refactor AppShell mount effect from nested .then() to async IIFE
- Use Map for O(1) session lookups in tab derivation
- Only remove session from local store on successful backend delete
  in archiveSession to avoid stale entries on failure
- Add proper exhaustive deps to ChatView initial message effect,
  guarded by ref to maintain mount-only semantics

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:47:48 +11:00
S
Description
No description provided
Apache-2.0 1.5 GiB
Languages
Rust 63.6%
TypeScript 29.6%
JavaScript 1.7%
Shell 1.6%
Python 1.5%
Other 1.8%