diff --git a/Sources/Workspace.swift b/Sources/Workspace.swift index b7c9754a..565a8427 100644 --- a/Sources/Workspace.swift +++ b/Sources/Workspace.swift @@ -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 diff --git a/cmuxTests/WorkspaceUnitTests.swift b/cmuxTests/WorkspaceUnitTests.swift index 4a766a9d..1407d1ea 100644 --- a/cmuxTests/WorkspaceUnitTests.swift +++ b/cmuxTests/WorkspaceUnitTests.swift @@ -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() {