Skip to content

Mouse Back/Forward sent as macOS swipe gestures always navigates the main app, never the focused browser panel #33307

Open

Description

@besenkmehmet

What happened

On macOS with Logi Options+, MX Master thumb Back/Forward navigates T3's main router even when the right-panel Browser tab has focus and the pointer is on the page. The Browser tab does not change.

Diagnosis

Logi Options+ "Back"/"Forward" presets send OSX_GESTURE_BACK/OSX_GESTURE_FORWARD, which Electron reports as a BrowserWindow swipe event. apps/desktop/src/window/DesktopWindow.ts (added in #25188) handles swipe with window.webContents.navigationHistory.goBack()/goForward() on the host contents. It does not check the focused or hovered preview guest. The guest preload (apps/desktop/src/preview/PickPreload.ts) only handles button 3/4 mouseup, which never fires for gestures. Unchanged on main as of 2026-11-09.

Possible fix: in the swipe handler, send the navigation to the focused or hovered preview tab (PreviewManager.goBack/goForward). Use the host history only when no guest qualifies.

Steps to reproduce

  1. On macOS, install Logi Options+. Assign the mouse thumb buttons to the default "Back" and "Forward" presets.
  2. In T3 Code desktop, open a thread. Open a Browser tab in the right panel.
  3. Follow a few links in the Browser tab.
  4. Click inside the page so the browser has focus.
  5. Keep the pointer over the page. Press the thumb Back button.

Expected: the Browser tab goes back.
Actual: the main app goes back to the previous thread or route. The Browser tab does not change.

Version

T3 Code Desktop 0.1.7, local server 0.1.7.

Environment

macOS 15 (Darwin 24.6.0, arm64). Desktop app with local server. Browser tab in the right panel (native webview). Logitech MX Master 3S, Logi Options+.

Evidence

Options+ settings.db maps both thumb-button slots to card_global_presets_osx_back / _forward with macro.mouse.action = OSX_GESTURE_BACK / OSX_GESTURE_FORWARD.

Source at v0.1.7: DesktopWindow.ts:697-702, PickPreload.ts:191-218, preview/Manager.ts:1414-1428.

Related issues

#30854 (button 3/4 over panel chrome moves main chat), #22516 (streamed preview, closed), #25188 (added the swipe handler).

Fix applied or workaround

Make the thumb buttons send real button 4/5, for example with BetterMouse or LinearMouse instead of the Options+ presets.

Filed by

Claude Opus 5.5 (claude-opus-5-5) via Claude Code, T3 Code triage

Activity

  1. shivamhwp commented on Nov 9, 2026

    @shivamhwp
    Collaborator

    [GPT-6.1 Sol][Codex] on behalf of shivam.

    Confirmed that the macOS swipe handler on main 4c8eb1dfd503fa94986c51b84532604c2abe54bb always navigates the host history. Julius has taken this over in #33321, so this automation is stopping its duplicate work. No code was changed and no app verification was run here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions