Skip to content

feat: add session rename with swipe-left action (#290)#737

Open
ascott wants to merge 1 commit intoslopus:mainfrom
ascott:feat/session-rename
Open

feat: add session rename with swipe-left action (#290)#737
ascott wants to merge 1 commit intoslopus:mainfrom
ascott:feat/session-rename

Conversation

@ascott
Copy link

@ascott ascott commented Feb 23, 2026

Summary

Adds the ability to rename active sessions from the sessions list. Users swipe left on an active session to reveal a Rename button alongside the existing Archive button. Custom names are stored locally via MMKV and persist across app restarts and sync updates.

  • Swipe left on any active session to see Rename and Archive actions
  • Tapping Rename opens a prompt pre-filled with the current custom name (or empty with the default name as placeholder)
  • Clearing the name resets to the default (summary text or last path segment)
  • Custom names are preserved across sync updates and cleaned up on session delete
  • Adds maxLength support to Modal.prompt (enforced on iOS via custom modal)
  • 49 new tests covering utils, persistence, and store actions
  • Translations added for all 11 languages

Implementation

  • Local-only persistence: Follows the existing draft/permissionMode pattern — stored in Zustand state, persisted to MMKV, restored on app launch, preserved during applySessions merge
  • UI trigger: Swipe-left on active sessions reveals both Rename (grey, pencil icon) and Archive (red, archive icon) buttons
  • Name resolution: getSessionName() returns customName || summaryText || lastPathSegment || "Unknown"
  • Whitespace normalization: Leading/trailing whitespace is trimmed; empty strings reset to default

Test plan

  • Swipe left on an active session — should show Rename and Archive buttons
  • Tap Rename — prompt appears with placeholder showing default name
  • Enter a name and confirm — session title updates immediately
  • Clear the name and confirm — reverts to default name
  • Force quit and reopen — custom name persists
  • Verify all 49 tests pass (yarn test --run)

Screen recording

Screen.Recording.2026-02-23.at.4.16.51.PM.mov

Closes #290

@ascott ascott force-pushed the feat/session-rename branch 2 times, most recently from 991036f to 7f879da Compare February 23, 2026 23:17
@ascott ascott changed the title feat: add session rename via long-press (#290) feat: add session rename with swipe-left action (#290) Feb 23, 2026
Add ability to rename active sessions by swiping left and tapping the
Rename button alongside the existing Archive button. Custom names are
stored locally via MMKV and persist across app restarts and sync updates.

- Add customName field to Session type with MMKV persistence
- Add updateSessionCustomName store action with whitespace normalization
- Add getSessionName/getSessionDefaultName/getSessionCustomName utils
- Add Rename button to swipe-left actions on active sessions
- Add maxLength support to Modal.prompt
- Clean up custom names on session delete
- Add translations for all 11 languages
- Add 49 tests covering utils, persistence, and store actions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.

Feature Request: Custom Session Name Flag

1 participant