Skip to content

Make a provider switch clear its settings and show at once in the TUI - #70

Merged
thesiti92 merged 4 commits into
mainfrom
tui-refresh-settings
Oct 2, 2026
Merged

thesiti92 merged 4 commits into
mainfrom
tui-refresh-settings

Conversation

@thesiti92

@thesiti92 thesiti92 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Found testing 0.1.9 in the TUI against Whiteboard's settings.

Changes

  • Provider switch clears its settings. api_key, endpoint, model and provider_details are marked x-reset-by = "provider". config set clears them when the provider takes a new value, so a switch in the TUI or the CLI no longer sends the old vendor's key to the new vendor, or to the old vendor's endpoint. The prompt and general settings (thresholds, tests, timeouts) stay. Setting the same provider again changes nothing. The manifest check rejects an x-reset-by that names no other option.
  • The TUI rereads settings after a change. Values that follow another setting, such as the model default, now update at once instead of after reopening the screen.

Verified

  • Store test: switching Anthropic → Gemini keeps only the prompt and min_lines. Settings test for the reread. Both fail without their fix.
  • cargo test passes. The TUI suite passes apart from the shutdown signal test, which also fails on main locally.
  • In tmux: the patched TUI against this build switches Anthropic (key, proxy endpoint, Sonnet, custom prompt) to Gemini. Key, endpoint and model clear, Model shows gemini-3.8-flash, and the prompt and min_lines stay.

For Whiteboard's next diffr bump: Whiteboard's save skips writes equal to values it read before saving. Once diffr clears the endpoint on a provider change, a custom endpoint kept across a switch would be skipped and lost. Its writes need to compare against values reread after each write.

@thesiti92 thesiti92 changed the title Reread settings after a change in the TUI Make a provider switch clear its settings and show at once in the TUI Oct 1, 2026
@thesiti92
thesiti92 force-pushed the tui-refresh-settings branch from b50bc1a to d8265dc Compare October 1, 2026 18:10
@thesiti92
thesiti92 force-pushed the tui-refresh-settings branch from 1b334cd to 455e9fd Compare October 1, 2026 19:06
A change can move other values, such as a model default that follows the provider, so the settings screen rereads config show after each write instead of updating only the edited row.
Options marked x-reset-by = "provider" are cleared by config set when the provider takes a new value, so a switch in the TUI or the CLI never sends the old vendor's key to the new one or to its endpoint. The prompt and general settings stay.
@thesiti92
thesiti92 force-pushed the tui-refresh-settings branch from 455e9fd to fa07547 Compare October 2, 2026 18:20
@thesiti92
thesiti92 enabled auto-merge (squash) October 2, 2026 18:20
@thesiti92
thesiti92 merged commit 909c9cc into main Oct 2, 2026
35 checks passed
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