feat: pin chat session name to prevent auto-renames#14864
Open
LWWZH wants to merge 1 commit into
Open
Conversation
DeJeune
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Before this PR:
isNameManuallyEditedinternally, but there was no explicit UI to pin/unpin a name without renaming.isNameManuallyEditedfield at all, so they were always auto-renamed after each conversation turn.After this PR:
isNameManuallyEditedsupport to agent sessions (DB schema, migration, shared schema, service mapper, renderer types, and auto-rename guard).Fixes #14824
Why we need it and why it was done in this way
The user requested the ability to "pin" a chat session name so it won't be overwritten by automatic title generation. The existing
isNameManuallyEditedfield onTopicalready provided the backend guard, but it was implicit (only set on manual rename) and agent sessions completely lacked it.The following tradeoffs were made:
isNameManuallyEditedcontinue to work because the field is optional/falsy by default.The following alternatives were considered:
isNameManuallyEditedalready exists for topics and is the simplest solution.Breaking changes
None. The new DB column has a
DEFAULT false, so existing agent sessions are unaffected.Special notes for your reviewer
0020_pin_session_name.sqladdsis_name_manually_editedtoagent_session. The_journal.jsonentry was also added manually.agentSessionRenameLocksinmessageThunk.tswas moved before async I/O to prevent a race condition where concurrent messages could trigger duplicate LLM summaries.Checklist
Release note