Skip to content

Option to open a workspace's pull request in the browser instead of the built-in PR pane #8472

Closed

Description

@fraser-langton

What problem are you trying to solve?

Clicking a workspace's pull request link now always opens Superset's built-in pull request pane. Previously I could open the PR directly in my browser. There's no option for that before the pane opens, and I can't find a setting to turn it off.

The built-in pane is slow and glitchy for me, so I end up waiting for it to load and then going to GitHub anyway. I just want to open the PR on github.com directly.

In the source, DiffPanePRLink and useWorkspacePaneOpeners call openPullRequestPaneInStore unconditionally. There's no setting or modifier-key path to the external browser.

Version: Superset Desktop 1.37.0 (macOS).

Proposed solution

Any of these would work:

  • A setting such as "Open pull requests in: Superset pane / Default browser", similar to the existing changesOpenTarget setting.
  • Cmd/Ctrl-click (or a context-menu item) on the PR link opens it in the default browser.
  • An "Open in browser" button on the PR link itself, so I don't have to wait for the pane to load first.

Workarounds you've tried

Opening the PR from the terminal with gh pr view --web, or copying the URL by hand. Both lose the one-click flow that used to exist.

Activity

  1. github-actions commented on Oct 13, 2026

    @github-actions
    Contributor

    Summary

    This is a feature request, not a bug. In Desktop 1.37.0, the main "open PR" controls in a v2 workspace now open Superset's built-in pull request pane, with no setting to open the PR in the default browser instead. The reporter finds the pane slow. They ask for one of three things: a setting like changesOpenTarget, Cmd/Ctrl-click to open in the browser, or an "Open in browser" button. The report matches the code. Three entry points call the pane opener with no setting or modifier-key check. One browser path does still exist: the "View on GitHub" item in the PR status dropdown.

    Affected code

    All paths below are under apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/.

    • hooks/usePaneRegistry/components/DiffPane/components/DiffPaneHeaderExtras/components/DiffPanePRLink/DiffPanePRLink.tsx:54-61: the "Open PR #N" button in the Diff pane header. It falls back to window.open only when pullRequestRefFromUrl fails to parse the URL. Otherwise it always calls openPullRequestPaneInStore.
    • components/WorkspaceSidebar/hooks/useReviewTab/components/PRHeader/PRHeader.tsx:62-74: the PR title in the sidebar Review tab. It behaves the same way when onOpenPullRequest is passed. The <a href target="_blank"> branch at lines 75-84 runs only when no handler is passed.
    • components/ChangesControl/components/PRStatusGroup/PRStatusGroup.tsx:362-373: the "Open pull request" menu item, which opens the pane.
    • hooks/useWorkspacePaneOpeners/useWorkspacePaneOpeners.ts:234-239: openPullRequestPane calls openPullRequestPaneInStore(store, ref) unconditionally. page.tsx passes this function as onOpenPullRequest to ChangesControl (line 585) and WorkspaceSidebar (line 770).
    • hooks/usePaneRegistry/components/ReviewPane/ReviewPane.tsx:32: also opens the pane unconditionally.

    What still opens the browser

    • PRStatusGroup.tsx:375-380: the PR status dropdown (chevron next to the #N badge) has a "View on GitHub" item, <a href={pr.url} target="_blank">. This is a one-click path to github.com today, so it may help as a workaround. It is easy to miss.
    • PRStatusGroup.tsx:254-262: the #N badge itself is an external link only when onToggleChanges is not passed. In the normal workspace header it toggles the Changes pane instead (lines 240-253).

    Root cause

    The PR pane was made the default target for these links, and no preference was added. The only existing open-target setting is changesOpenTarget (apps/desktop/src/renderer/stores/settings.ts:12,25, UI in settings/behavior/components/BehaviorSettings/BehaviorSettings.tsx:48,158-165). It controls only how the Changes pane opens (split pane or tab).

    Reproduction

    1. Open a v2 local workspace whose branch has a linked GitHub PR.
    2. Click "Open PR #N" in the Diff pane header, or the PR title in the sidebar Review tab. The built-in PR pane opens.
    3. Cmd/Ctrl-click the same controls. The result is the same, because neither onClick reads event.metaKey or event.ctrlKey.

    Suggested fix

    These options can be combined:

    1. Setting. Add pullRequestOpenTarget: "pane" | "browser" to Settings in stores/settings.ts, with default "pane", next to changesOpenTarget. Add a select in BehaviorSettings. Then branch inside openPullRequestPane in useWorkspacePaneOpeners.ts, which covers the Changes control and the sidebar in one place. DiffPanePRLink and ReviewPane call openPullRequestPaneInStore directly, so they need the same check. Alternatively, move that check into a shared helper. For the browser path, use electronTrpcClient.external.openUrl.mutate(url), as WorkspaceActivityMenu.tsx:316 and BrowserOverflowMenu.tsx:151 already do. The store is persisted under the settings key, so check whether a new field affects the persisted-key registry in src/renderer/lib/persisted-keys/.
    2. Modifier key. In DiffPanePRLink and PRHeader, open pr.url externally when event.metaKey || event.ctrlKey. This is a small, low-risk change on its own.
    3. Visible button. Add a small LuArrowUpRight "Open on GitHub" button next to DiffPanePRLink. It would match the existing "View on GitHub" menu item.

    New labels must use Lingui macros, and bun run check:i18n must be run with translations added to each locale catalog. For a bun:test regression test, extract the "pane or browser" choice into a small pure helper, e.g. resolvePullRequestOpenAction({ target, metaKey, ref }). Then assert that it returns the external action for target: "browser", for a modifier click, and when ref is null.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions