{"record":{"id":"6d863b2c68366eca","repo":"wagoodman/dive","slug":"controller-unable-to-switch-to-next-pane-w","errorCode":null,"errorMessage":"controller unable to switch to next pane: %w","messagePattern":"controller unable to switch to next pane: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dive/cli/internal/ui/v1/app/controller.go","lineNumber":171,"sourceCode":"//nolint:dupl\nfunc (c *controller) NextPane() (err error) {\n\tv := c.gui.CurrentView()\n\tif v == nil {\n\t\tpanic(\"CurrentView is nil\")\n\t}\n\tif v.Name() == c.views.Layer.Name() {\n\t\t_, err = c.gui.SetCurrentView(c.views.LayerDetails.Name())\n\t\tc.views.Status.SetCurrentView(c.views.LayerDetails)\n\t} else if v.Name() == c.views.LayerDetails.Name() {\n\t\t_, err = c.gui.SetCurrentView(c.views.ImageDetails.Name())\n\t\tc.views.Status.SetCurrentView(c.views.ImageDetails)\n\t} else if v.Name() == c.views.ImageDetails.Name() {\n\t\t_, err = c.gui.SetCurrentView(c.views.Layer.Name())\n\t\tc.views.Status.SetCurrentView(c.views.Layer)\n\t}\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"controller unable to switch to next pane: %w\", err)\n\t}\n\n\treturn c.UpdateAndRender()\n}\n\n//nolint:dupl\nfunc (c *controller) PrevPane() (err error) {\n\tv := c.gui.CurrentView()\n\tif v == nil {\n\t\tpanic(\"Current view is nil\")\n\t}\n\tif v.Name() == c.views.Layer.Name() {\n\t\t_, err = c.gui.SetCurrentView(c.views.ImageDetails.Name())\n\t\tc.views.Status.SetCurrentView(c.views.ImageDetails)\n\t} else if v.Name() == c.views.LayerDetails.Name() {\n\t\t_, err = c.gui.SetCurrentView(c.views.Layer.Name())\n\t\tc.views.Status.SetCurrentView(c.views.Layer)\n\t} else if v.Name() == c.views.ImageDetails.Name() {","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/controller.go#L153-L189","documentation":"TUI controller error wrapping a failure of gocui's SetCurrentView() during NextPane() focus cycling (Layer -> LayerDetails -> ImageDetails -> Layer). SetCurrentView errors when the target view name does not exist or is not yet managed by the gui.","triggerScenarios":"Pressing the next-pane keybinding before the initial layout has registered all three views, or after a layout change dropped a view; can also fire if view names get out of sync with what gocui has created.","commonSituations":"Rapid keypresses during application startup; extreme terminal resizes tearing down views; custom builds where a view was renamed but the pane-cycle code was not updated.","solutions":["Wait for the UI to fully draw before pressing pane-switch keys.","Avoid resizing the terminal to degenerate sizes while the TUI is open.","Update to the latest dive; pane initialization ordering has been hardened across releases.","If it persists, capture the wrapped gocui error and file an upstream issue with terminal info."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Wait for the initial layout to finish before pressing pane-switch keys.","Avoid extreme terminal resizes while the TUI runs.","Reproduce and report startup-race pane errors upstream."],"tags":["dive","tui","gocui","navigation","internal"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}