{"record":{"id":"d4d6780727a93d4f","repo":"wagoodman/dive","slug":"unable-to-toggle-filter-visibility-w","errorCode":null,"errorMessage":"unable to toggle filter visibility: %w","messagePattern":"unable to toggle filter visibility: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dive/cli/internal/ui/v1/app/controller.go","lineNumber":232,"sourceCode":"\t}\n\n\treturn c.UpdateAndRender()\n}\n\nfunc (c *controller) CloseFilterView() error {\n\t// filter view needs to be visible\n\tif c.views.Filter.IsVisible() {\n\t\t// toggle filter view\n\t\treturn c.ToggleFilterView()\n\t}\n\treturn nil\n}\n\nfunc (c *controller) ToggleFilterView() error {\n\t// delete all user input from the tree view\n\terr := c.views.Filter.ToggleVisible()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to toggle filter visibility: %w\", err)\n\t}\n\n\t// we have just hidden the filter view...\n\tif !c.views.Filter.IsVisible() {\n\t\t// ...remove any filter from the tree\n\t\tc.views.Tree.SetFilterRegex(nil)\n\n\t\t// ...adjust focus to a valid (visible) view\n\t\terr = c.ToggleView()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to toggle filter view (back): %w\", err)\n\t\t}\n\t}\n\n\treturn c.UpdateAndRender()\n}\n","sourceCodeStart":214,"sourceCodeEnd":249,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/controller.go#L214-L249","documentation":"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.","triggerScenarios":"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.","commonSituations":"Opening/closing the filter rapidly; toggling the filter before initial layout completes; tiny terminal windows where the filter line cannot be displayed.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Open the filter only after the UI is stable.","Avoid rapid repeated filter toggles.","Use a terminal large enough for the filter input line."],"tags":["dive","tui","gocui","filter","internal"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}