Skip to content

fix: persist session renames through state.db sync - #1

Merged
dataguybobby merged 2 commits into
mainfrom
fix/session-rename-persistence
Jul 22, 2026
Merged

fix: persist session renames through state.db sync#1
dataguybobby merged 2 commits into
mainfrom
fix/session-rename-persistence

Conversation

@dataguybobby

Copy link
Copy Markdown
Owner

Summary

  • Persist chat renames to Hermes state.db before updating the local sessions.json cache, so syncSessionCache cannot resurrect the old title
  • Surface duplicate/invalid title failures (Hermes unique titles + 100-char cap) instead of swallowing DB errors with no UI feedback
  • Share title normalization and rename confirm UX between the sidebar and Sessions modal to keep both screens lean and consistent

Upstream PR: fathah#865

Test plan

  • Rename a conversation in the sidebar; switch chats / wait for refresh — name should stick
  • Rename to a title already used by another session — toast shows duplicate error; editor stays open; list rolls back
  • Rename with extra internal spaces — persisted title matches collapsed whitespace in the list after sync
  • npm test -- tests/session-cache-sync.test.ts src/shared/session-title.test.ts
  • npm run typecheck

Made with Cursor

dataguybobby and others added 2 commits July 21, 2026 23:23
Renames previously updated the local sessions.json cache first and
swallowed state.db errors, so the UI looked successful until the next
syncSessionCache restored the old Hermes title. Write the durable DB
row first (honoring unique titles and the 100-char cap), only then
mirror into the cache, and toast/rollback when the write fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pull title policy into src/shared/session-title and the optimistic
rename UX into confirmSessionRename so the sidebar and Sessions modal
stop duplicating toast/rollback/refocus logic. Keeps both screens under
the 1k-line ceiling and prevents UI/DB whitespace drift on rename.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dataguybobby
dataguybobby merged commit 6d8b3b7 into main Jul 22, 2026
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