You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cmd+click on a thread link should open the macOS default browser instead of the in-app browser #2288
On macOS desktop, holding Cmd (or Cmd+Shift) while clicking an http(s) link in a thread opens bb's built-in browser, identical to a plain click. macOS convention is that modifier-clicks hand the URL to the OS default browser; plain click can keep the in-app browser.
Setting state: Settings → General → "Open links in the in-app browser" ON (default)
Steps to reproduce
Run bb 0.39.0 desktop on macOS with the default link setting ("Open links in the in-app browser" ON).
Open any thread whose messages contain an http(s) link.
Hold Cmd and click the link.
Expected vs actual
Expected: Cmd+click (and Cmd+Shift+click) opens the link in the macOS default browser via shell.openExternal; plain click keeps following the in-app-browser preference.
Actual: Cmd+click opens the link in bb's built-in browser exactly like a plain click.
Evidence from source
handleAnchorClick in apps/app/src/components/ui/markdown-preview.tsx (the thread MarkdownLink) routes every non-route web link through linkRouting.onOpenLink(...) and calls event.preventDefault() without inspecting event.metaKey / event.ctrlKey / event.shiftKey / event.altKey, so modified clicks cannot fall through to platform-default handling.
By contrast, useUrlAnchorClickHandler in apps/app/src/lib/url-open-routing.tsx deliberately ignores clicks carrying alt/ctrl/meta/shift (returns without preventDefault), so surfaces using that hook already let modified clicks reach Electron's window-open path. The two paths disagree today.
The external-open plumbing already exists and is reachable: openUrlInExternalBrowser(url) in url-open-routing.tsx dispatches to desktopInfo.openExternalUrl.
Suggested shape: in handleAnchorClick, treat meta/ctrl (+optional shift) clicks on http(s) hrefs as external-browser intents before consulting linkRouting.onOpenLink.
Interim workaround
Turn OFF "Open links in the in-app browser" in Settings → General — but this is all-or-nothing (every http(s) link goes external), losing the Cmd+click distinction requested here.
Root cause (short): MarkdownAnchor.handleAnchorClick in apps/app/src/components/ui/markdown-preview.tsx routes every http(s) link through linkRouting.onOpenLink (in-app browser) and calls preventDefault() without checking metaKey/ctrlKey/shiftKey/altKey, unlike useUrlAnchorClickHandler, RouteAnchor and PluginUrlLink which all bail on modified clicks, so Cmd+click never falls through to the anchor's target=_blank default that Electron's setWindowOpenHandler would hand to shell.openExternal.
Proposed fix: In MarkdownAnchor.handleAnchorClick (apps/app/src/components/ui/markdown-preview.tsx), after the local-file and app-route branches and before consulting linkRouting.onOpenLink, return early when event.defaultPrevented || event.button !== 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey. Falling through is sufficient: the anchor has target="_blank", so on desktop the main window's setWindowOpenHandler already calls shell.openExternal and denies the popup, and on web the browser opens its own tab. Verified: the repro test goes 3 failed -> 5 passed, typecheck clean, and live …
Caveats: Live repro drove the Electron dev shell via CDP Input.dispatchMouseEvent with the Meta modifier bit rather than a physical trackpad Cmd+click; the in-app browser opening was observed via the CDP target list plus DOM probe and screenshots (the browser WebContentsView body is blank in host-page screenshots). After the fixed Cmd+click I could not directly confirm the OS browser received the URL: Safa…
The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).
Activity
SawyerHood commentedon Aug 24, 2026
---Auto-Generated---
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2288.html
The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).
Open inline visualizations in the browser with a modifier click (#4634)
Resolve and open Markdown links in one place (get-bb#6756)
Make plugin surfaces prove they use core's path and delete plugin-onl…