Jump to status options with their first-letter shortcuts.

o/w/d select OPEN/WIP/DONE in the status menu, with the hotkeys shown inline.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Skruecken
2026-10-19 10:38:28 +02:00
co-authored by Cursor
parent 6527d91b4f
commit aa8f89b43a
4 changed files with 38 additions and 5 deletions
+13 -1
View File
@@ -1,6 +1,9 @@
package ticket
import "time"
import (
"time"
"unicode"
)
// Status represents the workflow state of a ticket.
type Status string
@@ -28,6 +31,15 @@ func (s Status) Label() string {
}
}
// Shortcut returns the status-menu hotkey (first letter of the label).
func (s Status) Shortcut() rune {
label := s.Label()
if label == "" {
return 0
}
return unicode.ToLower([]rune(label)[0])
}
// Index returns the position in AllStatuses, or 0 if unknown.
func (s Status) Index() int {
for i, st := range AllStatuses {