Show shell/distro icon in vertical tabs#9518
Open
webdevtodayjason wants to merge 1 commit intowarpdotdev:masterfrom
Open
Show shell/distro icon in vertical tabs#9518webdevtodayjason wants to merge 1 commit intowarpdotdev:masterfrom
webdevtodayjason wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
The vertical-tabs detail icon falls back to a generic terminal glyph for any pane that isn't a CLI agent or Oz session, so users with mixed shells (PowerShell + WSL distros, etc.) can't distinguish tabs at a glance. Horizontal tabs already render shell-specific icons via `ShellIndicatorType::to_icon()` (see `tab.rs:1109-1112`); this just plumbs the same accessor into the vertical-tabs render path. When `terminal_view.shell_indicator_type()` returns `Some`, render that icon (Powershell / GitBash / Ubuntu / Debian / Kali / Arch / Linux). Otherwise fall back to the existing `WarpIcon::Terminal` default. The icon color falls into the existing catch-all `_ => sub_text` arm — no other changes needed. The new icons reuse the existing assets and the existing `ShellIndicatorType` mapping; there are no new types, icons, or SVG assets in this change. Fixes warpdotdev#9175
2 tasks
Contributor
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: @zachbai. Comment Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR updates vertical tab detail badges so normal terminal panes can display the same shell or distro icon already used by horizontal tabs, while preserving the existing Oz, ambient-agent, CLI-agent, and generic terminal fallbacks.
Concerns
- No blocking correctness, security, or performance concerns found in the changed diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
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.
Description
Vertical tabs currently render a generic terminal glyph for any pane that isn't a CLI agent or Oz session, so on Windows (mixed PowerShell + multiple WSL distros) every native and WSL tab looks identical. Horizontal tabs already differentiate them via
ShellIndicatorType::to_icon()(seeapp/src/tab.rs:1109-1112). This PR plumbs the same accessor into the vertical-tabs render path.The change is a single new
else ifarm inrender_detail_kind_badge_icon(app/src/workspace/view/vertical_tabs.rs):When
shell_indicator_type()returnsSome, render the shell/distro icon (Powershell / GitBash / Ubuntu / Debian / Kali / Arch / Linux); otherwise fall through to the existingWarpIcon::Terminaldefault. The icon-color match already has a catch-all_ => sub_textarm that handles the new icon variants — no color logic changes needed.Reuses what's already there
ShellIndicatorTypeand theTryFrom<&ShellLaunchData>impl — already exists inapp/src/shell_indicator.rsterminal_view.shell_indicator_type()getter — already exists atapp/src/terminal/view.rs:24047tab.rs:1109-1112Behavior on macOS
ShellIndicatorType::try_fromonly returnsOkfor PowerShell, MSYS2/GitBash, WSL, or DockerSandbox launches. On macOS with bash/zsh/fish the impl returnsErr, soshell_indicator_type()isNoneand the existing generic-Terminal icon is preserved — no behavior change for macOS users with default shells.Testing
No new tests added. The change is a 2-line plumbing fix that re-uses
ShellIndicatorType::to_icon(), which is already exercised in production via horizontal tabs (app/src/tab.rs:1109-1112). Adding a vertical-tabs-specific unit test would duplicate that coverage and require non-trivial mock scaffolding for the icon-decision branch inrender_detail_kind_badge_icon, which has no existing icon-decision tests invertical_tabs_tests.rs.Local presubmit note:
cargo fmt --checkpasses locally. The full./script/presubmitrequires the Metal Toolchain to compile shaders during thewarpuibuild, and the asset downloads but doesn't activate without further intervention on this machine. Relying on CI for the full clippy/clippy-wasm/nextest matrix.Server API dependencies
This PR does not depend on any server API changes.
Agent Mode
Changelog Entries for Stable
CHANGELOG-IMPROVEMENT: Vertical tabs now show a shell/distro icon (PowerShell, Git Bash, Ubuntu, Debian, Kali, Arch, Linux) for native shell and WSL panes, matching the existing horizontal-tabs behavior.
Fixes #9175