Hmbown/CodeWhale · error · anyhow::Error

Failed to update setting: invalid rail panel '{value}'. Expe

Error message

Failed to update setting: invalid rail panel '{value}'. Expected: tasks, agents, context, or pinned.

What it means

Settings update validation for the rail panel key: the normalized value matched none of the accepted rail panels (tasks, agents, context, pinned). Fired from the generic settings setter, so it is a key/value validation error, not a state problem.

Source

Thrown at crates/tui/src/settings.rs:1275

                }
                self.focus_texture = normalized;
            }
            "work_surface_placement" | "work_surface" | "work_rail" => {
                let normalized = value.trim().to_ascii_lowercase();
                if !matches!(normalized.as_str(), "top" | "left" | "right" | "off") {
                    anyhow::bail!(
                        "Failed to update setting: invalid work surface placement '{value}'. Expected: top, left, right, or off."
                    );
                }
                self.work_surface_placement = normalized;
            }
            "rail_panel" | "rail" => {
                let normalized = value.trim().to_ascii_lowercase();
                if !matches!(
                    normalized.as_str(),
                    "tasks" | "agents" | "context" | "pinned"
                ) {
                    anyhow::bail!(
                        "Failed to update setting: invalid rail panel '{value}'. Expected: tasks, agents, context, or pinned."
                    );
                }
                self.rail_panel = normalized;
                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 0c42157ee5)

Solutions

  1. Set the rail panel to tasks, agents, context, or pinned
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/settings.rs:1275 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/28af660fe6ddad91. Report an issue: GitHub.