55 "fmt"
66 "os"
77 "runtime"
8+ "strings"
89 "sync"
910 "testing"
1011 "time"
@@ -110,6 +111,17 @@ func TestMenuItemTitleTransition(t *testing.T) {
110111 // This simulates what addPRSection does when building menu items
111112 for _ , pr := range app .incoming {
112113 title := fmt .Sprintf ("%s #%d" , pr .Repository , pr .Number )
114+
115+ // Add action code if present, or test state as fallback
116+ if pr .ActionKind != "" {
117+ // Replace underscores with spaces for better readability
118+ actionDisplay := strings .ReplaceAll (pr .ActionKind , "_" , " " )
119+ title = fmt .Sprintf ("%s — %s" , title , actionDisplay )
120+ } else if pr .TestState == "running" {
121+ // Show "tests running" as a fallback when no specific action is available
122+ title = fmt .Sprintf ("%s — tests running" , title )
123+ }
124+
113125 if pr .NeedsReview {
114126 if ! pr .FirstBlockedAt .IsZero () && time .Since (pr .FirstBlockedAt ) < testBlockDuration {
115127 title = fmt .Sprintf ("🪿 %s" , title )
@@ -122,6 +134,17 @@ func TestMenuItemTitleTransition(t *testing.T) {
122134
123135 for _ , pr := range app .outgoing {
124136 title := fmt .Sprintf ("%s #%d" , pr .Repository , pr .Number )
137+
138+ // Add action code if present, or test state as fallback
139+ if pr .ActionKind != "" {
140+ // Replace underscores with spaces for better readability
141+ actionDisplay := strings .ReplaceAll (pr .ActionKind , "_" , " " )
142+ title = fmt .Sprintf ("%s — %s" , title , actionDisplay )
143+ } else if pr .TestState == "running" {
144+ // Show "tests running" as a fallback when no specific action is available
145+ title = fmt .Sprintf ("%s — tests running" , title )
146+ }
147+
125148 if pr .IsBlocked {
126149 if ! pr .FirstBlockedAt .IsZero () && time .Since (pr .FirstBlockedAt ) < testBlockDuration {
127150 title = fmt .Sprintf ("🎉 %s" , title )
0 commit comments