{"record":{"id":"7b0ecb34d90781c7","repo":"Hmbown/CodeWhale","slug":"unknown-preset-available-presets-calm","errorCode":null,"errorMessage":"Unknown preset '{}'. Available presets: calm","messagePattern":"Unknown preset '(.+?)'\\. Available presets: calm","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1515,"sourceCode":"        }\n        Ok(())\n    }\n\n    /// Apply a named settings preset (#3478).\n    ///\n    /// Presets are the first bundled-settings mechanism: a single name applies a\n    /// coherent group of presentation knobs. `calm` is the \"beautiful/calm\n    /// transcript\" preset — it quiets motion and verbose tool output while\n    /// **keeping evidence reachable**: thinking stays visible and tool runs stay\n    /// expandable (only their inline detail is collapsed), so maintainer/release\n    /// work is never blind to failures. Presentation only — no model, provider,\n    /// routing, or safety setting is touched. Reuses [`Settings::set`] so each\n    /// field goes through the same validation as a single-key set.\n    ///\n    /// Returns the keys changed, or an error for an unknown preset.\n    pub fn apply_preset(&mut self, name: &str) -> Result<Vec<&'static str>> {\n        let Some(bundle) = preset_fields(name) else {\n            anyhow::bail!(\"Unknown preset '{}'. Available presets: calm\", name.trim());\n        };\n        let mut changed = Vec::with_capacity(bundle.len());\n        for (key, value) in bundle {\n            self.set(key, value)?;\n            changed.push(*key);\n        }\n        Ok(changed)\n    }\n\n    /// Get all settings as a displayable string\n    pub fn display(&self, locale: crate::localization::Locale) -> String {\n        use crate::localization::{MessageId, tr};\n        let mut lines = Vec::new();\n        lines.push(tr(locale, MessageId::SettingsTitle).to_string());\n        lines.push(\"─────────────────────────────\".to_string());\n        lines.push(format!(\"  auto_compact:       {}\", self.auto_compact));\n        lines.push(format!(\n            \"  auto_compact_pct:   {:.0}\",","sourceCodeStart":1497,"sourceCodeEnd":1533,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/settings.rs#L1497-L1533","documentation":"Named settings preset application (bundled-settings mechanism): the requested preset name is not one of the shipped presets — currently only `calm` exists. The message lists the valid names so the caller can correct the request.","triggerScenarios":"Thrown at crates/tui/src/settings.rs:1515 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the calm preset","Or set individual settings instead"],"exampleFix":null,"handlingStrategy":"validation","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"}