tui: keep cleared Fast tier from reappearing after side-thread resume#23121
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
After turning Fast mode off in the TUI, returning from a side thread could make
Fastappear again in the main chat widget. The opt-out itself was still persisted; the display was being rebuilt from stale cachedThreadSessionStatedata, which made it look like Fast had been re-enabled.Fixes #23104.
What changed
service_tierin sync whenever the user persists a service-tier selection.Manual repro
Fastis enabled by default./fastand turn Fast mode off. ConfirmFastdisappears from the chat widget display./side test, then return to the main thread./agent, enter a child thread, then return to the main thread.Fastreappears in the main chat widget display even though the opt-out was already persisted.Faststays cleared.Verification
cargo test -p codex-tui app::thread_session_state::tests::service_tier_sync_updates_active_cached_session -- --exact