jesseduffield/lazygit · error
gui.sidePanels: a side panel must have at least one tab.
Error message
gui.sidePanels: a side panel must have at least one tab.
What it means
Validation error from validateSidePanels in pkg/config/user_config_validation.go:72. gui.sidePanels is a list of side panels, each itself a list of tab names; an inner list with zero entries means a side panel with no tabs, which lazygit cannot render. The check rejects it at config load time.
Source
Thrown at pkg/config/user_config_validation.go:72
}
if err := validateCustomCommands(config.CustomCommands); err != nil {
return err
}
if err := validateSpinner(config.Gui.Spinner); err != nil {
return err
}
if err := validateSidePanels(config.Gui.SidePanels); err != nil {
return err
}
return nil
}
func validateSidePanels(panels []SidePanel) error {
seen := map[string]bool{}
total := 0
for _, panel := range panels {
if len(panel) == 0 {
return errors.New("gui.sidePanels: a side panel must have at least one tab.")
}
for _, name := range panel {
if !slices.Contains(ValidSidePanelTabs, name) {
return fmt.Errorf("gui.sidePanels: unknown side panel '%s'. Allowed values: %s",
name, strings.Join(ValidSidePanelTabs, ", "))
}
if seen[name] {
return fmt.Errorf("gui.sidePanels: '%s' is listed more than once; each side panel may appear only once.", name)
}
seen[name] = true
total++
}
}
if total == 0 {
return errors.New("gui.sidePanels must not be empty.")
}
// A lot of code focuses these panels directly (e.g. after resolving a
// conflict or popping a stash), so they must always be present; otherwiseView on GitHub (pinned to c477a2959b)
Solutions
- Open config.yml, find gui.sidePanels, and give every inner list at least one valid tab name
- Remove the empty inner list entirely if the panel is not wanted
- Cross-check names against ValidSidePanelTabs (the error for unknown names lists them) and restart lazygit
Example fix
# before
gui:
sidePanels:
- [commits, files]
- []
# after
gui:
sidePanels:
- [commits, files]
- [branches] Defensive patterns
Strategy: validation
Validate before calling
function validateSidePanelsDraft(panels [][]string) error {
for _, panel := range panels {
if len(panel) == 0 {
return errors.New("a side panel must have at least one tab")
}
}
return nil
} Type guard
func isNonEmptySidePanel(p []string) bool { return len(p) > 0 } Prevention
- After editing sidePanels, mentally check every inner list has a tab
- Prefer deleting an unwanted panel over leaving it empty
- Keep names from the documented tab vocabulary
When it happens
Trigger: Writing gui.sidePanels with an empty inner list, e.g. 'sidePanels: [[commits, files], []]' — the second panel has no tabs. Loading the config triggers validateSidePanels which returns this error before the GUI starts.
Common situations: Restructuring sidePanels to hide panels and accidentally leaving an empty group; YAML indentation mistakes that parse a panel as empty; config generated by scripts.
Related errors
- gui.sidePanels must not be empty.
- gui.spinner.frames must not be empty.
- git.diffRenderers: 'command' must be specified for diff rend
- custom command prompt must have a type of 'input', 'menu', '
- You should have an allBranchesLogCmds defined as a sequence!
AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15).
Data as JSON: /api/errors/444023230d58d50d.
Report an issue: GitHub.