feat(switch): integrate interactive picker into wt switch#894
Merged
feat(switch): integrate interactive picker into wt switch#894
wt switch#894Conversation
`wt switch` without arguments now opens the interactive picker (previously `wt select`). This simplifies the mental model: one command for all switching. - `wt switch` → opens interactive picker (Unix) or shows error (Windows) - `wt switch --branches/--remotes` → customizes picker - `wt select` → deprecated hidden alias with warning Removes the separate `wt select` docs page since the functionality is now documented under `wt switch`. The `[select]` config section is preserved for backward compatibility with a TODO to rename once migration is confirmed. Closes #890 Co-Authored-By: Claude <noreply@anthropic.com>
The test expects the Unix error message ("Interactive picker requires
an interactive terminal") but Windows shows a different message
("Interactive picker is not available on Windows").
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
719703f to
f846d7c
Compare
…r --clobber
These flags only make sense when switching to a specific branch, not when
opening the interactive picker. Previously, running `wt switch --create`
would silently ignore the flag and open the picker instead.
Now clap properly enforces that these flags require a branch argument:
$ wt switch --create
error: the following required arguments were not provided:
<BRANCH>
Co-Authored-By: Claude <noreply@anthropic.com>
Owner
Author
|
Decent observation, thanks! Fixed in 92cf72a — flags like [CC on behalf of Max] |
Owner
Author
|
@juice928 what reviewer are you? I thought this was good! |
# Conflicts: # tests/snapshots/integration__integration_tests__approval_ui__select_fails_in_non_tty.snap # tests/snapshots/integration__integration_tests__help__help_config_create.snap # tests/snapshots/integration__integration_tests__help__help_list_long.snap # tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap # tests/snapshots/integration__integration_tests__help__help_md_root.snap # tests/snapshots/integration__integration_tests__help__help_no_args.snap # tests/snapshots/integration__integration_tests__help__help_root_long.snap # tests/snapshots/integration__integration_tests__help__help_root_short.snap # tests/snapshots/integration__integration_tests__help__help_switch_long.snap # tests/snapshots/integration__integration_tests__help__help_switch_short.snap # tests/snapshots/integration__integration_tests__switch__switch_missing_argument_hints.snap
The snapshot was stale after integrating `wt select` into `wt switch`. Now `wt switch` without args shows the picker error, not clap's missing argument message. Co-Authored-By: Claude <noreply@anthropic.com>
The picker is a navigation method (like shortcuts), not an afterthought. New order: Shortcuts → Interactive picker → GitHub/GitLab PRs → Troubleshooting Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <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.
Summary
wt switchwithout arguments now opens the interactive picker (previouslywt select)wt selectremains as a deprecated hidden alias with deprecation warning--branchesand--remotesflags added towt switchfor picker customizationwt selectdocs page; functionality documented underwt switch[select]config section is preserved for backward compatibilityTest plan
wt switchwithout args opens interactive picker (Unix)wt switchwithout args shows error on Windowswt selectshows deprecation warning then workswt switch --branches/wt switch --remotesworkcargo run -- hook pre-merge --yes)selectCloses #890
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com