Skip to content

Conversation

iFlyTwice
Copy link

@iFlyTwice iFlyTwice commented Sep 23, 2025

Summary

This PR introduces multiple user experience improvements and new functionality for better session management and UI interactions.

✨ New Features

Auto-scroll Control

  • Add auto-scroll setting in Settings panel to control conversation auto-scrolling behavior
  • Implement useAutoScroll hook with dual-storage (localStorage + SQLite) for persistence
  • Allow users to manually scroll through conversation history without being forced to bottom

Session Deletion Functionality

  • Add individual session deletion with confirmation dialog
  • Add bulk session deletion with multi-select mode
  • Implement proper async confirmation handling for Tauri environment
  • Add session persistence cleanup when sessions are deleted

Collapsible Tool Widgets

  • Make SystemInitializedWidget, ReadWidget, WriteWidget, and EditWidget collapsible
  • Prevent UI freezing with large file content previews
  • Add expand/collapse functionality with smooth animations

Image Placeholder System

  • Replace long image file paths with clean [image] placeholders in UI
  • Support multiple images with [image #2], [image #3] numbering
  • Maintain actual file paths for backend processing
  • Add image preview functionality above prompt input

🔧 Backend Improvements

  • Add delete_session and delete_sessions_bulk Tauri commands
  • Add save_pasted_image command for handling image uploads
  • Implement session persistence service with conversation tracking
  • Add proper error handling and logging for all new operations

🎨 UI/UX Enhancements

  • Improve message display with clean image path presentation
  • Add hierarchical session organization with expand/collapse
  • Add proper loading states and error handling
  • Implement smooth animations for better user experience

Test plan

  • Tested auto-scroll toggle in Settings panel
  • Verified session deletion (single and bulk) with confirmation
  • Confirmed collapsible widgets prevent UI freezing with large files
  • Tested image placeholder system with multiple images
  • Verified proper persistence across app restarts
  • Confirmed error handling and edge cases
  • Tested with Rust formatting (cargo fmt) and linting (cargo clippy)

Breaking Changes

None

Related Issues

Addresses user feedback regarding:

  • Auto-scroll forcing users to bottom when reviewing history
  • Session deletion requiring better confirmation workflow
  • UI freezing with large file content previews
  • Long image file paths cluttering the interface

This commit introduces multiple user experience improvements and new functionality:

## ✨ New Features

### Auto-scroll Control
- Add auto-scroll setting in Settings panel to control conversation auto-scrolling behavior
- Implement `useAutoScroll` hook with dual-storage (localStorage + SQLite) for persistence
- Allow users to manually scroll through conversation history without being forced to bottom
- Setting persists across sessions and is immediately applied

### Session Deletion Functionality
- Add individual session deletion with confirmation dialog
- Add bulk session deletion with multi-select mode
- Implement proper async confirmation handling for Tauri environment
- Add session persistence cleanup when sessions are deleted
- Support for hierarchical session deletion (primary + child sessions)

### Collapsible Tool Widgets
- Make SystemInitializedWidget, ReadWidget, WriteWidget, and EditWidget collapsible
- Prevent UI freezing with large file content previews
- Add expand/collapse functionality with smooth animations
- Maintain functionality while improving performance

### Image Placeholder System
- Replace long image file paths with clean `[image]` placeholders in UI
- Support multiple images with `[image winfunc#2]`, `[image winfunc#3]` numbering
- Maintain actual file paths for backend processing
- Add image preview functionality above prompt input
- Implement proper path mapping between placeholders and actual files

## 🔧 Backend Improvements
- Add `delete_session` and `delete_sessions_bulk` Tauri commands
- Add `save_pasted_image` command for handling image uploads
- Implement session persistence service with conversation tracking
- Add proper error handling and logging for all new operations
- Update API layer with new session management endpoints

## 🎨 UI/UX Enhancements
- Improve message display with clean image path presentation
- Add hierarchical session organization with expand/collapse
- Add proper loading states and error handling
- Implement smooth animations for better user experience
- Add proper confirmation dialogs with clear messaging

## 🛠️ Technical Details
- Update session store with deletion capabilities
- Add proper TypeScript types for all new functionality
- Implement proper cleanup of localStorage data
- Add comprehensive error handling and user feedback
- Follow existing code patterns and conventions

## 🧪 Testing
- All features tested in development environment
- Confirmed proper persistence across app restarts
- Verified error handling and edge cases
- Tested with various file types and sizes

Breaking Changes: None
Deprecations: None

Fixes: Session deletion confirmation, image preview display, large file UI freezing
@123vivekr
Copy link
Member

Hi can you review the merge conflicts?

@iFlyTwice
Copy link
Author

Hi can you review the merge conflicts?

done @123vivekr

…uilds

- Adds fix-path-env dependency to ensure PATH environment is inherited in macOS DMG apps
- Resolves issue where MCP servers showed is_active: false in production builds
- Minimal change that fixes the core PATH inheritance problem for GUI applications
- Enables devtools feature for development debugging
@iFlyTwice
Copy link
Author

you got discord @123vivekr

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.

2 participants