Skip to content

fix: preset sub-bar not shown because is_command_in_path ignores augmented PATH #79

@Crempa

Description

@Crempa

Problem

The preset sub-bar (Claude, Codex, OpenCode, etc.) does not appear above the terminal output even when the CLIs are installed and available in the user's shell PATH. The presets are visible and functional in the command palette, but the quick-launch buttons in the terminal tab are missing.

Root cause

is_command_in_path() in agent_presets.rs:514 reads the raw system PATH via env::var_os("PATH"):

fn is_command_in_path(command: &str) -> bool {
    let path_var = env::var_os("PATH").unwrap_or_default();
    env::split_paths(&path_var).any(|dir| dir.join(command).is_file())
}

On macOS, GUI apps launched from the Dock/Launchpad inherit a minimal system PATH that does not include user-specific directories like ~/.local/bin, /opt/homebrew/bin, or ~/.opencode/bin.

Arbor already solves this for process execution — augment_path_from_login_shell() in app_bootstrap.rs:170 runs the user's login shell to capture the full PATH and stores it in AUGMENTED_PATH. The create_command() helper correctly uses this augmented PATH when spawning processes.

However, is_command_in_path() does not use AUGMENTED_PATH. It checks the original minimal system PATH, so it reports CLIs as not installed. Since installed_preset_kinds() depends on is_command_in_path(), the sub-bar's visibility check fails and the entire bar is hidden.

The command palette is unaffected because it lists all preset kinds without filtering by installation status (command_palette.rs:92).

Expected behavior

The preset sub-bar should show buttons for all agent CLIs that are available in the user's shell PATH, matching what the command palette shows.

Suggested fix

is_command_in_path() should check AUGMENTED_PATH (falling back to env::var_os("PATH") if not yet initialized).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions