Stop flashing on pane navigation

This commit is contained in:
Lawrence Chen 2026-03-20 20:42:54 -07:00
parent a41bc97410
commit ec6915bfdc
No known key found for this signature in database
2 changed files with 7 additions and 18 deletions

View file

@ -8245,9 +8245,6 @@ final class Workspace: Identifiable, ObservableObject {
applyTabSelection(tabId: tabId, inPane: paneId)
}
if let focusedPanelId, focusedPanelId != previousFocusedPanelId {
triggerFocusFlash(panelId: focusedPanelId)
}
}
// MARK: - Surface Navigation

View file

@ -1073,7 +1073,7 @@ final class WorkspaceTerminalConfigInheritanceSelectionTests: XCTestCase {
@MainActor
final class WorkspaceAttentionFlashTests: XCTestCase {
func testMoveFocusTriggersWholePaneFlashTokenWhenWholePaneModeEnabled() {
func testMoveFocusDoesNotTriggerWholePaneFlashTokenWhenWholePaneModeEnabled() {
let defaults = UserDefaults.standard
let originalExperimentEnabled = defaults.object(forKey: TmuxOverlayExperimentSettings.enabledKey)
let originalExperimentTarget = defaults.object(forKey: TmuxOverlayExperimentSettings.targetKey)
@ -1111,28 +1111,20 @@ final class WorkspaceAttentionFlashTests: XCTestCase {
XCTAssertEqual(workspace.focusedPanelId, leftPanelId)
XCTAssertEqual(
workspace.tmuxWorkspaceFlashToken,
1,
"Expected moving focus left to advance the workspace-pane flash token"
)
XCTAssertEqual(
workspace.tmuxWorkspaceFlashPanelId,
leftPanelId,
"Expected moving focus left to target the newly focused pane for whole-pane flash"
0,
"Expected moving focus left to avoid any workspace-pane flash"
)
XCTAssertNil(workspace.tmuxWorkspaceFlashPanelId)
workspace.moveFocus(direction: .right)
XCTAssertEqual(workspace.focusedPanelId, rightPanel.id)
XCTAssertEqual(
workspace.tmuxWorkspaceFlashToken,
2,
"Expected moving focus right to advance the workspace-pane flash token again"
)
XCTAssertEqual(
workspace.tmuxWorkspaceFlashPanelId,
rightPanel.id,
"Expected moving focus right to retarget the whole-pane flash to the new pane"
0,
"Expected moving focus right to avoid any workspace-pane flash"
)
XCTAssertNil(workspace.tmuxWorkspaceFlashPanelId)
}
func testMoveFocusSuppressesWorkspacePaneFlashWhenAnotherPaneOwnsUnreadAttention() {