Hmbown/CodeWhale · error
Failed to update setting: invalid status indicator
Error message
Failed to update setting: invalid status indicator '{value}'. Expected: cw, whale, dots, off. What it means
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.
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.
Example fix
// before
settings.set("status_indicator", "spinner")?;
// after
settings.set("status_indicator", "dots")?; Defensive patterns
Strategy: validation
Validate before calling
const STATUS_INDICATORS: [&str; 4] = ["cw", "whale", "dots", "off"];
fn valid_status_indicator(v: &str) -> bool {
STATUS_INDICATORS.contains(&v.trim().to_ascii_lowercase().as_str())
} Try / catch
match settings.set("status_indicator", value) {
Err(e) if e.to_string().contains("invalid status indicator") => eprintln!("pick cw|whale|dots|off"),
r => r?,
} Prevention
- 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().
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- A pinned task provider requires an explicit model
- Failed to update setting: invalid cost currency
- Failed to update setting: invalid mode
- Failed to update setting: invalid ocean treatment
- Failed to update setting: invalid permission posture
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/f2c8c35ab8f17791.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/settings.rs:1678
anyhow::bail!(
"Failed to update setting: invalid composer vim mode '{value}'. Expected: normal, vim."
);
}
self.composer_vim_mode = normalized;
}
"transcript_spacing" | "spacing" => {
let normalized = normalize_transcript_spacing(value);
if !["compact", "comfortable", "spacious"].contains(&normalized) {
anyhow::bail!(
"Failed to update setting: invalid transcript spacing '{value}'. Expected: compact, comfortable, spacious."
);
}
self.transcript_spacing = normalized.to_string();
}
"status_indicator" | "indicator" => {
let normalized = normalize_status_indicator(value);
if !["cw", "whale", "dots", "off"].contains(&normalized) {
anyhow::bail!(
"Failed to update setting: invalid status indicator '{value}'. Expected: cw, whale, dots, off."
);
}
self.status_indicator = normalized.to_string();
}
"synchronized_output" | "sync_output" | "sync" => {
let normalized = normalize_synchronized_output(value);
if !["auto", "on", "off"].contains(&normalized) {
anyhow::bail!(
"Failed to update setting: invalid synchronized_output '{value}'. Expected: auto, on, off."
);
}
self.synchronized_output = normalized.to_string();
}
"workspace_follow_symlinks" | "follow_symlinks" => {
self.workspace_follow_symlinks = parse_bool(value)?;
}
"default_mode" | "mode" => {View on GitHub (pinned to 73e0f67d83)