Skip to content

feat(mobile-web): add session search, rename, and delete#840

Open
jarvis24young wants to merge 1 commit into
GCWing:mainfrom
jarvis24young:feat/mobile-session-manage
Open

feat(mobile-web): add session search, rename, and delete#840
jarvis24young wants to merge 1 commit into
GCWing:mainfrom
jarvis24young:feat/mobile-session-manage

Conversation

@jarvis24young
Copy link
Copy Markdown
Contributor

Summary

  • Search: Search bar filters sessions client-side by name in real-time
  • Rename: Long-press a session → bottom sheet context menu → Rename → modal with text input (calls update_session_title backend command)
  • Delete: Long-press → bottom sheet → Delete → confirmation dialog (calls delete_session backend command, removes session + cached messages from store)

Design decisions

  • Long-press (500ms threshold, 10px move tolerance) triggers context menu — standard mobile UX pattern
  • Actions use useMobileStore.getState() in callbacks to avoid stale closures
  • removeSession also cleans up messagesBySession to prevent memory leaks
  • Search is pure client-side filtering (all sessions already loaded)

Test plan

  • Search filters session list by name
  • Long-press on session card opens bottom sheet menu
  • Rename: modal opens with current name pre-filled, save updates session title
  • Delete: confirmation dialog, session removed from list on confirm
  • Toast feedback for success/failure states
  • Loading/disabled states on buttons during async operations

- Search bar filters sessions client-side by name in real-time
- Long-press (500ms, 10px move tolerance) on any session card opens
  a bottom-sheet context menu with Rename and Delete actions
- Rename opens a modal with text input pre-filled with current name;
  sends update_session_title command to desktop and updates store
- Delete shows a confirmation dialog with Escape/Enter support;
  calls delete_session on desktop and removes session + cached
  messages from the Zustand store
- Action toast with role="alert" for transient success/failure feedback
- Timers cleaned up on unmount to prevent state updates on dead components
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