{"record":{"id":"e64391485f339394","repo":"wagoodman/dive","slug":"unable-to-setup-status-controller-w","errorCode":null,"errorMessage":"unable to setup status controller: %w","messagePattern":"unable to setup status controller: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/dive/cli/internal/ui/v1/view/status.go","lineNumber":123,"sourceCode":"}\n\n// KeyHelp indicates all the possible global actions a user can take when any pane is selected.\nfunc (v *Status) KeyHelp() string {\n\tvar help string\n\tfor _, binding := range v.helpKeys {\n\t\thelp += binding.RenderKeyHelp()\n\t}\n\treturn help\n}\n\nfunc (v *Status) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error {\n\tv.logger.Tracef(\"layout(minX: %d, minY: %d, maxX: %d, maxY: %d)\", minX, minY, maxX, maxY)\n\n\tview, viewErr := g.SetView(v.Name(), minX, minY, maxX, maxY, 0)\n\tif utils.IsNewView(viewErr) {\n\t\terr := v.Setup(view)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to setup status controller: %w\", err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (v *Status) RequestedSize(available int) *int {\n\treturn &v.requestedHeight\n}\n","sourceCodeStart":105,"sourceCodeEnd":132,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/status.go#L105-L132","documentation":"Raised in the status footer view's Layout when Status.Setup fails on first-time creation of the 'status' view. Setup sets Frame=false and calls Render(); in stock dive Render's outer function returns nil, so this wrap is defensive and effectively unreachable unless Setup/Render are extended in a fork.","triggerScenarios":"g.SetView succeeding for 'status' but Status.Setup returning non-nil. Current Setup only assigns view options and calls Render (which returns nil), so hitting this requires modified code or a future version where the status render/setup can fail.","commonSituations":"Custom builds adding keybindings or non-swallowed writes to the status view during Setup; very small terminals where the status rectangle is degenerate; forks that changed Render to propagate buffer write errors.","solutions":["If running stock dive, this indicates a bug — capture the wrapped error and report upstream","In forks, audit Status.Setup/Render changes for fallible calls","Ensure the terminal is at least a couple of rows tall so the status view geometry is valid","Verify no code deletes the status view mid-layout"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := v.Setup(view); err != nil {\n    return fmt.Errorf(\"unable to setup status controller: %w\", err)\n}","preventionTips":["In forks, keep status Setup/Render errors non-fatal","Ensure at least one row of height for the status view"],"tags":["ui","gocui","status-bar","defensive"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}