jesseduffield/lazygit · error

gui.sidePanels: unknown side panel '%s'. Allowed values: %s

Error message

gui.sidePanels: unknown side panel '%s'. Allowed values: %s

What it means

Raised by validateSidePanels in pkg/config/user_config_validation.go during config validation. Each tab name inside a gui.sidePanels entry must be one of the entries in the ValidSidePanelTabs list; anything else (typo, renamed panel, unsupported name) is rejected with the full allowed list echoed back.

Source

Thrown at pkg/config/user_config_validation.go:76

	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; otherwise
	// that code would focus a hidden panel.
	for _, required := range []string{"files", "branches", "commits"} {
		if !seen[required] {
			return fmt.Errorf("gui.sidePanels: '%s' must be included; it can't be hidden.", required)

View on GitHub (pinned to c477a2959b)

Solutions

  1. Compare the offending name against the allowed values printed verbatim in the error message and correct the typo.
  2. If the name looks correct, check the lazygit version's ValidSidePanelTabs slice (pkg/config/user_config_validation.go) — the panel may not exist in your build; upgrade or pick an existing tab.
  3. Remove the unknown entry entirely if you do not need that tab.

Example fix

# before
gui:
  sidePanels:
    - [files, branchs, commits]

# after
gui:
  sidePanels:
    - [files, branches, commits]
Defensive patterns

Strategy: validation

Validate before calling

// Check side-panel tab names against the same allowlist before shipping a config:
valid := []string{"files", "branches", "commits", "worktree", /* ... */}
for _, panel := range cfg.Gui.SidePanels {
	for _, name := range panel {
		if !slices.Contains(valid, name) {
			return fmt.Errorf("invalid side panel tab: %s", name)
		}
	}
}

Prevention

When it happens

Trigger: Setting gui.sidePanels in the config with a tab name not in ValidSidePanelTabs, e.g. `sidePanels: [[commits, worktree]]` when 'worktree' is not a valid tab, then starting lazygit so validateUserConfig runs.

Common situations: Typos in panel names; using a panel name from a different lazygit version (tabs gained/renamed across releases); copy-pasting an example config written for a newer or older release.

Related errors


AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15). Data as JSON: /api/errors/8ac95a3357324989. Report an issue: GitHub.