Skip to content

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

Open
jarvis24young wants to merge 2 commits into
GCWing:mainfrom
jarvis24young:feat/mobile-session-manage
Open

feat(mobile-web): add session search, rename, and delete#840
jarvis24young wants to merge 2 commits 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 on any session card opens a bottom-sheet context menu
  with Rename and Delete actions (also prevents browser context menu)
- 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; calls delete_session on desktop
  and removes the session + cached messages from the Zustand store
- Action toast provides transient success/failure feedback
- Replace hardcoded English search-empty string with i18n key
- Clear previous toast timer on consecutive calls to prevent overlap
- Clean up toast and long-press timers on component unmount
- Add Escape/Enter keyboard support to delete confirmation dialog
- Add role="alert" aria-live="assertive" to action toast
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