Skip to content

Fix UI crash on teardown#50

Merged
monorkin merged 2 commits intomainfrom
fix-ui-crash-on-teardown
Apr 13, 2026
Merged

Fix UI crash on teardown#50
monorkin merged 2 commits intomainfrom
fix-ui-crash-on-teardown

Conversation

@monorkin
Copy link
Copy Markdown
Contributor

@monorkin monorkin commented Apr 13, 2026

When the UI is open in one terminal, and teardown is triggered from another, the UI panics and crashes. This is due to the ScrollToSelection function which resolves the current Panel to nil and then tries to call Height on it.

Fixes: #49

Copilot AI review requested due to automatic review settings April 13, 2026 08:09
When the UI is open in one terminal, and teardown is triggered from another, the UI panics and crashes. This is due to the ScrollToSelection function which resolves the current Panel to nil and then tries to call Height on it.

Fixes: #49
@monorkin monorkin force-pushed the fix-ui-crash-on-teardown branch from 0b13eab to c640ed5 Compare April 13, 2026 08:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a TUI panic when once teardown is triggered in another shell by preventing scrollToSelection() from indexing into an empty panels slice (reported in #49).

Changes:

  • Add an early return in Dashboard.scrollToSelection() when there are no panels, avoiding an out-of-range access.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/ui/dashboard.go
@monorkin monorkin merged commit 2535c39 into main Apr 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ONCE TUI panics if I run once teardown in another shell

2 participants