Skip to content

feat(renderer): mouse back/forward buttons step workspace history - #9

Open
decrypted wants to merge 1 commit into
mainfrom
feat/mouse-history-buttons
Open

decrypted wants to merge 1 commit into
mainfrom
feat/mouse-history-buttons

Conversation

@decrypted

Copy link
Copy Markdown
Owner

What

The mouse back/forward side buttons (DOM buttons 3/4) now step workspace history, the same as the titlebar ◀ ▶ and Mod+Alt+←/→.

  • New useMouseHistoryButtons(), mounted in App next to useGlobalKeybindings. One window listener for mousedown/mouseup; it acts on release, like Chrome.
  • It uses the same rules as the shortcut: canNavigateWorktreeHistory (only the views that show the arrows, not under Bot templates), not on the workspace-creation surface, and not while a dialog or menu is open (hasVisibleOverlay).
  • It runs through runBuiltInOrReplacement, so a plugin that replaces worktree.history.back/forward gets the buttons too.
  • The built-in browser pane keeps the buttons for page history. Embedded pages never reach this listener (main handles them in forwardGuestMousePress), and the streamed remote page already claims them with preventDefault, which this listener respects.
  • The listener calls preventDefault too, so in the paired web client the outer browser no longer navigates away from Orca.
  • In the terminal, xterm prevents only mousedown in mouse mode and never mouseup, and it doesn't send buttons ≥3 to the PTY. So the buttons also work over full-screen TUIs.

Why

Using the back/forward thumb buttons is the habit for "go back to where I was"; until now they only worked inside the browser pane.

Testing

  • pnpm check:changed on the box: 30/30.
  • No unit test: this is event wiring (AGENTS.md).

Risk

Low. Additive. Side-button presses outside the browser pane did nothing before.

🤖 Generated with Claude Code

The side buttons now do what the titlebar arrows and Mod+Alt+Left/Right do,
under the same guards. A streamed browser page keeps them for its own history.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/mouse-history-buttons branch from 2ee01df to 094d5b7 Compare November 30, 2026 11:10
decrypted added a commit that referenced this pull request Nov 30, 2026
Upstream a788fad..9fa1d98 (1236 commits). Branches: #2 port detection,
#3 remote auto-connect, #4 reduce motion, #5 keep-awake (squashed to one commit), #6 project sleep,
#7 project-group filter, #8 base-branch hint, #9 mouse history buttons (new in local/build), ci/fork-build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant