jesseduffield/lazygit · error

gui.sidePanels: '%s' is listed more than once; each side pan

Error message

gui.sidePanels: '%s' is listed more than once; each side panel may appear only once.

What it means

Raised by validateSidePanels in pkg/config/user_config_validation.go. A 'seen' map records every tab name across all side panels; if the same name appears a second time anywhere in gui.sidePanels, the duplicate is rejected because each panel may exist in exactly one place in the layout.

Source

Thrown at pkg/config/user_config_validation.go:80

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

View on GitHub (pinned to c477a2959b)

Solutions

  1. Remove the duplicate occurrence so each tab name appears exactly once across all gui.sidePanels entries.
  2. If you wanted the panel elsewhere, move (not copy) the name to the other panel entry.
  3. Re-run lazygit to confirm validation passes.

Example fix

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

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

Strategy: validation

Validate before calling

seen := map[string]bool{}
for _, panel := range cfg.Gui.SidePanels {
	for _, name := range panel {
		if seen[name] {
			return fmt.Errorf("side panel %s listed twice", name)
		}
		seen[name] = true
	}
}

Prevention

When it happens

Trigger: Listing the same tab in two different side panels, or twice in the same panel, e.g. `sidePanels: [[files, commits], [commits, worktree]]` — the second 'commits' trips the seen[name] check.

Common situations: User wants a panel visible in two columns and duplicates the entry; hand-merging two config fragments while editing; misunderstanding that sidePanels describes a partition, not a set of independent panel lists.

Related errors


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