Specifications
[x] Operating System: NixOS 26.11 (Zokor)
[x] Desktop Environment: KDE Plasma 6.7.3
[x] Terminal Emulator: ghostty 1.3.1
[ ] Tmux
[x] Shell: fish 4.8.0
[x] Software Version: 4.25.2
[x] goos: linux
[x] goarch: amd64
Description
Consistent runtime error when making a comment and the cursor moves in-between two boundary runes
BOUNDARY (ends a word) : ␣ \t \n \r , . ! ? ; : ( ) [ ] { } < > " ' `
Steps to reproduce
- Navigate to issue and comment with
c
- Type 2 of any boundary runes
- Press <- (left arrow to move cursor in-between runes)
- Observe crash
Expected behavior
gh-dash just moves the cursor back without crashing
Screenshots
When cursor moves in-between the two spaces in "Hello "
Logs
Output of gh-dash --version
▜▔▚▐▔▌▚▔▐ ▌
▟▁▞▐▔▌▁▚▐▔▌
gh-dash version 4.25.2
goos: linux
goarch: amd64
Output of panic
Caught panic:
runtime error: slice bounds out of range [2:1]
Restoring terminal...
goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x5e
charm.land/bubbletea/v2.(*Program).recoverFromPanic(0x2bb9dc7045a0, {0xe8f460, 0x2bb9dd26e3f0})
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({0xe8f460?, 0x2bb9dd26e3f0?})
runtime/panic.go:860 +0x13a
github.com/dlvhdr/gh-dash/v4/internal/tui/components/fuzzyselect.(*UserMentionSource).ExtractContext(0x2bb9dc6e2090, {0x2bb9dc405ae8?, 0x2bb9dc425d70?}, {0x0?, 0x0?})
github.com/dlvhdr/gh-dash/v4/internal/tui/components/fuzzyselect/mentions.go:67 +0x385
github.com/dlvhdr/gh-dash/v4/internal/tui/components/inputbox.Model.CurrentAutocompleteContext({0x2bb9dc7a8000, 0x2bb9dccfa008, 0x0, {0x0, {0xef6eca, 0x5}, {0xef08e2, 0x4}, {0xeef39c, 0x3}, ...}, ...})
github.com/dlvhdr/gh-dash/v4/internal/tui/components/inputbox/inputbox.go:133 +0x165
github.com/dlvhdr/gh-dash/v4/internal/tui/components/inputbox.Model.Update({0x2bb9dc7a8000, 0x2bb9dccfa008, 0x0, {0x0, {0xef6eca, 0x5}, {0xef08e2, 0x4}, {0xeef39c, 0x3}, ...}, ...}, ...)
github.com/dlvhdr/gh-dash/v4/internal/tui/components/inputbox/inputbox.go:197 +0xb66
github.com/dlvhdr/gh-dash/v4/internal/tui/components/cmpcontroller.(*Controller).Update(0x2bb9dd694200, {0xea6100?, 0x2bb9dc46d830})
github.com/dlvhdr/gh-dash/v4/internal/tui/components/cmpcontroller/controller.go:262 +0x885
github.com/dlvhdr/gh-dash/v4/internal/tui/components/issueview.Model.Update({0x2bb9dc7a8000, 0x2bb9dc5a02c0, 0x1, 0x31, {0x2bb9dc7a8000, {0x2bb9dc7a8000,
github.com/dlvhdr/gh-dash/v4/internal/tui/components/issueview/issueview.go:53 +0x55
github.com/dlvhdr/gh-dash/v4/internal/tui.Model.Update({0x1b0a880, {0x1, {0x2bb9dd1e0000, 0x2bf1}, {0x31, 0x19, {{...}, {...}, {...}, {...}, ...}, ...}, ...}, ...}, ...)
github.com/dlvhdr/gh-dash/v4/internal/tui/ui.go:211 +0x3b07
charm.land/bubbletea/v2.(*Program).eventLoop(0x2bb9dc7045a0, {0x11ac6b0?, 0x2bb9dc834008?}, 0x2bb9dc20a7e0)
charm.land/bubbletea/v2@v2.0.2/tea.go:853 +0xe46
charm.land/bubbletea/v2.(*Program).Run(0x2bb9dc7045a0)
charm.land/bubbletea/v2@v2.0.2/tea.go:1125 +0xab0
github.com/dlvhdr/gh-dash/v4/cmd.init.0.func1(0x2bb9dc68e500?, {0x1b32a20?, 0x7?, 0xef02fa?})
github.com/dlvhdr/gh-dash/v4/cmd/root.go:261 +0x793
github.com/spf13/cobra.(*Command).execute(0x1ade1c0, {0x2bb9dc1e60b0, 0x0, 0x0})
github.com/spf13/cobra@v1.10.2/command.go:1019 +0xafb
github.com/spf13/cobra.(*Command).ExecuteC(0x1ade1c0)
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({0x11ae078, 0x1b32a20}, 0x1ade1c0, {0x2bb9dc861ed0, 0x4, 0x2bb9dc2a0088?})
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/22 12:36:17 FATA fatal error during run err="program was killed: program experienced a panic"
Similar Issue
This bug seems similar to #936 but presents with a different runtime error and i believe is caused by a different mechanism
Specifications
[x] Operating System: NixOS 26.11 (Zokor)
[x] Desktop Environment: KDE Plasma 6.7.3
[x] Terminal Emulator: ghostty 1.3.1
[ ] Tmux
[x] Shell: fish 4.8.0
[x] Software Version: 4.25.2
[x] goos: linux
[x] goarch: amd64
Description
Consistent runtime error when making a comment and the cursor moves in-between two boundary runes
BOUNDARY (ends a word) : ␣ \t \n \r , . ! ? ; : ( ) [ ] { } < > " ' `
Steps to reproduce
cExpected behavior
gh-dash just moves the cursor back without crashing
Screenshots
When cursor moves in-between the two spaces in "Hello "
Logs
Output of
gh-dash --versionOutput of panic
Similar Issue
This bug seems similar to #936 but presents with a different runtime error and i believe is caused by a different mechanism