Skip to content

feat(config): deprecate switch.picker.timeout-ms#2236

Merged
max-sixty merged 1 commit intomainfrom
deprecate-picker-timeout
Apr 15, 2026
Merged

feat(config): deprecate switch.picker.timeout-ms#2236
max-sixty merged 1 commit intomainfrom
deprecate-picker-timeout

Conversation

@max-sixty
Copy link
Copy Markdown
Owner

switch.picker.timeout-ms bounded 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 at wt config update. Handles both [switch.picker] section form and inline picker = { ... } form, matching existing helpers.

Also removed the SwitchPickerConfig::timeout_ms field and timeout() 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.

This was written by Claude Code on behalf of Maximilian

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>
@max-sixty max-sixty merged commit 407a899 into main Apr 15, 2026
25 checks passed
@max-sixty max-sixty deleted the deprecate-picker-timeout branch April 15, 2026 04:48
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.
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