Skip to content

Open Settings from the shell's own buttons without crashing - #47

Merged
itz4blitz merged 1 commit into
itz4blitz:mainfrom
venator:open-settings-later
Oct 18, 2026
Merged

itz4blitz merged 1 commit into
itz4blitz:mainfrom
venator:open-settings-later

Conversation

@venator

@venator venator commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

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, from SettingsWindow::page. The click runs inside the shell's update, and gpui draws a new window once before open_window returns. 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::open now 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 --settings shot 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 --workspace and cargo test -p tinyclient --features gui pass.

🤖 Generated with Claude Code

…onger crashes the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@venator
venator requested a review from itz4blitz as a code owner October 18, 2026 17:38
@itz4blitz
itz4blitz merged commit fc20156 into itz4blitz:main Oct 18, 2026
6 checks passed
@venator
venator deleted the open-settings-later branch October 18, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants