{"record":{"id":"27ffb272d8824aca","repo":"Hmbown/CodeWhale","slug":"invalid-theme-value","errorCode":null,"errorMessage":"invalid theme '{value}'","messagePattern":"invalid theme '(.+?)'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/config_ui.rs","lineNumber":1128,"sourceCode":"        if crate::palette::normalize_user_theme_selector(value)\n            .map_err(anyhow::Error::msg)?\n            .is_some()\n        {\n            return Ok(Self::Custom);\n        }\n        match crate::palette::normalize_theme_name(value) {\n            Some(\"system\") => Ok(Self::System),\n            Some(\"dark\") => Ok(Self::Dark),\n            Some(\"light\") => Ok(Self::Light),\n            Some(\"grayscale\") => Ok(Self::Grayscale),\n            Some(\"catppuccin-mocha\") => Ok(Self::CatppuccinMocha),\n            Some(\"tokyo-night\") => Ok(Self::TokyoNight),\n            Some(\"dracula\") => Ok(Self::Dracula),\n            Some(\"gruvbox-dark\") => Ok(Self::GruvboxDark),\n            Some(\"matrix\") => Ok(Self::Matrix),\n            Some(\"uwu\") => Ok(Self::Uwu),\n            Some(other) => bail!(\"unsupported theme '{other}'\"),\n            None => bail!(\"invalid theme '{value}'\"),\n        }\n    }\n}\n\nimpl OceanTreatmentValue {\n    fn as_setting(self) -> &'static str {\n        match self {\n            Self::Ombre => \"ombre\",\n            Self::Flat => \"flat\",\n        }\n    }\n}\n\nimpl From<&str> for OceanTreatmentValue {\n    fn from(value: &str) -> Self {\n        if value.trim().eq_ignore_ascii_case(\"flat\") {\n            Self::Flat\n        } else {","sourceCodeStart":1110,"sourceCodeEnd":1146,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/config_ui.rs#L1110-L1146","documentation":"Thrown by UiThemeValue::from_setting when normalize_theme_name returns None: the string does not match any built-in theme or alias, and it is not a valid custom user-theme selector (that path returns Custom earlier). This is the catch-all for unrecognized theme names.","triggerScenarios":"Setting theme to a name with no alias mapping, e.g. \"nord\", \"onedark\", or a typo like \"dracul\". Also fires for values that fail both normalize_user_theme_selector and normalize_theme_name.","commonSituations":"Hand-editing the config with a theme from another terminal app; typos; expecting a theme name that a different tool uses.","solutions":["Use a supported name: system, dark, light, grayscale, catppuccin-mocha, tokyo-night, dracula, gruvbox-dark, matrix, uwu (aliases like catppuccin, tokyonight, gruvbox, owo also work)","If you want a custom palette, configure it as a custom user theme rather than a built-in name","Check the exact spelling and dashes in the config value"],"exampleFix":"# before\ntheme = \"nord\"\n\n# after\ntheme = \"tokyo-night\"","handlingStrategy":"validation","validationCode":"fn is_known_theme(value: &str) -> bool {\n    crate::palette::normalize_theme_name(value).is_some()\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy theme names verbatim from the settings UI rather than typing from memory","Run a config lint after hand-editing so unknown values are caught with context","For custom palettes use the custom user-theme selector path, not a built-in name"],"tags":["config","theme","rust","tui","invalid-value"],"backgroundTag":"unsupported-theme-value","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-21T10:36:37.832Z"}