Skip to content

[BUG] Crash on issue comment post #936

Description

@fuguesoft

Specifications

[x] Operating System: NixOS 26.05
[x] Desktop Environment: niriWM
[x] Tmux: 3.7b
[x] Terminal Emulator: foot
[x] Shell: fish 4.8.0
[x] Software Version: 4.24.0
[x] goos: linux
[x] goarch: amd64

Description

Getting frequent crashes when commenting on issues

Steps to reproduce

  1. Navigate to issue and comment with c
  2. Type message 3+ lines in length
  3. Send with ctrl+d
  4. Observe crash
  5. Reopen gh-dash and observe that the comment posted

Expected behavior

gh-dash posts the comment without crashing

Screenshots

Logs

Output of gh-dash --version

▜▔▚▐▔▌▚▔▐ ▌
▟▁▞▐▔▌▁▚▐▔▌

gh-dash version 4.25.0
goos: linux
goarch: amd64

Crash log:

Details
2026/07/13 21:32:48 ERRO error while determining git and github repos
  err=
  │ failed to run git: fatal: no es un repositorio git (ni ninguno de los directorios superiores): .git
  │ . error: exit status 128
2026/07/13 21:32:48 INFO found git repo at path path=/home/fugue/dev/bash/bash-w-dave-eddy/ch03
2026/07/13 21:32:48 WARN did not find github repo at current path
Caught panic:

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

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:26 +0x5e
charm.land/bubbletea/v2.(*Program).recoverFromPanic(0x2be51a504b40, {0xe90460, 0x2be51adf2000})
        charm.land/bubbletea/v2@v2.0.2/tea.go:1260 +0x151
charm.land/bubbletea/v2.(*Program).Run.func2()
        charm.land/bubbletea/v2@v2.0.2/tea.go:1011 +0x10c
panic({0xe90460?, 0x2be51adf2000?})
        runtime/panic.go:860 +0x13a
github.com/dlvhdr/gh-dash/v4/internal/tui.(*Model).updateSection(0x2be51aaf4008, 0x0, {0xef7ed4?, 0x11?}, {0xe986e0, 0x2be51aed8060?})
        github.com/dlvhdr/gh-dash/v4/internal/tui/ui.go:1106 +0x499
github.com/dlvhdr/gh-dash/v4/internal/tui.Model.Update({0x1b0d880, {0x1, {0x2be51ad34000, 0x88cc}, {0x4a, 0x4c, {{...}, {...}, {...}, {...}, ...}, ...}, ...}, ...}, ...
)
        github.com/dlvhdr/gh-dash/v4/internal/tui/ui.go:732 +0x2219
charm.land/bubbletea/v2.(*Program).eventLoop(0x2be51a504b40, {0x11ad6d0?, 0x2be51a16c008?}, 0x2be51a1441c0)
        charm.land/bubbletea/v2@v2.0.2/tea.go:853 +0xe46
charm.land/bubbletea/v2.(*Program).Run(0x2be51a504b40)
        charm.land/bubbletea/v2@v2.0.2/tea.go:1125 +0xab0
github.com/dlvhdr/gh-dash/v4/cmd.init.0.func1(0x2be519ff6300?, {0x1b35a20?, 0x7?, 0xef12fe?})
        github.com/dlvhdr/gh-dash/v4/cmd/root.go:278 +0x693
github.com/spf13/cobra.(*Command).execute(0x1ae11c0, {0x2be51a0300b0, 0x0, 0x0})
        github.com/spf13/cobra@v1.10.2/command.go:1019 +0xafb
github.com/spf13/cobra.(*Command).ExecuteC(0x1ae11c0)
        github.com/spf13/cobra@v1.10.2/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.10.2/command.go:1071
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        github.com/spf13/cobra@v1.10.2/command.go:1064
github.com/charmbracelet/fang.Execute({0x11af098, 0x1b35a20}, 0x1ae11c0, {0x2be51a5f1ed0, 0x4, 0x2be51a0cc888?})
        github.com/charmbracelet/fang@v1.0.0/fang.go:173 +0x3a5
github.com/dlvhdr/gh-dash/v4/cmd.Execute()
        github.com/dlvhdr/gh-dash/v4/cmd/root.go:92 +0xa9
main.main()
        github.com/dlvhdr/gh-dash/v4/gh-dash.go:25 +0x36

program was killed: program experienced a panic
2026/07/13 21:34:57 FATA fatal error during run err="program was killed: program experienced a panic"

Config/Environment

confirmQuit: true
defaults:
  view: notifications
includeReadNotifications: false
smartFilteringAtLaunch: false

Thanks

Thanks for reading! ❤️

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