wagoodman/dive · error

controller failed render: %w

Error message

controller failed render: %w

What it means

Internal TUI error from the v1 UI controller: UpdateAndRender() calls Render() after a successful Update(), and this wraps any failure while flushing view state to the screen. It is raised when a visible view's Render() method (filetree, details, status bar) returns an error.

Source

Thrown at cmd/dive/cli/internal/ui/v1/app/controller.go:123

	if c.views.Layer.CompareMode() == viewmodel.CompareAllLayers {
		c.views.Tree.SetTitle("Aggregated Layer Contents")
	} else {
		c.views.Tree.SetTitle("Current Layer Contents")
	}

	// update details and filetree panes
	return c.UpdateAndRender()
}

func (c *controller) UpdateAndRender() error {
	err := c.Update()
	if err != nil {
		return fmt.Errorf("controller failed update: %w", err)
	}

	err = c.Render()
	if err != nil {
		return fmt.Errorf("controller failed render: %w", err)
	}

	return nil
}

// Update refreshes the state objects for future rendering.
func (c *controller) Update() error {
	for _, v := range c.views.Renderers() {
		err := v.Update()
		if err != nil {
			return fmt.Errorf("controller unable to update view: %w", err)
		}
	}
	return nil
}

// Render flushes the state objects to the screen.
func (c *controller) Render() error {

View on GitHub (pinned to d6c691947f)

Solutions

  1. Read the inner error returned by the failing view's Render() to find the pane at fault.
  2. Enlarge the terminal (at least ~80x20) and re-run.
  3. Use --json output mode instead of the TUI if the environment cannot host an interactive terminal.
  4. If reproducible with a specific image, file an upstream issue with the image reference.
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: A visible view failing during screen flush: filetree rendering with a node whose data is inconsistent, or a gocui view writing outside its bounds after an abrupt resize. Only views where IsVisible() is true are rendered, so it depends on the current screen state.

Common situations: Tiny terminal windows where panes have zero usable area; terminal emulators sending resize events mid-keypress; images with pathologically deep filetrees overflowing buffers.

Related errors


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