Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Feature]: Make the default action for file and pull request links configurable #11403

Closedspaansba(GitHub profile, opens in a new tab) opened this issue 6 comments

Before submitting

  • I searched existing issues and did not find a duplicate.

Area

apps/web

Problem or use case

Clicking a file link or recognized pull request link opens it in T3 Code's right panel. Opening the same target in the preferred editor or system browser requires holding Cmd/Ctrl while clicking.

I use my external editor and GitHub as the primary destinations, so holding a modifier for every link adds friction. The existing "Open links in" setting covers ordinary chat and terminal links, but does not change the primary action for file links or recognized pull request links.

Proposed solution

Make the primary click destination configurable while preserving today's behavior as the default:

  • File links: T3 Code or Preferred editor
  • Pull request links: T3 Code or Default browser

When an external destination is selected, plain click should open externally and Cmd/Ctrl-click should perform the alternate in-app action.

Apply the preference consistently to chat links, diff filenames, file-browser entries, and pull request links.

  1. Thanks for the clear write-up. Confirmed as a real UX gap, not a bug.

    Current behavior

    • File chips in chat: plain click opens the in-app file viewer; Cmd/Ctrl-click opens the preferred editor (shouldOpenMarkdownFileLinkInEditor in apps/web/src/markdown-links.ts, handler in ChatMarkdown.tsx). PDFs are already browser-first.
    • Recognized PR links: plain click opens the right-hand PR panel; Cmd/Ctrl-click goes to the system browser (shouldOpenPullRequestExternally in apps/web/src/lib/openPullRequestLink.ts). Same helper is used from chat, sidebar PR numbers, View PR, and the thread PR panel.
    • Open links in (browserLinkTarget, Settings → Integrations) only covers ordinary chat/terminal http(s) links. It does not change file chips or recognized PR links. That matches what landed in #9339.

    Surfaces that do not have the modifier swap today

    • Diff filenames always open the in-app viewer when a thread is present (openDiffFilePrimaryAction in apps/web/src/diffFileActions.ts).
    • File-browser rows open on selection (FileBrowserPanel). The context menu is only “Copy mention” / “Add to chat”. Cmd/Ctrl on a tree is typically multi-select, so applying the same modifier rule there needs an explicit product choice.

    Related work

    • #8335 added a PR-link destination setting and was closed: we are not adding a separate preference for where PR links open. This issue’s PR-link half is the same request in a broader package.
    • #9670 (open) adds an explicit “Open in editor” control on diffs without changing the filename’s primary click.
    • #7641 (open) adds “Open in system browser” for HTML/PDF file chips via the context menu.
    • #7099 / #7250 (open) add modifier-click on View PR so it matches other PR links; still no setting.

    Ask The file-link default (T3 Code vs preferred editor) has not been rejected before and is a reasonable companion to Open links in. The PR-link default was declined in #8335. Please decide whether this broader “primary click + inverted modifier” model is enough to revisit that, or whether we should scope this to file links only.

    If accepted, keep today’s destinations as the defaults and invert Cmd/Ctrl so the other action stays one gesture away.

  2. juliusmarminge added labelsenhancement

  3. juliusmarminge added labelsneeds-julius

  4. juliusmarminge added labelsvia-triage

  5. Similarly, agents often write HTML reports and prototypes and those show best in a real browser. I'd appreciate it if HTML files would act like links and respect the "Open links in" setting instead of always opening in T3's integrated browser.

  6. yeah I would love to see this happening,

    browserLinkTarget: "system" is just currently fully ignored... (according to opus 5.5)

  7. Adding another report of the PR-link part of this request.

    Environment: macOS, T3 Code Nightly 0.0.46-nightly.20261005.2676, with Google Chrome already registered as the default browser for HTTP and HTTPS.

    Steps:

    1. Set Settings → Integrations → Browser → Open links in to Your default browser.
    2. Open a chat message containing a recognized GitHub pull request link.
    3. Click that link normally, without holding a modifier key.

    Actual: the PR opens in T3 Code's built-in right-hand panel despite the default-browser preference.

    Desired: the first ordinary click opens the PR in the external default browser. Requiring Cmd-click or a context-menu action for every PR link does not address this workflow. Ideally the existing Your default browser preference would apply to recognized PR links as well, without requiring another preference.

    The behavior was reported during normal use. Source and installed bundle inspection confirmed that recognized PR links are intercepted before general browser routing in openPullRequestLink.ts. No separate automated UI reproduction was performed.

  8. SnaetWarre(GitHub profile, opens in a new tab)commented

    I'm making a PR for this. For the web links part, the file links are a bit more tricky as Julius mentioned

  9. Adding a use case for a third option: Open with system default app.

    I often have agents generate Office files (e.g. an .xlsx upload template or a .docx). In T3 Code on Windows, clicking the file only previews it, and Open in → File Explorer just opens the folder. To open the file in Excel/Word, my current workaround is to ask the agent to print the file's full path, copy it, and open it manually.

    Codex's desktop app opens generated files with the OS default app on click, which is very handy. Could the file-link action include "System default app" (ShellExecute on Windows, open on macOS), alongside "T3 Code" and "Preferred editor"? A right-click "Open with default app" would also work. Happy to test on Windows.

Sign in to join this conversation.