Skip to content

fix(mobile): bare t3code:// links no longer reset navigation to Home - #12002

Merged
maria-rcks merged 2 commits into
pingdotgg:mainfrom
SunkenInTime:devin/1789516909-ignore-bare-scheme-link
Sep 16, 2026
Merged

maria-rcks merged 2 commits into
pingdotgg:mainfrom
SunkenInTime:devin/1789516909-ignore-bare-scheme-link

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #11950

What Changed

The React Navigation linking.filter in apps/mobile/src/App.tsx is extracted into shouldHandleAppLink(url) in apps/mobile/src/lib/appLinking.ts. In addition to the existing Expo dev-client / expo-sharing exclusions it now returns false for scheme-only URLs:

!/^t3code(-dev|-preview)?:\/*$/.test(url)

Path-bearing links (t3code://threads/..., t3code://pair?..., t3code-dev://settings/usage?...) are unchanged. Unit tests cover the bare schemes (t3code://, t3code:///, -dev, -preview), the lifecycle URLs, and the path-bearing cases.

Why

iOS returns to the app with a bare t3code:// URL (e.g. after the dictation keyboard / sibling app hands control back). React Navigation matched that against the Home screen, whose linking path is "", and reset the stack — dropping whichever thread the user had open. A scheme-only URL carries no destination, so it should only wake the app, never navigate.

Reproduce

  1. Build the iOS dev client, pair it to a local server, open any thread.
  2. From Safari (or xcrun simctl openurl booted "t3code://") open the bare t3code:// URL.
  3. Before: the app comes to the foreground on Home and the thread is gone from the stack. After: the app foregrounds on the thread it was already showing.

UI Changes

Verified on an iPhone 17 Pro simulator (iOS 26.5, t3code-dev dev client, disposable local T3 server with a seeded thread). Same steps each time: open the thread, then xcrun simctl openurl <device> t3code-dev://.

Before (main @ 7a368fe) — bare link resets to Home, thread gone After — thread stays open After — t3code-dev://threads/<env>/<thread> still navigates
before after after path link

Also covered by unit tests (vp test run apps/mobile/src/lib/appLinking.test.ts) plus mobile typecheck and lint.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Written by Claude (Devin harness).

Summary by CodeRabbit

  • Bug Fixes

    • Improved mobile app-link handling by ignoring development-client and sharing lifecycle URLs.
    • Prevented scheme-only links from triggering navigation.
    • Continued supporting valid links to threads, pairing, settings, and other in-app destinations.
  • Tests

    • Added coverage for ignored lifecycle and scheme-only links, along with supported navigation links.

SunkenInTime and others added 2 commits September 16, 2026 00:16
Bare app-scheme URLs were matching the Home route and resetting mobile navigation.

Extract the app-link filter into a tested helper that ignores scheme-only and lifecycle URLs while preserving path-bearing navigation links.

Made with Devin (Claude) via Devin.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 16, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 5df34ca

Macroscope's review found this PR approvable — This is a small, self-contained mobile deep-link bug fix that ignores bare app-scheme wakeups while preserving path-bearing links and existing lifecycle filtering. Focused regression tests cover the new predicate, with no product-default or static-analysis configuration changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1eaca444-2431-4a61-acac-6af8c505b129

📥 Commits

Reviewing files that changed from the base of the PR and between 935c55b and 5df34ca.

📒 Files selected for processing (3)
  • apps/mobile/src/App.tsx
  • apps/mobile/src/lib/appLinking.test.ts
  • apps/mobile/src/lib/appLinking.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The mobile app now uses a shared shouldHandleAppLink predicate. The predicate ignores scheme-only and Expo lifecycle URLs while accepting path-bearing links. Tests cover these cases.

Changes

App-link filtering

Layer / File(s) Summary
App-link predicate and coverage
apps/mobile/src/lib/appLinking.ts, apps/mobile/src/lib/appLinking.test.ts
Adds shouldHandleAppLink and tests its handling of scheme-only, Expo lifecycle, path-bearing, and query-bearing URLs.
App integration
apps/mobile/src/App.tsx
Uses shouldHandleAppLink as the app-link filter before navigation.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 5df34

The link filter rejects the specified bare and lifecycle URLs while retaining tested path-bearing links. No confirmed merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: preventing bare t3code:// links from resetting mobile navigation to Home.
Description check ✅ Passed The description is complete and relevant. It explains what changed, why it changed, how to reproduce the issue, the expected behavior, validation results, and UI evidence. The checklist is largely com…
Linked Issues check ✅ Passed The changes satisfy the coding requirements in issue #11950. App.tsx uses shouldHandleAppLink as the React Navigation filter. The predicate rejects t3code://, t3code:///, t3code-dev://, and …
Out of Scope Changes check ✅ Passed The changes stay within issue #11950. They extract the app-link filter, add focused unit tests, and connect the filter to App.tsx. These changes directly support the bare-scheme navigation fix and p…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@maria-rcks
maria-rcks merged commit 0ec2b08 into pingdotgg:main Sep 16, 2026
23 checks passed
sheehanmunim added a commit to munimtechnologies/mtcode that referenced this pull request Sep 16, 2026
- ClaudeAdapter: took upstream's extracted `isClaudeHumanTurnStart` predicate
  (pingdotgg#11954) while keeping the fork's empty-history behaviour, which rolls back
  retained turns in memory instead of failing the request.
- App.tsx: upstream's `shouldHandleAppLink` deep-link filter (pingdotgg#12002) alongside
  the fork's branded URL schemes.
- package.json version/license stamps stay on the fork's values (0.0.56,
  Apache-2.0); upstream's v0.0.41 prep does not apply here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 16, 2026
## What's Changed
* feat(mobile): add v2 preview store builds by @juliusmarminge in pingdotgg/t3code#11966
* fix(mobile): block incompatible server connections by @juliusmarminge in pingdotgg/t3code#11974
* fix(web): keep PR controls readable in narrow panels by @Bil0000 in pingdotgg/t3code#11962
* fix(server): block updates under legacy service launchers by @Gigioxx in pingdotgg/t3code#11940
* fix: reduce GitHub quota use with sharing enabled by @Bil0000 in pingdotgg/t3code#11888
* fix(usage): refresh limits when the tab opens by @Bil0000 in pingdotgg/t3code#11928
* fix(contracts): avoid Intl.Segmenter in monogram validation (Hermes crash) by @bompus in pingdotgg/t3code#11984
* feat(lint): extend Hermes API bans with a configurable API list by @juliusmarminge in pingdotgg/t3code#11982
* fix(server): reuse Git index metadata during checkpoint capture by @im-kvijay in pingdotgg/t3code#10792
* refactor: give project monograms their own icon variant by @juliusmarminge in pingdotgg/t3code#11993
* fix(clients): disable incompatible environments during discovery by @juliusmarminge in pingdotgg/t3code#11990
* fix(antigravity): stop health checks from filling the disk with _MEI folders by @t3dotgg in pingdotgg/t3code#12008
* fix(mobile): bare t3code:// links no longer reset navigation to Home by @SunkenInTime in pingdotgg/t3code#12002
* fix(server): keep Claude rewind when fork history length changes by @maria-rcks in pingdotgg/t3code#11954
* fix(mobile): use native toolbar search for licenses by @juliusmarminge in pingdotgg/t3code#12011

## New Contributors
* @bompus made their first contribution in pingdotgg/t3code#11984
* @im-kvijay made their first contribution in pingdotgg/t3code#10792

**Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260915.1780...v0.0.41-nightly.20260916.1795

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

Labels

size:S 10-29 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.

[Bug]: iOS: opening the bare t3code:// URL navigates to Home and drops the current thread

2 participants