Skip to content

fix(mobile): PR links open in the app the same way they do on web - #24738

Merged
juliusmarminge merged 1 commit into
mainfrom
t3/centralize-pr-link-handling
Oct 25, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
t3/centralize-pr-link-handling

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

Web and mobile each had their own logic for deciding whether a PR link opens in the app. Mobile only matched a project checked out from the link's exact repository. Web also lent any project on the link's host to the PR panel when the server reads PRs by host. So a GitHub mirror link from a GitCafe project (or any sibling repository's link) opened the PR panel on web but fell through to the GitHub app on mobile.

The resolver now lives once in client-runtime (resolveChangeRequestLinkTarget): environment scoping, exact repository match, same-host fallback, capability gating, and repository/host selection. Web's useOpenChangeRequestLink and mobile's nativePullRequestDestination both call it. Mobile now also respects the server's PR capabilities instead of navigating to a screen that cannot load.

Not changed: when nothing matches, web opens the built-in browser and mobile hands off to the OS; the "open PR links in app" setting is still web-only.

Tests: resolver cases in changeRequestLinks.test.ts (including a GitCafe project receiving a GitHub mirror link), and the mobile navigation test updated to the shared behavior.

Done with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Mobile only opened a PR link in-app when a project was checked out from
the link's exact repository, so a GitHub mirror link from a GitCafe
project fell through to the GitHub app. Web also lent any project on the
link's host to the PR panel. Both clients now share one resolver in
client-runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 25, 2026
const pullRequestsSearch = {
repository,
number,
...(host === undefined ? {} : { selectedHost: host }),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium lib/openPullRequestLink.ts:77

In the standalone PR panel, clicking a link whose resolver returns no host preserves the previous selectedHost in the merged search state, so PullRequestsPage reopens the old host-scoped PR and creates or activates the wrong tab. Set selectedHost explicitly to host so an undefined host clears the stale selection.

Suggested change
...(host === undefined ? {} : { selectedHost: host }),
selectedHost: host,
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around line 77:

In the standalone PR panel, clicking a link whose resolver returns no `host` preserves the previous `selectedHost` in the merged search state, so `PullRequestsPage` reopens the old host-scoped PR and creates or activates the wrong tab. Set `selectedHost` explicitly to `host` so an undefined host clears the stale selection.

@juliusmarminge
juliusmarminge enabled auto-merge (squash) October 25, 2026 04:55
@juliusmarminge
juliusmarminge merged commit c2845de into main Oct 25, 2026
29 of 30 checks passed
@juliusmarminge
juliusmarminge deleted the t3/centralize-pr-link-handling branch October 25, 2026 04:56
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 25, 2026
## What's Changed
* perf(mobile): highlight code with native @pierre/highlights instead of Shiki by @juliusmarminge in pingdotgg/t3code#24544
* fix(desktop): support Linux distro protocol launchers by @juliusmarminge in pingdotgg/t3code#24591
* fix(provider-acp): force-kill terminal commands that ignore SIGTERM by @juliusmarminge in pingdotgg/t3code#24596
* fix(grok): invoke leading picked skills through native commands by @juliusmarminge in pingdotgg/t3code#24605
* fix(server): long agent turns no longer load whole when a thread opens by @t3dotgg in pingdotgg/t3code#24589
* fix(server): analytics stop counting reconnects, retries, and dev servers by @t3dotgg in pingdotgg/t3code#24601
* fix(acp): idle agent errors fail their turns by @juliusmarminge in pingdotgg/t3code#24615
* fix(provider-acp): Grok monitors show as monitors in background work by @t3dotgg in pingdotgg/t3code#24609
* feat(server): devices on the same network reach background services over LAN by @t3dotgg in pingdotgg/t3code#24588
* fix(codex): bound pending requests after app-server stdout closes by @juliusmarminge in pingdotgg/t3code#24600
* fix(cursor): discover built-in skills in the composer by @juliusmarminge in pingdotgg/t3code#24595
* fix(server): retry provider event writes after brief SQLite locks by @juliusmarminge in pingdotgg/t3code#24571
* fix(server): settle inactive threads with persisted open PR links by @juliusmarminge in pingdotgg/t3code#24617
* feat(mobile): Settings is a workspace tab, and tabs never open on an empty detail by @juliusmarminge in pingdotgg/t3code#24524
* feat(mobile): the folded Duo opens search from a search tab below the tab bar by @juliusmarminge in pingdotgg/t3code#24360
* revert(mobile): take the folded Duo search tab back out for now by @juliusmarminge in pingdotgg/t3code#24626
* fix(web): preview images outside the workspace by @juliusmarminge in pingdotgg/t3code#24627
* fix(threads): Working holds only background work the agent waits on by @t3dotgg in pingdotgg/t3code#24610
* fix(web): switched threads and Scroll to end land on the real end by @t3dotgg in pingdotgg/t3code#24622
* fix(web): attach DNG originals as generic files by @juliusmarminge in pingdotgg/t3code#24625
* fix(server): surface failed runtime request answer delivery by @juliusmarminge in pingdotgg/t3code#24616
* fix(preview): report navigation timeout accurately by @Ethereal49 in pingdotgg/t3code#24356
* fix(web): give PR row metadata room below the title by @juliusmarminge in pingdotgg/t3code#24553
* fix(mobile): center floating status actions by @PixPMusic in pingdotgg/t3code#24526
* fix(mobile): the iPhone new-chat button sits beside the tab bar on iOS 26.6 by @wojas in pingdotgg/t3code#24492
* fix(web): signed-out T3 Connect shows a Sign in button by @t3dotgg in pingdotgg/t3code#24636
* perf(mobile): stop menu fault logging and whole-list re-renders on Home by @juliusmarminge in pingdotgg/t3code#24646
* fix(mobile): preserve syntax and navigation in large diffs by @juliusmarminge in pingdotgg/t3code#24276
* perf(shell): cold connects skip idle subagent threads, a third of the thread list by @t3dotgg in pingdotgg/t3code#24648
* feat: share a thread with a guest who watches live and sends messages you approve by @t3dotgg in pingdotgg/t3code#24104
* fix(antigravity): say when sign-in cannot reach Google by @t3dotgg in pingdotgg/t3code#24652
* fix: canonicalize git.cafe pull request links by @maria-rcks in pingdotgg/t3code#22634
* feat(mobile): manage labels, edit PRs and comments, react, and refresh checks live by @juliusmarminge in pingdotgg/t3code#24602
* perf(web): highlight code with @pierre/highlights instead of Shiki by @maria-rcks in pingdotgg/t3code#23178
* perf(server): thread opens and live events send each message body once by @t3dotgg in pingdotgg/t3code#24647
* refactor: halve code comments and cap comment blocks at four lines by @maria-rcks in pingdotgg/t3code#21514
* chore: fit three comments to the four-line cap so lint passes on main by @t3dotgg in pingdotgg/t3code#24675
* fix(claude): ENABLE_TOOL_SEARCH=auto no longer costs 10x cache writes per session by @t3dotgg in pingdotgg/t3code#24654
* perf(orchestration): thread snapshots send each long ID once by @t3dotgg in pingdotgg/t3code#24643
* fix(mobile): keep visible diff files highlighted by @juliusmarminge in pingdotgg/t3code#24682
* fix(mobile): Settings split view keeps its selection and its header matches the page by @juliusmarminge in pingdotgg/t3code#24644
* fix(mobile): every Duo header blurs under the vertical bar, from one place by @juliusmarminge in pingdotgg/t3code#24671
* feat(settings): follow-ups steer the running turn by default by @maria-rcks in pingdotgg/t3code#24718
* fix(mobile): Duo threads no longer open shifted left by @juliusmarminge in pingdotgg/t3code#24732
* fix(mobile): PR links open in the app the same way they do on web by @juliusmarminge in pingdotgg/t3code#24738
* feat(web): command palette search finds options inside submenus by @maria-rcks in pingdotgg/t3code#24709

## New Contributors
* @Ethereal49 made their first contribution in pingdotgg/t3code#24356
* @wojas made their first contribution in pingdotgg/t3code#24492

**Full Changelog**: pingdotgg/t3code@v0.1.3-nightly.20261024.3643...v0.1.3-nightly.20261025.3655

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.3-nightly.20261025.3655
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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