Skip to content

fix(config): smooth wt config show shell-integration output for new users - #2562

Merged
max-sixty merged 2 commits into
mainfrom
config-show-output
May 4, 2026
Merged

max-sixty merged 2 commits into
mainfrom
config-show-output

Conversation

@max-sixty

@max-sixty max-sixty commented May 3, 2026 •

Copy link
Copy Markdown
Owner

First impression of wt config show is 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 to info_message (○) with bold shell name to match Already configured and Skipped. 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 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.

3. Brand-new users got no actionable guidance

Found this auditing the config_show_full_not_configured snapshot. With no rc files anywhere:

▲ 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

Zero next step. The ↳ 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 (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_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).

Tests

  • test_config_show_partial_shell_config_shows_hint now sets $SHELL=/bin/zsh to exercise the gated verify-wrapper branch.
  • config_show_full_not_configured snapshot picks up the new install hint.
  • config_show_shell_integration_active snapshot — verified active-but-empty-rc state still suppresses the hint.

Other snapshot diffs are cosmetic env drift (test infrastructure added GIT_*: "" lines).

…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]>
@max-sixty max-sixty changed the title fix(config): make wt config show shell-status entries visually consistent fix(config): smooth wt config show shell-integration output for new users May 3, 2026
@max-sixty
max-sixty merged commit 11702fe into main May 4, 2026
23 of 25 checks passed
@max-sixty
max-sixty deleted the config-show-output branch May 4, 2026 00:23
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]>
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.

1 participant