{"record":{"id":"07eba59ea67a51b2","repo":"glanceapp/glance","slug":"page-d-must-have-either-1-or-2-full-width-columns","errorCode":null,"errorMessage":"page %d must have either 1 or 2 full width columns","messagePattern":"page (.+?) must have either 1 or 2 full width columns","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":532,"sourceCode":"\t\t\t}\n\t\t}\n\n\t\tcolumnSizesCount := make(map[string]int)\n\n\t\tfor j := range page.Columns {\n\t\t\tcolumn := &page.Columns[j]\n\n\t\t\tif column.Size != \"small\" && column.Size != \"full\" {\n\t\t\t\treturn fmt.Errorf(\"column %d of page %d: size can only be either small or full\", j+1, i+1)\n\t\t\t}\n\n\t\t\tcolumnSizesCount[page.Columns[j].Size]++\n\t\t}\n\n\t\tfull := columnSizesCount[\"full\"]\n\n\t\tif full > 2 || full == 0 {\n\t\t\treturn fmt.Errorf(\"page %d must have either 1 or 2 full width columns\", i+1)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Read-only way to store ordered maps from a YAML structure\ntype orderedYAMLMap[K comparable, V any] struct {\n\tkeys []K\n\tdata map[K]V\n}\n\nfunc newOrderedYAMLMap[K comparable, V any](keys []K, values []V) (*orderedYAMLMap[K, V], error) {\n\tif len(keys) != len(values) {\n\t\treturn nil, fmt.Errorf(\"keys and values must have the same length\")\n\t}\n\n\tom := &orderedYAMLMap[K, V]{","sourceCodeStart":514,"sourceCodeEnd":550,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L514-L550","documentation":"After counting column sizes, the page must contain exactly 1 or 2 columns with size: full. Zero full columns (e.g. all small) or three or more full columns both fail. This mirrors the CSS grid, which is built around full-width column slots.","triggerScenarios":"A page whose columns are all size: small (full count 0), or a page with 3 full columns (e.g. width: wide with three size: full columns). The count comes from columnSizesCount['full'] after per-column validation.","commonSituations":"Marking every column small to squeeze more widgets; wide pages experimenting with three full columns; refactoring sizes and accidentally leaving no full column.","solutions":["If no column is full, change one column (typically the first) to size: full","If three or more are full, downgrade extra full columns to small or remove them"],"exampleFix":"# before\ncolumns:\n  - size: small\n  - size: small\n# after\ncolumns:\n  - size: full\n  - size: small","handlingStrategy":"validation","validationCode":"for i, p := range cfg.Pages {\n    full := 0\n    for _, c := range p.Columns {\n        if c.Size == \"full\" {\n            full++\n        }\n    }\n    if full < 1 || full > 2 {\n        return fmt.Errorf(\"page %d needs 1 or 2 full columns, got %d\", i+1, full)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default new pages to one full column plus small columns","When converting a full column to small, immediately promote another to full"],"tags":["glance","configuration","layout","validation"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}