Skip to content

fix(web): cmd+click sidebar PR numbers open in the browser - #6378

Merged
t3dotgg merged 1 commit into
mainfrom
t3code/sidebar-pr-cmd-click-browser
Aug 12, 2026
Merged

fix(web): cmd+click sidebar PR numbers open in the browser#6378
t3dotgg merged 1 commit into
mainfrom
t3code/sidebar-pr-cmd-click-browser

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Aug 12, 2026

Copy link
Copy Markdown
Member

Cmd+click on a PR number in the sidebar still opened T3's PR view.

The number is a real link now, so cmd/ctrl+click (and middle-click) go to the host in your browser. A plain click still opens the in-app view.

Made with Grok 4.6 in T3 Code.


Note

Low Risk
Localized sidebar click and link-handling behavior; no auth, data, or API contract changes.

Overview
Fixes cmd/ctrl+click on sidebar PR numbers still routing through T3’s in-app PR handler instead of the browser.

Sidebar PR controls in LegacySidebar and Sidebar are now <a href={pr.url}> with target="_blank" and rel="noopener noreferrer", with onPointerDown stopping propagation so row selection doesn’t steal the click.

useOpenPrLink (openPullRequestLink.ts) still calls stopPropagation, but for modifier clicks on anchors it skips preventDefault so the browser (or Electron) opens the URL; plain clicks still preventDefault and open the right-panel / in-app flow. Non-anchor callers keep using openExternal.

Thread row handlers bail out early via new isSidebarNestedLinkClick in Sidebar.logic.ts (with unit tests) so nested PR links don’t trigger thread navigation or multi-select.

User docs note command-click on sidebar PR numbers to open in the browser.

Reviewed by Cursor Bugbot for commit 6902024. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Support cmd/ctrl-click on sidebar PR numbers to open in browser

  • Converts PR number/status badges in SidebarThreadRow (both Sidebar.tsx and LegacySidebar.tsx) from buttons to anchor elements with target="_blank", enabling native cmd/ctrl-click and middle-click behavior.
  • Adds isSidebarNestedLinkClick in Sidebar.logic.ts to detect clicks originating from nested links, used to suppress row-level thread selection and navigation when clicking the PR badge.
  • Updates useOpenPrLink in openPullRequestLink.ts to skip preventDefault when the click should delegate to the browser (cmd/ctrl/middle-click), while plain clicks still open the in-app panel or fall back to the shell.

Macroscope summarized 6902024.

Cmd+click on a sidebar PR number still opened T3's PR view. The number is now a real link, so the browser gets the click. A plain click still opens the in-app view.

Made with Grok 4.6 in T3 Code.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 721ea048-da27-42e4-a90d-61397287f6bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 11.3 KiB 11.3 KiB −17 B (−0.1%) 15.1 KiB
Codex Thread snapshot wire 5.5 KiB 5.5 KiB 0 B (0.0%) 7.3 KiB
Codex Live turn WebSocket wire 5.9 KiB 5.9 KiB −17 B (−0.3%) 7.8 KiB
Codex Live turn WebSocket decoded 49.7 KiB 49.7 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 16 16 0 (0.0%) 21
Claude Total thread wire 11.4 KiB 11.3 KiB −18 B (−0.2%) 15.1 KiB
Claude Thread snapshot wire 5.5 KiB 5.5 KiB −13 B (−0.2%) 7.3 KiB
Claude Live turn WebSocket wire 5.9 KiB 5.9 KiB −5 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 50.6 KiB 50.6 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 16 16 0 (0.0%) 21

Baseline: b28f9bf · PR result: 6902024 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 94.6 KiB
  • Claude decoded thread snapshot: 95.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 6902024

This is a targeted UI fix converting buttons to proper anchor elements so cmd/ctrl+click opens PR links in the browser. Changes are self-contained to sidebar click handling, include unit tests, and update documentation.

You can customize Macroscope's approvability policy. Learn more.

@t3dotgg
t3dotgg merged commit 2eb099f into main Aug 12, 2026
20 of 21 checks passed
@t3dotgg
t3dotgg deleted the t3code/sidebar-pr-cmd-click-browser branch August 12, 2026 21:28
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 13, 2026
## What's Changed
* fix(web): cmd+click sidebar PR numbers open in the browser by @t3dotgg in pingdotgg/t3code#6378
* feat(web): project favicon and workspace icons in command subtitles by @gsimone in pingdotgg/t3code#6330
* web/settings: fix source control scan on relay environments by @dominic-r in pingdotgg/t3code#6230
* fix(web): make reset zoom hover visible by @t3-code[bot] in pingdotgg/t3code#6385
* fix(web): keep the typed prompt when a draft changes repo by @t3dotgg in pingdotgg/t3code#6393

## New Contributors
* @gsimone made their first contribution in pingdotgg/t3code#6330
* @dominic-r made their first contribution in pingdotgg/t3code#6230

**Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260812.1079...v0.0.34-nightly.20260813.1081

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260813.1081
0veek added a commit to 0veek/Ronin that referenced this pull request Aug 13, 2026
Ported from t3code 2eb099f (pingdotgg#6378). The LegacySidebar hunk is dropped —
this fork has no legacy sidebar tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant