feat: preserve manual rename + complete full-width chat layout#2
Merged
zhonghuaY merged 2 commits intofix/sidebar-rename-models-fullwidthfrom Apr 29, 2026
Conversation
Adds a 'manual' bool to /api/session/rename so the server can distinguish
explicit user renames from LLM-generated provisional/refined titles.
When manual=True, sets s.user_renamed_title=True; the background title
generator and refresher then short-circuit ('skipped: manual_title') at
every check point so user intent is never silently overwritten.
- /title slash command, sidebar context menu, titlebar dialog, duplicate
-> manual:true
- first-message provisional title (auto), background LLM refine (auto)
-> manual:false
- new helper _has_manual_title_override() uses 'is True' to avoid being
fooled by MagicMock attribute access in tests
- Session.__init__ now accepts arbitrary kwargs so the new field
round-trips through deserialization
Co-authored-by: Copilot <[email protected]>
Follow-up to 6eba0c1 (feat(layout): full-width chat output container). That commit removed the outer cap but several inner elements still had 'max-width: var(--msg-max)', so message bodies, tool cards, thinking cards, error rows and the message footer remained narrow. - drop max-width from .msg-body, .tool-card, .thinking-card, .msg-foot, .msg-row[data-error], .messages-inner (and its 1400/1800px overrides) - update test_full_width_chat assertions to enforce the absence of these caps so future regressions are caught Co-authored-by: Copilot <[email protected]>
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.
Summary
Two unrelated but ready-to-ship fixes that were sitting in a WIP stash. Split into 2 commits for clean review.
Commit 1 —
feat(title): preserve manual rename against LLM auto-title overwriteProblem
When a user manually renames a session (via
/titleslash command, sidebar context menu, titlebar dialog, or duplicate-with-rename), the background LLM title generator/refresher would silently overwrite their title on the next model response.Fix
/api/session/renamenow accepts amanual: boolparameter to distinguish explicit user renames from LLM-generated provisional/refined titles.manual=True, the server setss.user_renamed_title = True._run_background_title_update) and refresher (_run_background_title_refresh) now check this flag at every commit point and short-circuit with'skipped: manual_title'._has_manual_title_override(session)uses strictis Truecomparison to avoid being fooled by MagicMock attribute access in tests.Session.__init__now accepts arbitrary**kwargsso the newuser_renamed_titlefield round-trips through deserialization without requiring schema migration.Call site semantics
/title <name>slash commandtruetruetruetruefalsefalse(resets flag)Files
api/models.py,api/routes.py,api/streaming.py(server-side)static/{commands,messages,panels,sessions}.js(4 call sites)tests/test_session_extra_fields.py(new), plus updates totest_rename_session.py,test_title_aux_routing.py,test_1058_adaptive_title_refresh.pyCommit 2 —
fix(layout): remove leftover msg max-width caps for full-width chatProblem
Follow-up to
6eba0c15 feat(layout): full-width chat output container. That commit removed the outer cap but several inner elements still hadmax-width: var(--msg-max), so message bodies, tool cards, thinking cards, error rows, and the message footer remained narrow on wide screens.Fix
max-widthfrom.msg-body,.tool-card,.thinking-card,.msg-foot,.msg-row[data-error],.messages-inner(and its@media1400/1800px overrides).tests/test_full_width_chat.pyassertions to enforce the absence of these caps so future regressions are caught.Files
static/style.css,tests/test_full_width_chat.pyTesting
Both commits sanity-tested. Pre-existing 5 failures in
test_rename_session.pyare env-related (auth/connection refused on the in-process test server) and identical on baseline before this PR — not caused by these changes.Co-authored-by: Copilot <[email protected]>