fix(desktop): new session inherits settings from active tab (#4019, #4088)#4097
Merged
Conversation
EnsureBlankTab now inherits model, effort, mode, toolApprovalMode, disabledMCP, and mcpOrder from the currently active tab when creating a blank session. Previously model and effort were left empty (falling back to config defaults), mode was hardcoded to normal, and toolApprovalMode was hardcoded to ask. The indexed-topic fallback path (which used to delegate to OpenProjectTab/OpenGlobalTab and therefore bypass inheritance) now builds the tab inline so it receives the same inherited settings. Fork also now carries toolApprovalMode (the only setting missing from its carry-over set), so forked sessions preserve the same approval posture as the source. Result: clicking + on the tab bar, or forking a session, keeps the same model, effort, collaboration mode, tool-approval posture, and MCP state that the user already configured.
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.
Lands @JesonChou's fix from #4087 (via origin so required checks run on the protected branch) plus a regression test.
Fix (by @JesonChou, #4087)
Clicking "New Session" / the "+" tab button created a blank tab with hardcoded defaults instead of carrying over the active tab's model, effort, mode, tool-approval, and MCP state.
EnsureBlankTabnow inherits model / effort / mode /toolApprovalMode/disabledMCP/mcpOrderfrom the active tab, falling back to the old defaults only on first launch (no active tab).OpenProjectTab/OpenGlobalTab, which carried their own hardcoded defaults — so that bypass no longer drops the inherited settings.Forkgained the missingtoolApprovalModecarry-over (forks previously reverted to "ask").Added test
desktop/new_session_inherit_test.goasserts a blank tab opened from an active session inherits effort, mode, tool-approval, and MCP state instead of falling back to defaults. Mutation-checked — disabling the inherit block fails the test.Closes #4087
Closes #4019
Closes #4088