Skip to content

feat(switch): add [switch.picker] preview setting to open the picker list-only - #4428

Merged
max-sixty merged 1 commit into
mainfrom
feat/picker-preview-hidden
Oct 11, 2026
Merged

max-sixty merged 1 commit into
mainfrom
feat/picker-preview-hidden

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Adds [switch.picker] preview = false, which opens wt switch's picker with the preview hidden. Alt-p still shows it. The default stays true.

The change appends skim's hidden modifier to the preview-window spec (right:N:hidden / down:N:hidden). skim's toggle-preview flips that same preview_window.hidden flag, so the existing alt-p binding reveals the pane at the size the picker already computed. Background preview pre-rendering is unchanged, so the first reveal is just as warm as an always-visible preview, and the setting costs no more work than today's open-then-Alt-p.

Verification:

  • A new PTY test, test_switch_picker_preview_hidden_by_config, checks that the picker opens without the preview controls line and that Alt-p brings it back. The test fails when the :hidden append is removed.
  • Unit tests cover parsing, the accessor default, and merging.
  • wt switch --help, wt config create, and the generated docs mention the key. Help snapshots were refreshed.

Closes #4072

…list-only

`preview = false` appends skim's `hidden` modifier to the preview-window
spec. `alt-p:toggle-preview` flips the same flag, so the toggle still
reveals the pane at its computed size. Default stays `true`.

Closes #4072

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty enabled auto-merge (squash) October 11, 2026 08:50
@max-sixty
max-sixty merged commit 86674a2 into main Oct 11, 2026
37 checks passed
@max-sixty
max-sixty deleted the feat/picker-preview-hidden branch October 11, 2026 08:53
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.

Allow the switch picker to start with the preview hidden

2 participants