{"record":{"id":"59ce18185d059d92","repo":"glanceapp/glance","slug":"column-d-of-page-d-size-can-only-be-either-smal","errorCode":null,"errorMessage":"column %d of page %d: size can only be either small or full","messagePattern":"column (.+?) of page (.+?): size can only be either small or full","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":523,"sourceCode":"\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)\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","sourceCodeStart":505,"sourceCodeEnd":541,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L505-L541","documentation":"Every column must have size either small or full; the column at the given position (1-indexed, within the given page) has any other value. Empty size also fails here, so size is effectively required per column.","triggerScenarios":"pages[N].columns[j].size set to something like 'medium', 'half', or omitted entirely (decodes to empty string, which is neither small nor full).","commonSituations":"Assuming a default size exists and omitting the field; guessing undocumented sizes like 'half'; capitalization differences ('Full').","solutions":["Set the column's size to small or full explicitly","Check the column number in the message to find the offending entry fast","Remember there is no default — every column needs an explicit size"],"exampleFix":"# before\ncolumns:\n  - widgets:\n      - type: clock\n# after\ncolumns:\n  - size: full\n    widgets:\n      - type: clock","handlingStrategy":"type-guard","validationCode":"for i, p := range cfg.Pages {\n    for j, c := range p.Columns {\n        if c.Size != \"small\" && c.Size != \"full\" {\n            return fmt.Errorf(\"page %d column %d bad size %q\", i+1, j+1, c.Size)\n        }\n    }\n}","typeGuard":"func isValidColumnSize(s string) bool {\n    return s == \"small\" || s == \"full\"\n}","tryCatchPattern":null,"preventionTips":["Always write an explicit size on every column — there is no default","Use editor snippets that emit 'size: full' automatically"],"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"}