@@ -220,7 +220,7 @@ func (app *App) setTrayTitle() {
220220
221221// addPRSection adds a section of PRs to the menu.
222222//
223- //nolint:maintidx // Function complexity is inherent to PR menu building logic
223+ //nolint:maintidx,gocognit // Function complexity is inherent to PR menu building logic
224224func (app * App ) addPRSection (ctx context.Context , prs []PR , sectionTitle string , blockedCount int ) {
225225 slog .Debug ("[MENU] addPRSection called" ,
226226 "section" , sectionTitle ,
@@ -237,7 +237,7 @@ func (app *App) addPRSection(ctx context.Context, prs []PR, sectionTitle string,
237237 header := app .systrayInterface .AddMenuItem (headerText , "" )
238238 header .Disable ()
239239
240- // Sort PRs with blocked ones first - inline for simplicity
240+ // Sort PRs with blocked ones first, humans before bots - inline for simplicity
241241 sortedPRs := make ([]PR , len (prs ))
242242 copy (sortedPRs , prs )
243243 sort .SliceStable (sortedPRs , func (i , j int ) bool {
@@ -248,7 +248,11 @@ func (app *App) addPRSection(ctx context.Context, prs []PR, sectionTitle string,
248248 if sortedPRs [i ].IsBlocked != sortedPRs [j ].IsBlocked {
249249 return sortedPRs [i ].IsBlocked // true (blocked) comes before false
250250 }
251- // Second priority: more recent PRs first
251+ // Second priority: human PRs before bot PRs
252+ if sortedPRs [i ].AuthorBot != sortedPRs [j ].AuthorBot {
253+ return ! sortedPRs [i ].AuthorBot // false (human) comes before true (bot)
254+ }
255+ // Third priority: more recent PRs first
252256 return sortedPRs [i ].UpdatedAt .After (sortedPRs [j ].UpdatedAt )
253257 })
254258
@@ -342,8 +346,12 @@ func (app *App) addPRSection(ctx context.Context, prs []PR, sectionTitle string,
342346 "remaining" , blockedPRIconDuration - timeSinceBlocked )
343347 }
344348 } else {
345- // Use block/square icon for blocked PRs
346- title = fmt .Sprintf ("■ %s" , title )
349+ // Use smaller dot for bot PRs, block icon for humans
350+ if sortedPRs [prIndex ].AuthorBot {
351+ title = fmt .Sprintf ("· %s" , title )
352+ } else {
353+ title = fmt .Sprintf ("■ %s" , title )
354+ }
347355 // Log when we transition from emoji to block icon
348356 if hasState && ! prState .FirstBlockedAt .IsZero () {
349357 timeSinceBlocked := time .Since (prState .FirstBlockedAt )
@@ -478,10 +486,13 @@ func (app *App) generateMenuTitles() []string {
478486func (app * App ) generatePRSectionTitles (prs []PR , sectionTitle string , hiddenOrgs map [string ]bool , hideStale bool ) []string {
479487 var titles []string
480488
481- // Sort PRs by UpdatedAt (most recent first)
489+ // Sort PRs: humans before bots, then by UpdatedAt (most recent first)
482490 sortedPRs := make ([]PR , len (prs ))
483491 copy (sortedPRs , prs )
484492 sort .Slice (sortedPRs , func (i , j int ) bool {
493+ if sortedPRs [i ].AuthorBot != sortedPRs [j ].AuthorBot {
494+ return ! sortedPRs [i ].AuthorBot // false (human) comes before true (bot)
495+ }
485496 return sortedPRs [i ].UpdatedAt .After (sortedPRs [j ].UpdatedAt )
486497 })
487498
@@ -546,8 +557,12 @@ func (app *App) generatePRSectionTitles(prs []PR, sectionTitle string, hiddenOrg
546557 "remaining" , blockedPRIconDuration - timeSinceBlocked )
547558 }
548559 } else {
549- // Use block/square icon for blocked PRs
550- title = fmt .Sprintf ("■ %s" , title )
560+ // Use smaller dot for bot PRs, block icon for humans
561+ if sortedPRs [prIndex ].AuthorBot {
562+ title = fmt .Sprintf ("· %s" , title )
563+ } else {
564+ title = fmt .Sprintf ("■ %s" , title )
565+ }
551566 // Log when we use block icon instead of emoji
552567 if hasState && ! prState .FirstBlockedAt .IsZero () {
553568 timeSinceBlocked := time .Since (prState .FirstBlockedAt )
0 commit comments