Repository navigation
Open Settings from the shell's own buttons without crashing - #47
Merged
Merged
Conversation
…onger crashes the window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Clicking the Settings cog on the rail crashes the window when Settings is not already open:
cannot read tinyclient::gui::state::Shell while it is already being updated, fromSettingsWindow::page. The click runs inside the shell's update, and gpui draws a new window once beforeopen_windowreturns. That draw reads the shell, for the accounts and whether chatd answers. "Settings…" in the accounts menu and "Call settings…" in a call's menu take the same path. The menu bar and ⌘, do not, which is why they work.settings::opennow opens the window once the current update is over (cx.defer), so every caller is covered. That also covers a window already open being moved to another section, which saved the choice through the shell.There is no unit test: nothing in the crate opens a window under test. Instead, the
--settingsshot now opens Settings from inside the shell's update, as the buttons do. Without the fix it panics with the same trace; with it, it runs to the end.cargo test --workspaceandcargo test -p tinyclient --features guipass.🤖 Generated with Claude Code