{"record":{"id":"8d2193ea9eb5cce4","repo":"wagoodman/dive","slug":"unable-to-setup-image-details-controller-onlayoutc","errorCode":null,"errorMessage":"unable to setup image details controller onLayoutChange: %w","messagePattern":"unable to setup image details controller onLayoutChange: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dive/cli/internal/ui/v1/layout/compound/layer_details_column.go","lineNumber":44,"sourceCode":"func (cl *LayerDetailsCompoundLayout) Name() string {\n\treturn \"layer-details-compound-column\"\n}\n\n// OnLayoutChange is called whenever the screen dimensions are changed\nfunc (cl *LayerDetailsCompoundLayout) OnLayoutChange() error {\n\terr := cl.layer.OnLayoutChange()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to setup layer controller onLayoutChange: %w\", err)\n\t}\n\n\terr = cl.layerDetails.OnLayoutChange()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to setup layer details controller onLayoutChange: %w\", err)\n\t}\n\n\terr = cl.imageDetails.OnLayoutChange()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to setup image details controller onLayoutChange: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc (cl *LayerDetailsCompoundLayout) layoutRow(g *gocui.Gui, minX, minY, maxX, maxY int, viewName string, setup func(*gocui.View, *gocui.View) error) error {\n\tlog.WithFields(\"ui\", cl.Name()).Tracef(\"layoutRow(g, minX: %d, minY: %d, maxX: %d, maxY: %d, viewName: %s, <setup func>)\", minX, minY, maxX, maxY, viewName)\n\t// header + border\n\theaderHeight := 2\n\n\t// TODO: investigate overlap\n\t// note: maxY needs to account for the (invisible) border, thus a +1\n\theaderView, headerErr := g.SetView(viewName+\"Header\", minX, minY, maxX, minY+headerHeight+1, 0)\n\n\t// we are going to overlap the view over the (invisible) border (so minY will be one less than expected)\n\tbodyView, bodyErr := g.SetView(viewName, minX, minY+headerHeight, maxX, maxY, 0)\n\n\tif utils.IsNewView(bodyErr, headerErr) {\n\t\terr := setup(bodyView, headerView)","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/compound/layer_details_column.go#L26-L62","documentation":"Third and final child propagation in LayerDetailsCompoundLayout.OnLayoutChange(): the image-details view failed to relayout after a screen-dimension change. Same pattern as 36/37; which of the three fires depends on which pane's relayout hits the problem first.","triggerScenarios":"Terminal resize triggering image-details pane relayout failure — degenerate computed dimensions or a gocui error while adjusting the view.","commonSituations":"Minimizing/restoring terminal windows; resizing to near-zero; running inside CI terminals without TTY capabilities.","solutions":["Resize to a standard terminal geometry and retry.","Run dive interactively only in real TTYs; use --json elsewhere.","Keep terminal emulator and dive current to benefit from layout hardening.","File an upstream issue with the resize sequence that triggers it."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep terminal geometry stable; avoid minimize/restore mid-session.","Use non-interactive modes for CI and scripting.","Report reproducible resize failures with the full error chain."],"tags":["dive","tui","gocui","layout","resize","internal"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}