{"record":{"id":"e289c0f0884e99b3","repo":"jesseduffield/lazygit","slug":"gui-sidepanels-s-is-listed-more-than-once-eac","errorCode":null,"errorMessage":"gui.sidePanels: '%s' is listed more than once; each side panel may appear only once.","messagePattern":"gui\\.sidePanels: '(.+?)' is listed more than once; each side panel may appear only once\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/user_config_validation.go","lineNumber":80,"sourceCode":"\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc validateSidePanels(panels []SidePanel) error {\n\tseen := map[string]bool{}\n\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}","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/config/user_config_validation.go#L62-L98","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove the duplicate occurrence so each tab name appears exactly once across all gui.sidePanels entries.","If you wanted the panel elsewhere, move (not copy) the name to the other panel entry.","Re-run lazygit to confirm validation passes."],"exampleFix":"# before\ngui:\n  sidePanels:\n    - [files, commits]\n    - [commits, worktree]\n\n# after\ngui:\n  sidePanels:\n    - [files, commits]\n    - [worktree]","handlingStrategy":"validation","validationCode":"seen := map[string]bool{}\nfor _, panel := range cfg.Gui.SidePanels {\n\tfor _, name := range panel {\n\t\tif seen[name] {\n\t\t\treturn fmt.Errorf(\"side panel %s listed twice\", name)\n\t\t}\n\t\tseen[name] = true\n\t}\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember gui.sidePanels is a partition: each tab lives in exactly one panel.","Move entries between panels rather than duplicating them."],"tags":["config","gui","side-panels","duplicate"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}