Skip to content

[BUG] Crash after approving PR #916

Description

@bodograumann

Describe the bug
gh-dash crashed when submitting an PR-approval.
The comment and approval where actually successfully submitted, but it seems afterwards dash crashed.

To Reproduce
Steps to reproduce the behavior:

  1. Select PR in notfiication
  2. Press enter to open in sidebar
  3. Press 'v' to start approval
  4. Press 'Ctrl-d' to approve with default message

Expected behavior
PR should be approved and dash should close the approval screen.

Screenshots
If applicable, add screenshots to help explain your problem.

> gh dash
Caught panic:

runtime error: index out of range [0] with length 0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.25.9/x64/src/runtime/debug/stack.go:26 +0x5e
charm.land/bubbletea/v2.(*Program).recoverFromPanic(0xc000272000, {0xda8da0, 0xc001478000})
	/home/runner/go/pkg/mod/charm.land/bubbletea/v2@v2.0.2/tea.go:1260 +0x152
charm.land/bubbletea/v2.(*Program).Run.func2()
	/home/runner/go/pkg/mod/charm.land/bubbletea/v2@v2.0.2/tea.go:1011 +0xe6
panic({0xda8da0?, 0xc001478000?})
	/opt/hostedtoolcache/go/1.25.9/x64/src/runtime/panic.go:783 +0x132
github.com/dlvhdr/gh-dash/v4/internal/tui.(*Model).updateSection(0xc00252e008, 0x0, {0xe0026d?, 0xe?}, {0xdbd600, 0xc0000a6000})
	/home/runner/go/pkg/mod/github.com/dlvhdr/gh-dash/v4@v4.24.1/internal/tui/ui.go:1067 +0x5ad
github.com/dlvhdr/gh-dash/v4/internal/tui.Model.Update({0x1971180, {0x1, {0xc0004d6000, 0x26be}, {0x54, 0x64, {{...}, {...}, {...}, {...}, ...}, ...}, ...}, ...}, ...)
	/home/runner/go/pkg/mod/github.com/dlvhdr/gh-dash/v4@v4.24.1/internal/tui/ui.go:708 +0x1e3b
charm.land/bubbletea/v2.(*Program).eventLoop(0xc000272000, {0x12dae80?, 0xc000378008?}, 0xc0002ac2a0)
	/home/runner/go/pkg/mod/charm.land/bubbletea/v2@v2.0.2/tea.go:853 +0x14cd
charm.land/bubbletea/v2.(*Program).Run(0xc000272000)
	/home/runner/go/pkg/mod/charm.land/bubbletea/v2@v2.0.2/tea.go:1125 +0xa90
github.com/dlvhdr/gh-dash/v4/cmd.init.0.func1(0xc000124500?, {0x1999280, 0x0, 0xe01a89?})
	/home/runner/go/pkg/mod/github.com/dlvhdr/gh-dash/v4@v4.24.1/cmd/root.go:252 +0x3d3
github.com/spf13/cobra.(*Command).execute(0x19448e0, {0xc000022080, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1019 +0xae7
github.com/spf13/cobra.(*Command).ExecuteC(0x19448e0)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1071
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1064
github.com/charmbracelet/fang.Execute({0x12dc1f8, 0x1999280}, 0x19448e0, {0xc0005fdee8, 0x4, 0xc0005fdf40?})
	/home/runner/go/pkg/mod/github.com/charmbracelet/fang@v1.0.0/fang.go:173 +0x392
github.com/dlvhdr/gh-dash/v4/cmd.Execute()
	/home/runner/go/pkg/mod/github.com/dlvhdr/gh-dash/v4@v4.24.1/cmd/root.go:89 +0xa9
main.main()
	/home/runner/go/pkg/mod/github.com/dlvhdr/gh-dash/v4@v4.24.1/gh-dash.go:8 +0xf

program was killed: program experienced a panic
2026/06/18 09:39:29 FATA fatal error during run err="program was killed: program experienced a panic"

Desktop (please complete the following information):

  • OS: Arch Linux 7.0.12-arch1-1
  • Terminal Emulator: alacritty
  • Using tmux: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions