Repository navigation
fix(config): smooth wt config show shell-integration output for new users - #2562
Merged
Merged
Conversation
…istent Two readability fixes to `wt config show` shell integration output: 1. "Not configured" entries used `hint_message` (`↳`), making them look like sub-bullets of the previous configured-shell entry. Switched to `info_message` (`○`) with bold shell name to match `Already configured` and `Skipped`. All four shell entries now render as peer status lines; `↳` is reserved for actionable hints (the trailing "To configure, run …" summary, the verify-wrapper hint). 2. The "To verify wrapper loaded: type wt" hint fired under every configured shell when integration was inactive, even when the user's `$SHELL` was a different shell. `type wt` only tells you about the running shell, so a hint under bash while `$SHELL=zsh` is misleading. Gated on `Some(shell) == current_shell()` so it only appears under the user's actual shell. Co-Authored-By: Claude <[email protected]>
Found auditing snapshots: a brand-new user with no rc files for any shell
ran `wt config show` and saw
▲ Shell integration not active
Invoked as: ...
○ bash: Skipped; ~/.bashrc not found
○ zsh: Skipped; ~/.zshrc not found
○ fish: Skipped; ~/.config/fish/functions not found
○ nu: Skipped; ~/.config/nushell/vendor/autoload not found
— no actionable next step. The trailing "To configure, run wt config shell
install" hint was gated solely on `any_not_configured`, which is only flipped
when an rc file exists with no init line. Pure-skipped users were left
without guidance.
Extend the gate so the hint also fires when integration is not active and
no shell ended up in `scan_result.configured`. The `!shell_active` half of
the condition prevents a regression for the dotfile-manager scenario
(wrapper sourced from a non-standard path so `configured` is empty but
integration is loaded).
Co-Authored-By: Claude <[email protected]>
wt config show shell-status entries visually consistent
max-sixty
added a commit
that referenced
this pull request
May 4, 2026
…status (#2572) Follow-up to #2562. `wt config show` now reads `▲ Shell integration not configured` when no working integration exists in any shell (fresh user, container, CI sandbox), and keeps `▲ Shell integration not active` for the case where it's installed but not loaded in this session. The install hint also moves directly under the warning when nothing is configured anywhere, so cause and remedy stay adjacent instead of being separated by four `Skipped` rows. The "configured somewhere" signal accepts `AlreadyExists` rc-file matches, wrapper-based shells with their wrapper present (even if outdated content), and fish at the legacy `conf.d` path — anything less reads as "not configured." The trailing summary hint still fires for partial-config (e.g., zsh `AlreadyExists` + bash needs init line) and for fish-legacy. Fresh-user output: ``` SHELL INTEGRATION ▲ Shell integration not configured ↳ To configure, run wt config shell install Invoked as: ... ○ bash: Skipped; ~/.bashrc not found ... ``` 35 `config_show` snapshots updated for the warning text and hint position. Active, partial-config, fish-outdated/nushell-outdated, and fish-legacy snapshots are unchanged. > _This was written by Claude Code on behalf of @max-sixty_ --------- Co-authored-by: Claude <[email protected]>
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.
First impression of
wt config showis the most important surface for new users — they run it after install to figure out what's going on. Three readability/UX fixes auditing the snapshots.1. "Not configured" rendered as a hint sub-bullet
Used
hint_message(↳), making it look like a sub-bullet of the previous configured-shell entry. Switched toinfo_message(○) with bold shell name to matchAlready configuredandSkipped. All four shell entries (bash/zsh/fish/nu) now render as peer status lines;↳is reserved for actionable hints.2. "To verify wrapper loaded: type wt" fired under unrelated shells
The hint fired under every configured shell when integration was inactive.
type wtonly tells you about the running shell, so a hint under bash while$SHELL=zshis misleading. Gated onSome(shell) == current_shell()so it only appears under the user's actual shell.3. Brand-new users got no actionable guidance
Found this auditing the
config_show_full_not_configuredsnapshot. With no rc files anywhere:Zero next step. The
↳ To configure, run wt config shell installhint was gated solely onany_not_configured, which is only flipped when an rc file exists with no init line. Pure-skipped (fresh-user) state never fired the hint.Extended the gate to also fire when integration is not active and no shell ended up in
scan_result.configured. The!shell_activehalf of the condition prevents a regression for the dotfile-manager scenario (wrapper sourced from a non-standard path soconfiguredis empty but integration is loaded).Tests
test_config_show_partial_shell_config_shows_hintnow sets$SHELL=/bin/zshto exercise the gated verify-wrapper branch.config_show_full_not_configuredsnapshot picks up the new install hint.config_show_shell_integration_activesnapshot — verified active-but-empty-rc state still suppresses the hint.Other snapshot diffs are cosmetic env drift (test infrastructure added
GIT_*: ""lines).