{"record":{"id":"42205a88196e5de9","repo":"Hmbown/CodeWhale","slug":"configured-theme-could-not-be-loaded-usin","errorCode":null,"errorMessage":"⚠ configured theme '{}' could not be loaded — using System ({error})","messagePattern":"⚠ configured theme '(.+?)' could not be loaded — using System \\((.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/tui/app/init.rs","lineNumber":311,"sourceCode":"        let composer_vim_enabled = settings\n            .composer_vim_mode\n            .trim()\n            .eq_ignore_ascii_case(\"vim\");\n        let transcript_spacing = TranscriptSpacing::from_setting(&settings.transcript_spacing);\n        let max_input_history = settings.max_input_history;\n        let use_paste_burst_detection = settings.paste_burst_detection;\n        // Resolve the named theme from settings; unknown values were already\n        // normalised to \"system\" in Settings::load. The background_color\n        // setting still overlays on top.\n        let background_color_override = settings\n            .background_color\n            .as_deref()\n            .and_then(palette::parse_hex_rgb_color);\n        let background_setting = background_color_override.and_then(palette::hex_rgb_string);\n        let resolved_theme =\n            palette::resolve_theme_setting(&settings.theme, background_setting.as_deref());\n        let theme_warning = resolved_theme.as_ref().err().map(|error| {\n            format!(\n                \"⚠ configured theme '{}' could not be loaded — using System ({error})\",\n                settings.theme\n            )\n        });\n        let (_, theme_id, ui_theme) = resolved_theme.unwrap_or_else(|_| {\n            let id = palette::ThemeId::System;\n            let mut theme = id.ui_theme();\n            if let Some(background) = background_color_override {\n                theme = theme.with_background_color(background);\n            }\n            (id.name().to_string(), id, theme)\n        });\n        let provider_models = settings.provider_models.clone().unwrap_or_default();\n        // `provider_models` remembers the last `/model` pick per provider. It\n        // is a convenience default, not an override: when this launch named a\n        // model explicitly (`--model`, forwarded as `CODEWHALE_MODEL`), that\n        // request wins. Before this fix the memory won unconditionally, so\n        // `codewhale --provider moonshot --model kimi-k3` silently kept running","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tui/app/init.rs#L293-L329","documentation":"At startup the configured theme name (already normalized in Settings::load) is resolved from the theme registry; if loading fails — unknown name, unreadable theme asset, or palette mismatch — the message reports the load error and the app falls back to the System theme rather than aborting launch.","triggerScenarios":"Thrown at crates/tui/src/tui/app/init.rs:311 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the theme name in settings to a registered theme","Check the error detail for missing/corrupt theme assets","Continue with System theme if the custom theme is optional"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}