Hmbown/CodeWhale · error · anyhow::Error

unsupported theme '{other}'

Error message

unsupported theme '{other}'

What it means

Thrown by UiThemeValue::from_setting when crate::palette::normalize_theme_name (crates/tui/src/palette/themes.rs:906) recognizes the input but returns a canonical name the config-UI theme enum does not offer. Concretely, "terminal" (aliases term/transparent/follow-terminal/inherit), "claude", and "solarized-light" (alias solarized) normalize successfully yet are not in the config_ui match, so they land in the Some(other) arm.

Source

Thrown at crates/tui/src/config_ui.rs:1127

    fn from_setting(value: &str) -> Result<Self> {
        if crate::palette::normalize_user_theme_selector(value)
            .map_err(anyhow::Error::msg)?
            .is_some()
        {
            return Ok(Self::Custom);
        }
        match crate::palette::normalize_theme_name(value) {
            Some("system") => Ok(Self::System),
            Some("dark") => Ok(Self::Dark),
            Some("light") => Ok(Self::Light),
            Some("grayscale") => Ok(Self::Grayscale),
            Some("catppuccin-mocha") => Ok(Self::CatppuccinMocha),
            Some("tokyo-night") => Ok(Self::TokyoNight),
            Some("dracula") => Ok(Self::Dracula),
            Some("gruvbox-dark") => Ok(Self::GruvboxDark),
            Some("matrix") => Ok(Self::Matrix),
            Some("uwu") => Ok(Self::Uwu),
            Some(other) => bail!("unsupported theme '{other}'"),
            None => bail!("invalid theme '{value}'"),
        }
    }
}

impl OceanTreatmentValue {
    fn as_setting(self) -> &'static str {
        match self {
            Self::Ombre => "ombre",
            Self::Flat => "flat",
        }
    }
}

impl From<&str> for OceanTreatmentValue {
    fn from(value: &str) -> Self {
        if value.trim().eq_ignore_ascii_case("flat") {
            Self::Flat

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Pick a UI-selectable theme: system, dark, light, grayscale, catppuccin-mocha, tokyo-night, dracula, gruvbox-dark, matrix, or uwu
  2. Use a custom theme selector if you want a user-defined theme instead of a built-in name
  3. Upgrade Codewhale if release notes say the theme was added to the config UI

Example fix

# before
theme = "solarized-light"

# after
theme = "gruvbox-dark"
Defensive patterns

Strategy: validation

Validate before calling

const UI_THEMES: &[&str] = &["system", "dark", "light", "grayscale", "catppuccin-mocha", "tokyo-night", "dracula", "gruvbox-dark", "matrix", "uwu"];

fn theme_is_selectable(value: &str) -> bool {
    crate::palette::normalize_theme_name(value)
        .is_some_and(|name| UI_THEMES.contains(&name))
}

Prevention

When it happens

Trigger: Setting the theme to "terminal", "claude", "solarized-light", or any of their aliases in the config UI settings path. Custom user-theme selectors are handled earlier via normalize_user_theme_selector and return Custom, so only these palette names trigger it.

Common situations: Copying a theme name that works elsewhere in the palette layer (or in an older build) into the UI setting; a theme renamed or not yet surfaced in the config UI enum.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/a3252d18761f8e94. Report an issue: GitHub.