[PR #19789] Add focusBellTab action to navigate to tabs with bell indicators #31961

Open
opened 2026-01-31 09:50:37 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19789

State: open
Merged: No


Summary

Adds a new focusBellTab action that navigates to the next tab showing a bell indicator (🔔).

Fixes #19788

Changes

File Change
AllShortcutActions.h Register FocusBellTab action
ActionAndArgs.cpp Add focusBellTabKey mapping
AppActionHandlers.cpp Implement _HandleFocusBellTab handler
defaults.json Add command with Ctrl+Shift+B keybinding
Resources.resw Add "Focus next bell tab" string

Behavior

  • Finds next tab (by index) with BellIndicator == true
  • Wraps around to beginning if needed
  • Repeated presses cycle through all bell tabs
  • Does nothing if no bells are active

Implementation Details

~40 lines of new code. The handler iterates _tabs checking TabStatus().BellIndicator():

for (uint32_t offset = 1; offset <= tabCount; offset++)
{
    const auto idx = (currentIdx + offset) % tabCount;
    if (tab->TabStatus().BellIndicator())
    {
        _SelectTab(idx);
        return;
    }
}

Validation

  • Builds successfully (ARM64 Release)
  • Manual testing with bell triggers
  • Keybinding works (Ctrl+Shift+B)
  • Command palette shows "Focus next bell tab"

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19789 **State:** open **Merged:** No --- ## Summary Adds a new `focusBellTab` action that navigates to the next tab showing a bell indicator (🔔). **Fixes #19788** ## Changes | File | Change | |------|--------| | `AllShortcutActions.h` | Register `FocusBellTab` action | | `ActionAndArgs.cpp` | Add `focusBellTabKey` mapping | | `AppActionHandlers.cpp` | Implement `_HandleFocusBellTab` handler | | `defaults.json` | Add command with `Ctrl+Shift+B` keybinding | | `Resources.resw` | Add "Focus next bell tab" string | ## Behavior - Finds next tab (by index) with `BellIndicator == true` - Wraps around to beginning if needed - Repeated presses cycle through all bell tabs - Does nothing if no bells are active ## Implementation Details ~40 lines of new code. The handler iterates `_tabs` checking `TabStatus().BellIndicator()`: ```cpp for (uint32_t offset = 1; offset <= tabCount; offset++) { const auto idx = (currentIdx + offset) % tabCount; if (tab->TabStatus().BellIndicator()) { _SelectTab(idx); return; } } ``` ## Validation - [x] Builds successfully (ARM64 Release) - [ ] Manual testing with bell triggers - [ ] Keybinding works (Ctrl+Shift+B) - [ ] Command palette shows "Focus next bell tab" ## PR Checklist - [x] Closes #19788 - [ ] Tests added/passed - [ ] Documentation updated - [ ] Schema updated (not necessary)
claunia added the pull-request label 2026-01-31 09:50:37 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31961