wagoodman/dive · error
unable to setup layer details controller onLayoutChange: %w
Error message
unable to setup layer details controller onLayoutChange: %w
What it means
Same propagation point as errors 36/38 but for the second child: the layer-details view's OnLayoutChange() failed while the compound layout reacted to a screen-dimension change. Identical failure surface, different pane (the per-layer details text pane).
Source
Thrown at cmd/dive/cli/internal/ui/v1/layout/compound/layer_details_column.go:39
layerDetails: layerDetails,
imageDetails: imageDetails,
}
}
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)
View on GitHub (pinned to d6c691947f)
Solutions
- Restore a normal terminal size and retry.
- Ensure the hosting terminal/pane has enough rows for the three stacked detail views.
- Prefer non-interactive output modes in automation contexts.
- Report persistent reproductions upstream with terminal details.
Defensive patterns
Strategy: fallback
Prevention
- Avoid shrinking terminals below the detail panes' minimum size.
- Prefer full-window or fixed-size tmux panes for long dive sessions.
- Capture wrapped errors when reporting layout failures.
When it happens
Trigger: Terminal resize causing the layer-details pane relayout to fail, e.g. the pane computes a negative or zero size, or gocui view adjustment errors.
Common situations: Aggressive terminal shrinking; splits/tmux panes smaller than the pane's minimum; resizing during initial draw.
Related errors
- unable to setup layer controller onLayoutChange: %w
- unable to setup image 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/ac78f6d86e2fd9ac.
Report an issue: GitHub.