{"record":{"id":"f2c8c35ab8f17791","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-status-indicator","errorCode":null,"errorMessage":"Failed to update setting: invalid status indicator '{value}'. Expected: cw, whale, dots, off.","messagePattern":"Failed to update setting: invalid status indicator '(.+?)'\\. Expected: cw, whale, dots, off\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1678,"sourceCode":"                    anyhow::bail!(\n                        \"Failed to update setting: invalid composer vim mode '{value}'. Expected: normal, vim.\"\n                    );\n                }\n                self.composer_vim_mode = normalized;\n            }\n            \"transcript_spacing\" | \"spacing\" => {\n                let normalized = normalize_transcript_spacing(value);\n                if ![\"compact\", \"comfortable\", \"spacious\"].contains(&normalized) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid transcript spacing '{value}'. Expected: compact, comfortable, spacious.\"\n                    );\n                }\n                self.transcript_spacing = normalized.to_string();\n            }\n            \"status_indicator\" | \"indicator\" => {\n                let normalized = normalize_status_indicator(value);\n                if ![\"cw\", \"whale\", \"dots\", \"off\"].contains(&normalized) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid status indicator '{value}'. Expected: cw, whale, dots, off.\"\n                    );\n                }\n                self.status_indicator = normalized.to_string();\n            }\n            \"synchronized_output\" | \"sync_output\" | \"sync\" => {\n                let normalized = normalize_synchronized_output(value);\n                if ![\"auto\", \"on\", \"off\"].contains(&normalized) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid synchronized_output '{value}'. Expected: auto, on, off.\"\n                    );\n                }\n                self.synchronized_output = normalized.to_string();\n            }\n            \"workspace_follow_symlinks\" | \"follow_symlinks\" => {\n                self.workspace_follow_symlinks = parse_bool(value)?;\n            }\n            \"default_mode\" | \"mode\" => {","sourceCodeStart":1660,"sourceCodeEnd":1696,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/settings.rs#L1660-L1696","documentation":"Settings::set in the TUI settings module validates the value for the `status_indicator` key. The value is first run through normalize_status_indicator, then checked against the allowed set [\"cw\", \"whale\", \"dots\", \"off\"]; anything else bails with this anyhow error. It is a pure input-validation guard so the status indicator enum never holds an unrenderable value.","triggerScenarios":"Calling Settings::set(\"status_indicator\", v) or Settings::set(\"indicator\", v) with a value that normalizes outside cw|whale|dots|off — e.g. `codewhale config status_indicator circle`, a typo like `dot`, or mixed-case variants the normalizer does not accept.","commonSituations":"Users hand-editing settings.toml keys through the /config command, copying a status-indicator name from another tool (spinner/rainbow styles), or migrating from an older Codewhale version whose indicator names differed.","solutions":["Use one of the four accepted values: cw, whale, dots, or off.","Check the normalizer (normalize_status_indicator in settings.rs) for which case/whitespace forms are accepted.","If a legacy indicator name stopped working, consult release notes for renamed enum values."],"exampleFix":"// before\nsettings.set(\"status_indicator\", \"spinner\")?;\n// after\nsettings.set(\"status_indicator\", \"dots\")?;","handlingStrategy":"validation","validationCode":"const STATUS_INDICATORS: [&str; 4] = [\"cw\", \"whale\", \"dots\", \"off\"];\nfn valid_status_indicator(v: &str) -> bool {\n    STATUS_INDICATORS.contains(&v.trim().to_ascii_lowercase().as_str())\n}","typeGuard":null,"tryCatchPattern":"match settings.set(\"status_indicator\", value) {\n    Err(e) if e.to_string().contains(\"invalid status indicator\") => eprintln!(\"pick cw|whale|dots|off\"),\n    r => r?,\n}","preventionTips":["Keep an allowlist constant next to the call site instead of free-form strings.","Prefer typed enums over strings in your own config layering.","Lowercase/trim user input before passing to set()."],"tags":["rust","configuration","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}