{"record":{"id":"6d28eec653073422","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-workbar-panel-value","errorCode":null,"errorMessage":"Failed to update setting: invalid workbar panel '{value}'. Expected: tasks, agents, background, files, notepad, context, git, or price.","messagePattern":"Failed to update setting: invalid workbar panel '(.+?)'\\. Expected: tasks, agents, background, files, notepad, context, git, or price\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1559,"sourceCode":"            }\n            \"rail_panel\" | \"rail\" => {\n                let normalized = value.trim().to_ascii_lowercase();\n                // `pinned` stays accepted as a setting word; it folds into\n                // the tasks view exactly like the load-time migration.\n                if !matches!(\n                    normalized.as_str(),\n                    \"tasks\"\n                        | \"agents\"\n                        | \"background\"\n                        | \"files\"\n                        | \"notepad\"\n                        | \"context\"\n                        | \"git\"\n                        | \"price\"\n                        | \"watch\"\n                        | \"pinned\"\n                ) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid workbar panel '{value}'. Expected: tasks, agents, background, files, notepad, context, git, or price.\"\n                    );\n                }\n                self.rail_panel = normalize_rail_panel(&normalized).to_string();\n                self.rail_panel_explicit = true;\n            }\n            \"work_surface_top_height\" | \"work_top_height\" => {\n                self.work_surface_top_height = parse_u16_range(\n                    \"work_surface_top_height\",\n                    value,\n                    WORK_SURFACE_TOP_HEIGHT_MIN,\n                    WORK_SURFACE_TOP_HEIGHT_MAX,\n                )?;\n            }\n            \"work_surface_side_width\" | \"work_side_width\" => {\n                self.work_surface_side_width =\n                    parse_u16_range(\"work_surface_side_width\", value, 26, 80)?;\n            }","sourceCodeStart":1541,"sourceCodeEnd":1577,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/settings.rs#L1541-L1577","documentation":"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.","triggerScenarios":"Settings update with key `rail_panel` (alias `rail`) and a value outside the accepted panel list, e.g. `set rail logs`.","commonSituations":"Guessing panel names; copying a panel name from a different TUI; older configs referencing a panel that was renamed or removed.","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."],"exampleFix":"// before\nsettings.set(\"rail\", \"logs\")\n// after\nsettings.set(\"rail\", \"git\")","handlingStrategy":"validation","validationCode":"const RAIL_PANELS: [&str; 8] = [\"tasks\", \"agents\", \"background\", \"files\", \"notepad\", \"context\", \"git\", \"price\"];\nfn valid_rail_panel(v: &str) -> bool {\n    RAIL_PANELS.contains(&v.trim().to_ascii_lowercase().as_str())\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = settings.set(\"rail_panel\", value) {\n    eprintln!(\"{e}\"); // lists accepted panels\n}","preventionTips":["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."],"tags":["config","validation","tui"],"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"}