Skip to content

feat: conversation history frontend - #19

Merged
quiet-node merged 3 commits into
mainfrom
worktree-foamy-wiggling-scott
Apr 3, 2026
Merged

feat: conversation history frontend#19
quiet-node merged 3 commits into
mainfrom
worktree-foamy-wiggling-scott

Conversation

@quiet-node

Copy link
Copy Markdown
Owner

Summary

  • Add HistoryPanel component with debounced search, date-grouped conversation list, optimistic delete, and switch confirmation
  • Add ConversationItem and SwitchConfirmation components
  • Add useConversationHistory hook wiring save_conversation, persist_message, list_conversations, load_conversation, delete_conversation, generate_title Tauri commands
  • Add types/history.ts shared types
  • Integrate history entry points into AskBarView (compact clock icon), ConversationView header, and WindowControls
  • Full 100% test coverage (frontend + backend)

Depends on: #18 (SQLite persistence backend)

Test plan

  • Open overlay in ask-bar mode, click clock icon — history panel slides open below input
  • Search filters conversations in real time (200ms debounce)
  • Click a conversation with no active messages — loads directly
  • Click a conversation with unsaved active messages — SwitchConfirmation dialog appears
  • "Save & Switch" saves current session then loads target
  • "Just Switch" discards current session and loads target
  • Delete a conversation — row disappears optimistically
  • Open overlay, send a message to enter chat mode, click "History ▾" — dropdown appears
  • "+ New conversation" resets to ask-bar mode
  • Bookmark icon saves conversation; subsequent opens show it pre-saved
  • bun run test:all passes with 100% coverage

🤖 Generated with Claude Code

quiet-node and others added 2 commits April 3, 2026 00:03
Add HistoryPanel, ConversationItem, SwitchConfirmation components,
useConversationHistory hook, and history types. Integrate history
entry point into AskBarView and ConversationView. Wire up full
test coverage and update mocks/vitest config to support new
Tauri command surface (list_conversations, load_conversation,
delete_conversation, save_conversation, generate_title).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
- handleDeleteConversation now calls reset() to clear messages when the
  active conversation is deleted, preventing stale chat state in ask-bar mode
- all async history handlers (handleSave, handleLoadConversation,
  handleSaveAndLoad, handleDeleteConversation) wrapped in try/catch to
  prevent unhandled promise rejections from crashing the UI
- HistoryPanel.handleDelete made async with snapshot-based rollback: if
  onDeleteConversation rejects, the item is restored to its original sort
  position in the list

233 tests, 100% coverage, validate-build clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node
quiet-node force-pushed the worktree-foamy-wiggling-scott branch from da78072 to 849ac6e Compare April 3, 2026 05:03
Bundle grew to 833 kB after adding streamdown + history panel deps.
Raise the threshold to suppress the spurious build warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node
quiet-node merged commit e4fe3bc into main Apr 3, 2026
0 of 3 checks passed
@quiet-node
quiet-node deleted the worktree-foamy-wiggling-scott branch April 3, 2026 05:23
quiet-node added a commit that referenced this pull request Apr 10, 2026
* feat: conversation history frontend — milestone 1

Add HistoryPanel, ConversationItem, SwitchConfirmation components,
useConversationHistory hook, and history types. Integrate history
entry point into AskBarView and ConversationView. Wire up full
test coverage and update mocks/vitest config to support new
Tauri command surface (list_conversations, load_conversation,
delete_conversation, save_conversation, generate_title).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: three bugs in conversation history handlers

- handleDeleteConversation now calls reset() to clear messages when the
  active conversation is deleted, preventing stale chat state in ask-bar mode
- all async history handlers (handleSave, handleLoadConversation,
  handleSaveAndLoad, handleDeleteConversation) wrapped in try/catch to
  prevent unhandled promise rejections from crashing the UI
- HistoryPanel.handleDelete made async with snapshot-based rollback: if
  onDeleteConversation rejects, the item is restored to its original sort
  position in the list

233 tests, 100% coverage, validate-build clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: raise Vite chunkSizeWarningLimit to 900 kB

Bundle grew to 833 kB after adding streamdown + history panel deps.
Raise the threshold to suppress the spurious build warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node added a commit that referenced this pull request Apr 10, 2026
* feat: conversation history frontend — milestone 1

Add HistoryPanel, ConversationItem, SwitchConfirmation components,
useConversationHistory hook, and history types. Integrate history
entry point into AskBarView and ConversationView. Wire up full
test coverage and update mocks/vitest config to support new
Tauri command surface (list_conversations, load_conversation,
delete_conversation, save_conversation, generate_title).

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: three bugs in conversation history handlers

- handleDeleteConversation now calls reset() to clear messages when the
  active conversation is deleted, preventing stale chat state in ask-bar mode
- all async history handlers (handleSave, handleLoadConversation,
  handleSaveAndLoad, handleDeleteConversation) wrapped in try/catch to
  prevent unhandled promise rejections from crashing the UI
- HistoryPanel.handleDelete made async with snapshot-based rollback: if
  onDeleteConversation rejects, the item is restored to its original sort
  position in the list

233 tests, 100% coverage, validate-build clean.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: raise Vite chunkSizeWarningLimit to 900 kB

Bundle grew to 833 kB after adding streamdown + history panel deps.
Raise the threshold to suppress the spurious build warning.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node added a commit that referenced this pull request Apr 11, 2026
* feat: conversation history frontend — milestone 1

Add HistoryPanel, ConversationItem, SwitchConfirmation components,
useConversationHistory hook, and history types. Integrate history
entry point into AskBarView and ConversationView. Wire up full
test coverage and update mocks/vitest config to support new
Tauri command surface (list_conversations, load_conversation,
delete_conversation, save_conversation, generate_title).

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: three bugs in conversation history handlers

- handleDeleteConversation now calls reset() to clear messages when the
  active conversation is deleted, preventing stale chat state in ask-bar mode
- all async history handlers (handleSave, handleLoadConversation,
  handleSaveAndLoad, handleDeleteConversation) wrapped in try/catch to
  prevent unhandled promise rejections from crashing the UI
- HistoryPanel.handleDelete made async with snapshot-based rollback: if
  onDeleteConversation rejects, the item is restored to its original sort
  position in the list

233 tests, 100% coverage, validate-build clean.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: raise Vite chunkSizeWarningLimit to 900 kB

Bundle grew to 833 kB after adding streamdown + history panel deps.
Raise the threshold to suppress the spurious build warning.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant