wagoodman/dive · warning

unable to setup status controller: %w

Error message

unable to setup status controller: %w

What it means

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.

Source

Thrown at cmd/dive/cli/internal/ui/v1/view/status.go:123

}

// KeyHelp indicates all the possible global actions a user can take when any pane is selected.
func (v *Status) KeyHelp() string {
	var help string
	for _, binding := range v.helpKeys {
		help += binding.RenderKeyHelp()
	}
	return help
}

func (v *Status) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error {
	v.logger.Tracef("layout(minX: %d, minY: %d, maxX: %d, maxY: %d)", minX, minY, maxX, maxY)

	view, viewErr := g.SetView(v.Name(), minX, minY, maxX, maxY, 0)
	if utils.IsNewView(viewErr) {
		err := v.Setup(view)
		if err != nil {
			return fmt.Errorf("unable to setup status controller: %w", err)
		}
	}
	return nil
}

func (v *Status) RequestedSize(available int) *int {
	return &v.requestedHeight
}

View on GitHub (pinned to d6c691947f)

Solutions

  1. If running stock dive, this indicates a bug — capture the wrapped error and report upstream
  2. In forks, audit Status.Setup/Render changes for fallible calls
  3. Ensure the terminal is at least a couple of rows tall so the status view geometry is valid
  4. Verify no code deletes the status view mid-layout
Defensive patterns

Strategy: try-catch

Try / catch

if err := v.Setup(view); err != nil {
    return fmt.Errorf("unable to setup status controller: %w", err)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15). Data as JSON: /api/errors/e64391485f339394. Report an issue: GitHub.