feat(config): deprecate switch.picker.timeout-ms#2236
Merged
Conversation
The field was parsed but silently ignored after progressive rendering landed — the picker no longer blocks on a data-collection budget. Wire it through the deprecation system so users see a warning on config load and `wt config update` strips it. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
Apr 15, 2026
max-sixty
added a commit
that referenced
this pull request
Apr 15, 2026
The helper wrote to top-level `[switch-picker]` (hyphen, not dot), which was always silently ignored by the loader — the real section is `[switch.picker]`. Progressive rendering (#2231) made the timeout obsolete, and `switch.picker.timeout-ms` was deprecated in #2236. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
added a commit
that referenced
this pull request
Apr 15, 2026
PR #2236 removed `SwitchPickerConfig::timeout_ms` in favour of the progressive picker (#2231). Two references to that config survived: - `src/testing/mod.rs` sets `WORKTRUNK__SWITCH__PICKER__TIMEOUT_MS=0` in every `test_env_vars()` environment. With the field gone, the env-var override is silently discarded by serde during deserialization, so the entry is pure noise. - `src/commands/picker/mod.rs` still mentions a "500ms budget" in the speculative-preview comment. The surrounding lines already explain that no timeout exists; the stray budget reference only confuses readers. Both are noop cleanups — no behaviour change.
This was referenced Apr 15, 2026
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.
switch.picker.timeout-msbounded how long the picker blocked before rendering. After #2231 landed progressive rendering, the field was parsed but silently ignored — violating the CLAUDE.md rule against silently dropping old config keys.Wired through the standard deprecation path in
src/config/deprecation.rs: detection flags the field at top-level and under[projects."X".switch.picker], migration strips it, and the warning points users atwt config update. Handles both[switch.picker]section form and inlinepicker = { ... }form, matching existing helpers.Also removed the
SwitchPickerConfig::timeout_msfield andtimeout()accessor — migration strips the key before serde sees it, so the struct field is no longer needed. Tests referencing the old field updated or dropped. Example TOMLs and the picker comment cleaned up accordingly.