jesseduffield/lazygit · error

gui.sidePanels: '%s' must be included; it can't be hidden.

Error message

gui.sidePanels: '%s' must be included; it can't be hidden.

What it means

Raised by validateSidePanels in pkg/config/user_config_validation.go. After collecting all listed tabs, the validator requires that 'files', 'branches' and 'commits' are present, because much of the controller code focuses these panels directly (conflict resolution, stash popping) and would break if they were hidden.

Source

Thrown at pkg/config/user_config_validation.go:94

				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)
		}
	}
	return nil
}

func validateSpinner(spinner SpinnerConfig) error {
	if len(spinner.Frames) == 0 {
		return errors.New("gui.spinner.frames must not be empty.")
	}
	firstWidth := utils.StringWidth(spinner.Frames[0])
	if lo.SomeBy(spinner.Frames, func(frame string) bool {
		return utils.StringWidth(frame) != firstWidth
	}) {
		return errors.New("All gui.spinner.frames entries must have the same width.")
	}
	return nil
}

View on GitHub (pinned to c477a2959b)

Solutions

  1. Add the missing required tab (named in the error) to one of your gui.sidePanels entries.
  2. If you truly want a minimal UI, keep the required tabs in a panel you rarely look at instead of removing them.
  3. Validate the config again by relaunching lazygit.

Example fix

# before
gui:
  sidePanels:
    - [worktree, submodules]

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

Strategy: validation

Validate before calling

required := []string{"files", "branches", "commits"}
for _, r := range required {
	if !seen[r] {
		return fmt.Errorf("side panel %s is required", r)
	}
}

Prevention

When it happens

Trigger: Omitting any of files/branches/commits from every gui.sidePanels entry, e.g. `sidePanels: [[worktree, submodules]]`, then starting lazygit.

Common situations: Users trying to build a minimal layout that hides the files or commits panel; upgrading from a version without sidePanels and hand-writing a partial config.

Related errors


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