{"record":{"id":"9f2884b8fd839a6d","repo":"jesseduffield/lazygit","slug":"gui-sidepanels-must-not-be-empty","errorCode":null,"errorMessage":"gui.sidePanels must not be empty.","messagePattern":"gui\\.sidePanels must not be empty\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/user_config_validation.go","lineNumber":87,"sourceCode":"\ttotal := 0\n\tfor _, panel := range panels {\n\t\tif len(panel) == 0 {\n\t\t\treturn errors.New(\"gui.sidePanels: a side panel must have at least one tab.\")\n\t\t}\n\t\tfor _, name := range panel {\n\t\t\tif !slices.Contains(ValidSidePanelTabs, name) {\n\t\t\t\treturn fmt.Errorf(\"gui.sidePanels: unknown side panel '%s'. Allowed values: %s\",\n\t\t\t\t\tname, strings.Join(ValidSidePanelTabs, \", \"))\n\t\t\t}\n\t\t\tif seen[name] {\n\t\t\t\treturn fmt.Errorf(\"gui.sidePanels: '%s' is listed more than once; each side panel may appear only once.\", name)\n\t\t\t}\n\t\t\tseen[name] = true\n\t\t\ttotal++\n\t\t}\n\t}\n\tif total == 0 {\n\t\treturn errors.New(\"gui.sidePanels must not be empty.\")\n\t}\n\t// A lot of code focuses these panels directly (e.g. after resolving a\n\t// conflict or popping a stash), so they must always be present; otherwise\n\t// that code would focus a hidden panel.\n\tfor _, required := range []string{\"files\", \"branches\", \"commits\"} {\n\t\tif !seen[required] {\n\t\t\treturn fmt.Errorf(\"gui.sidePanels: '%s' must be included; it can't be hidden.\", required)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validateSpinner(spinner SpinnerConfig) error {\n\tif len(spinner.Frames) == 0 {\n\t\treturn errors.New(\"gui.spinner.frames must not be empty.\")\n\t}\n\tfirstWidth := utils.StringWidth(spinner.Frames[0])\n\tif lo.SomeBy(spinner.Frames, func(frame string) bool {","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/config/user_config_validation.go#L69-L105","documentation":"Validation error from validateSidePanels (user_config_validation.go:87). After iterating all panels, if no tab was counted at all (total == 0) then gui.sidePanels is an empty list of panels — there would be nothing to show in the side panels region. lazygit rejects this at startup rather than render an empty UI.","triggerScenarios":"Setting 'gui: sidePanels: []' (empty top-level list) in config.yml. Note this is the outer list being empty; an empty inner list is the separate 'at least one tab' error.","commonSituations":"Attempting to hide all side panels for a commits-only workflow; YAML 'sidePanels:' with nothing beneath it parsing as an empty list; config templating that emits an empty array.","solutions":["Populate sidePanels with at least one panel containing at least one tab, e.g. '- [commits]'","Ensure the required tabs files, branches, commits are present across all panels (the validator enforces this next)","If the goal was fewer panels, merge tabs into fewer panels instead of emptying the list"],"exampleFix":"# before\ngui:\n  sidePanels: []\n\n# after\ngui:\n  sidePanels:\n    - [files, branches, commits]","handlingStrategy":"validation","validationCode":"function hasAtLeastOnePanel(panels [][]string) bool { return len(panels) > 0 }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never emit an empty top-level sidePanels list from config generators","Remember files/branches/commits must appear somewhere — you cannot shrink to zero anyway","Comment out the whole sidePanels key to use defaults instead of an empty list"],"tags":["config","yaml","validation","gui"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}