Hmbown/CodeWhale · error
Failed to update setting: invalid workbar panel
Error message
Failed to update setting: invalid workbar panel '{value}'. Expected: tasks, agents, background, files, notepad, context, git, or price. What it means
The settings setter rejected the value for the `rail_panel` setting, which selects which panel the workbar rail shows. The allowed set is tasks, agents, background, files, notepad, context, git, or price (plus internally accepted watch/pinned that the error text omits). After validation the value is normalized via normalize_rail_panel and rail_panel_explicit is set.
Solutions
- Use one of: tasks, agents, background, files, notepad, context, git, price.
- Check crates/tui/src/settings.rs (rail_panel arm and normalize_rail_panel) for the full accepted set.
- If you need a removed panel, search the repo for its replacement name rather than reusing the old one.
Example fix
// before
settings.set("rail", "logs")
// after
settings.set("rail", "git") Defensive patterns
Strategy: validation
Validate before calling
const RAIL_PANELS: [&str; 8] = ["tasks", "agents", "background", "files", "notepad", "context", "git", "price"];
fn valid_rail_panel(v: &str) -> bool {
RAIL_PANELS.contains(&v.trim().to_ascii_lowercase().as_str())
} Try / catch
if let Err(e) = settings.set("rail_panel", value) {
eprintln!("{e}"); // lists accepted panels
} Prevention
- Pick panel names from the enumerated list only.
- Re-check this list after upgrades; panels get renamed.
- Expose panels via a picker menu instead of typed input.
When it happens
Trigger: Settings update with key `rail_panel` (alias `rail`) and a value outside the accepted panel list, e.g. `set rail logs`.
Common situations: Guessing panel names; copying a panel name from a different TUI; older configs referencing a panel that was renamed or removed.
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
- Failed to update setting: invalid composer density
- Failed to update setting: invalid focus texture
- Failed to update setting: invalid transcript spacing
- Failed to update setting: invalid work surface placement
- Invalid tui.alternate_screen
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/6d28eec653073422.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/settings.rs:1559
}
"rail_panel" | "rail" => {
let normalized = value.trim().to_ascii_lowercase();
// `pinned` stays accepted as a setting word; it folds into
// the tasks view exactly like the load-time migration.
if !matches!(
normalized.as_str(),
"tasks"
| "agents"
| "background"
| "files"
| "notepad"
| "context"
| "git"
| "price"
| "watch"
| "pinned"
) {
anyhow::bail!(
"Failed to update setting: invalid workbar panel '{value}'. Expected: tasks, agents, background, files, notepad, context, git, or price."
);
}
self.rail_panel = normalize_rail_panel(&normalized).to_string();
self.rail_panel_explicit = true;
}
"work_surface_top_height" | "work_top_height" => {
self.work_surface_top_height = parse_u16_range(
"work_surface_top_height",
value,
WORK_SURFACE_TOP_HEIGHT_MIN,
WORK_SURFACE_TOP_HEIGHT_MAX,
)?;
}
"work_surface_side_width" | "work_side_width" => {
self.work_surface_side_width =
parse_u16_range("work_surface_side_width", value, 26, 80)?;
}View on GitHub (pinned to 73e0f67d83)