{"record":{"id":"91aa7531447ea4d6","repo":"glanceapp/glance","slug":"page-d-desktop-navigation-width-can-only-be-eith","errorCode":null,"errorMessage":"page %d: desktop-navigation-width can only be either wide or slim","messagePattern":"page (.+?): desktop-navigation-width can only be either wide or slim","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":499,"sourceCode":"\t\tif _, err := os.Stat(config.Server.AssetsPath); os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"assets directory does not exist: %s\", config.Server.AssetsPath)\n\t\t}\n\t}\n\n\tfor i := range config.Pages {\n\t\tpage := &config.Pages[i]\n\n\t\tif page.Title == \"\" {\n\t\t\treturn fmt.Errorf(\"page %d has no name\", i+1)\n\t\t}\n\n\t\tif page.Width != \"\" && (page.Width != \"wide\" && page.Width != \"slim\" && page.Width != \"default\") {\n\t\t\treturn fmt.Errorf(\"page %d: width can only be either wide or slim\", i+1)\n\t\t}\n\n\t\tif page.DesktopNavigationWidth != \"\" {\n\t\t\tif page.DesktopNavigationWidth != \"wide\" && page.DesktopNavigationWidth != \"slim\" && page.DesktopNavigationWidth != \"default\" {\n\t\t\t\treturn fmt.Errorf(\"page %d: desktop-navigation-width can only be either wide or slim\", i+1)\n\t\t\t}\n\t\t}\n\n\t\tif len(page.Columns) == 0 {\n\t\t\treturn fmt.Errorf(\"page %d has no columns\", i+1)\n\t\t}\n\n\t\tif page.Width == \"slim\" {\n\t\t\tif len(page.Columns) > 2 {\n\t\t\t\treturn fmt.Errorf(\"page %d is slim and cannot have more than 2 columns\", i+1)\n\t\t\t}\n\t\t} else {\n\t\t\tif len(page.Columns) > 3 {\n\t\t\t\treturn fmt.Errorf(\"page %d has more than 3 columns\", i+1)\n\t\t\t}\n\t\t}\n\n\t\tcolumnSizesCount := make(map[string]int)","sourceCodeStart":481,"sourceCodeEnd":517,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L481-L517","documentation":"Same constraint as page width, applied to the optional desktop-navigation-width setting: when present it must be wide, slim, or default. The message text says 'wide or slim' but default and empty are also accepted by the code.","triggerScenarios":"Setting pages[N].desktop-navigation-width to any string besides wide/slim/default — e.g. 'medium', 'collapsed', or wrong capitalization.","commonSituations":"Trying to make the sidebar narrower with an invented value; typos; configs ported from themes/forks that support extra widths.","solutions":["Use wide, slim, or default for desktop-navigation-width, or omit it","Verify lowercase spelling","If you wanted a different size, check whether your glance version supports it before upgrading assumptions"],"exampleFix":"# before\n- name: Home\n  desktop-navigation-width: medium\n# after\n- name: Home\n  desktop-navigation-width: slim","handlingStrategy":"type-guard","validationCode":"var navWidths = map[string]bool{\"wide\": true, \"slim\": true, \"default\": true, \"\": true}\nfor i, p := range cfg.Pages {\n    if !navWidths[p.DesktopNavigationWidth] {\n        return fmt.Errorf(\"page %d bad desktop-navigation-width %q\", i+1, p.DesktopNavigationWidth)\n    }\n}","typeGuard":"func isValidNavWidth(w string) bool {\n    return w == \"wide\" || w == \"slim\" || w == \"default\" || w == \"\"\n}","tryCatchPattern":null,"preventionTips":["Keep width enums centralized in tooling that generates config","Test configs against the latest schema before rollout"],"tags":["glance","configuration","validation"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}