fix(web): cmd+click sidebar PR numbers open in the browser - #6378
Conversation
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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: 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. |
## 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
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>
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
LegacySidebarandSidebarare now<a href={pr.url}>withtarget="_blank"andrel="noopener noreferrer", withonPointerDownstopping propagation so row selection doesn’t steal the click.useOpenPrLink(openPullRequestLink.ts) still callsstopPropagation, but for modifier clicks on anchors it skipspreventDefaultso the browser (or Electron) opens the URL; plain clicks stillpreventDefaultand open the right-panel / in-app flow. Non-anchor callers keep usingopenExternal.Thread row handlers bail out early via new
isSidebarNestedLinkClickinSidebar.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
SidebarThreadRow(both Sidebar.tsx and LegacySidebar.tsx) from buttons to anchor elements withtarget="_blank", enabling native cmd/ctrl-click and middle-click behavior.isSidebarNestedLinkClickin Sidebar.logic.ts to detect clicks originating from nested links, used to suppress row-level thread selection and navigation when clicking the PR badge.useOpenPrLinkin openPullRequestLink.ts to skippreventDefaultwhen 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.