wagoodman/dive · error
unable to toggle filter visibility: %w
Error message
unable to toggle filter visibility: %w
What it means
TUI controller error from ToggleFilterView(): the filter view's ToggleVisible() failed. This is a view-level operation on the filter input box; the wrap identifies that the error happened toggling visibility itself, not in the follow-up focus/regex logic.
Source
Thrown at cmd/dive/cli/internal/ui/v1/app/controller.go:232
}
return c.UpdateAndRender()
}
func (c *controller) CloseFilterView() error {
// filter view needs to be visible
if c.views.Filter.IsVisible() {
// toggle filter view
return c.ToggleFilterView()
}
return nil
}
func (c *controller) ToggleFilterView() error {
// delete all user input from the tree view
err := c.views.Filter.ToggleVisible()
if err != nil {
return fmt.Errorf("unable to toggle filter visibility: %w", err)
}
// we have just hidden the filter view...
if !c.views.Filter.IsVisible() {
// ...remove any filter from the tree
c.views.Tree.SetFilterRegex(nil)
// ...adjust focus to a valid (visible) view
err = c.ToggleView()
if err != nil {
return fmt.Errorf("unable to toggle filter view (back): %w", err)
}
}
return c.UpdateAndRender()
}
View on GitHub (pinned to d6c691947f)
Solutions
- Check the wrapped inner error for the gocui cause.
- Re-run in a larger terminal and toggle the filter once the UI is stable.
- Avoid rapid repeated presses of the filter key.
- Report upstream with terminal type/size if it reproduces.
Defensive patterns
Strategy: fallback
Prevention
- Open the filter only after the UI is stable.
- Avoid rapid repeated filter toggles.
- Use a terminal large enough for the filter input line.
When it happens
Trigger: Pressing the filter keybinding (default '/') when the filter view object fails its visibility toggle — typically an internal gocui error on the filter view such as missing view creation after a resize.
Common situations: Opening/closing the filter rapidly; toggling the filter before initial layout completes; tiny terminal windows where the filter line cannot be displayed.
Related errors
- unable to toggle filter view (back): %w
- controller failed update: %w
- controller failed render: %w
- controller unable to update view: %w
- controller unable to switch to next pane: %w
AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15).
Data as JSON: /api/errors/d4d6780727a93d4f.
Report an issue: GitHub.