wagoodman/dive · error
unable to setup image details controller onLayoutChange: %w
Error message
unable to setup image details controller onLayoutChange: %w
What it means
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.
Source
Thrown at cmd/dive/cli/internal/ui/v1/layout/compound/layer_details_column.go:44
func (cl *LayerDetailsCompoundLayout) Name() string {
return "layer-details-compound-column"
}
// OnLayoutChange is called whenever the screen dimensions are changed
func (cl *LayerDetailsCompoundLayout) OnLayoutChange() error {
err := cl.layer.OnLayoutChange()
if err != nil {
return fmt.Errorf("unable to setup layer controller onLayoutChange: %w", err)
}
err = cl.layerDetails.OnLayoutChange()
if err != nil {
return fmt.Errorf("unable to setup layer details controller onLayoutChange: %w", err)
}
err = cl.imageDetails.OnLayoutChange()
if err != nil {
return fmt.Errorf("unable to setup image details controller onLayoutChange: %w", err)
}
return nil
}
func (cl *LayerDetailsCompoundLayout) layoutRow(g *gocui.Gui, minX, minY, maxX, maxY int, viewName string, setup func(*gocui.View, *gocui.View) error) error {
log.WithFields("ui", cl.Name()).Tracef("layoutRow(g, minX: %d, minY: %d, maxX: %d, maxY: %d, viewName: %s, <setup func>)", minX, minY, maxX, maxY, viewName)
// header + border
headerHeight := 2
// TODO: investigate overlap
// note: maxY needs to account for the (invisible) border, thus a +1
headerView, headerErr := g.SetView(viewName+"Header", minX, minY, maxX, minY+headerHeight+1, 0)
// we are going to overlap the view over the (invisible) border (so minY will be one less than expected)
bodyView, bodyErr := g.SetView(viewName, minX, minY+headerHeight, maxX, maxY, 0)
if utils.IsNewView(bodyErr, headerErr) {
err := setup(bodyView, headerView)View on GitHub (pinned to d6c691947f)
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.
Defensive patterns
Strategy: fallback
Prevention
- 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.
When it happens
Trigger: Terminal resize triggering image-details pane relayout failure — degenerate computed dimensions or a gocui error while adjusting the view.
Common situations: Minimizing/restoring terminal windows; resizing to near-zero; running inside CI terminals without TTY capabilities.
Related errors
- unable to setup layer controller onLayoutChange: %w
- unable to setup layer details controller onLayoutChange: %w
- unable to setup row layout for %s: %w
- controller failed update: %w
- controller failed render: %w
AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15).
Data as JSON: /api/errors/8d2193ea9eb5cce4.
Report an issue: GitHub.