{"record":{"id":"55ad84aece9a8bb5","repo":"Hmbown/CodeWhale","slug":"custom-theme-requires-custom-theme-name","errorCode":null,"errorMessage":"custom theme requires custom_theme_name","messagePattern":"custom theme requires custom_theme_name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config_ui.rs","lineNumber":852,"sourceCode":"        validate_and_normalize_model(config, identity.provider, model)\n            .map_err(|err| anyhow::anyhow!(\"invalid provider_models.{provider_id} value: {err}\"))?;\n    }\n    if doc.config.mcp_config_path.trim().is_empty() {\n        bail!(\"mcp_config_path cannot be empty\");\n    }\n    let _ = theme_setting_for_document(doc)?;\n    Ok(())\n}\n\nfn theme_setting_for_document(doc: &ConfigUiDocument) -> Result<String> {\n    let setting = if doc.settings.theme == UiThemeValue::Custom {\n        let name = doc\n            .settings\n            .custom_theme_name\n            .as_deref()\n            .map(str::trim)\n            .filter(|name| !name.is_empty())\n            .ok_or_else(|| anyhow::anyhow!(\"custom theme requires custom_theme_name\"))?;\n        format!(\"{}{}\", crate::palette::USER_THEME_PREFIX, name)\n    } else {\n        doc.settings.theme.as_setting().to_string()\n    };\n    crate::palette::resolve_theme_setting(&setting, None)\n        .map(|(normalized, _, _)| normalized)\n        .map_err(anyhow::Error::msg)\n}\n\n/// Validate and normalize a model against the provider's *effective* route.\n///\n/// A custom DeepSeek base URL owns its own model namespace, so non-DeepSeek ids\n/// must be accepted here the same way request-time\n/// `wire_model_for_provider_route` preserves them. The previous provider-only\n/// gate rejected those saves even though the live session could use them.\nfn validate_and_normalize_model(\n    config: &Config,\n    provider: crate::config::ApiProvider,","sourceCodeStart":834,"sourceCodeEnd":870,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/config_ui.rs#L834-L870","documentation":"Error \"custom theme requires custom_theme_name\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/config_ui.rs:852 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}