You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): open terminal urls and file paths with desktop's link detection - #33964
Tapping a link or file path in the phone's terminal now finds it the same way desktop does. Before, the phone only looked at the one row you tapped, so a long URL that wrapped onto the next row opened cut off, or not at all, and several kinds of paths desktop links were ignored.
What Changed
Desktop link detection moved to src/shared (git mv, tests moved with it). It covers wrapped-row HTTP links (logical lines across soft and hard wraps, framed and edge-wrapped rows, URL extraction and limits) and file links (terminal-links, markdown destinations, file URIs, bare names like Makefile, explicit-file-link-target, terminal-path-normalization). The moved code reads a small structural buffer-line type instead of xterm's class.
New src/shared/terminal-link-buffer-hit-testing.ts. It holds the hit tests desktop's click handlers kept private: "which URL / which file candidates contain this cell". Desktop's URL and file click handlers now call it.
New src/shared/terminal-osc-link-target.ts. It decides what an OSC 8 link points at (URL, file: URL or path). Desktop's handleOscLink keeps its cwd and Windows checks around it.
Before: a 120-character URL in a phone-width terminal opened cut at the row edge, and tapping row 2 opened nothing. src/日本語/ファイル.ts:12, Makefile, [notes](docs/my-notes.md) and file:///tmp/a(1).txt were missed or mis-parsed, and smb:// links were sent to the host as paths.
Now: these resolve as on desktop.
Several readings of one tap. Like desktop, a tap can yield more than one reading (hard-wrap joins, line-ending variants). The phone checks them through the existing files.resolveTerminalPath RPC, 8 at a time with the shared mapWithConcurrency, and opens the longest that exists, as desktop does. No new host RPC fields.
Deleted mobile copies.document/url-tap.ts, document/path-tap.ts, terminal-path-tap.ts, terminal-file-url-tap.ts, the third file-URL resolver inside document/osc-link-tap.ts, most of terminal-webview-url-tap.ts, and the tests that only pinned them.
Why
The phone had three copies of the path and file-URL rules and a single-row URL matcher. All of them had fallen behind desktop (#23322, #32056). The detection is pure string and buffer code, so it moves to src/shared and both apps call it.
Linked Issue
Part of the mobile/desktop parity audit
Visual Proof
N/A: this adopts desktop's existing behavior. The rules are desktop's wrapped HTTP link provider, extractTerminalFileLinks and its click hit-testing, now under src/shared.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Focused tests:
Mobile src/terminal, src/session, and the rpc-recording goldens.
The moved shared tests and all of desktop terminal-pane.
New tests:
A tap on row 2 of a soft-wrapped URL opens the full URL.
The longest existing candidate wins.
The UNC authority of an OSC 8 file: link is kept.
A 210-candidate tap stays under the page bridge's request cap.
No device run for this fleet.
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Mobile behaviors removed:
Plain-text file://otherhost/... and file://server/share/... are no longer tappable. Desktop rejects non-localhost hosts in plain text too, and the phone used to send //host/path to the host. OSC 8 file: links keep their UNC host, so the host decides, as desktop does on Windows.
%3A in a file:// path is decoded before :line:col parsing, as on desktop, so file:///tmp/report%3A8%3A2 now means /tmp/report line 8 col 2.
OSC 8 http links open the normalized URL, not the raw text.
Plain-text file:// taps no longer have their own step ahead of OSC 8 URLs.
Not done, and why:
Desktop opens Windows paths from OSC 8 only when its cwd is a Windows path. The phone can't check that, so it sends Windows-looking paths to the host to decide.
When no reading exists, the phone still opens nothing silently; desktop shows the shortest path in an error.
A tap with many readings takes about N/8 round trips. Desktop batches them in one existence request, but files.pathsExist only covers worktree paths, so batching would need a wire change.
Chrome 74 guard: the moved code avoids .at()/toReversed() because the WebView floor lacks them, but no test scans the document bundle for such calls. That's worth a follow-up.
No host or wire changes; mixed phone/host versions are unaffected.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Files skipped from review as they are similar to previous changes: 1
mobile/src/terminal/document/cell-geometry.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Walkthrough
Terminal link detection now uses shared buffer-position hit testing and OSC target classification. Mobile terminal taps pass parsed file-link candidates through webview and session callbacks. The mobile opener resolves candidates with concurrency capped at eight, then uses the longest existing non-directory path. Shared structural buffer types replace xterm-specific parameter types in link helpers. Renderer consumers use shared implementations, and several mobile-local detector modules and their tests are removed.
Priority: Normal
Merge Risk: Low · previous review 31ae4
Unusual file-link taps may consume a tap on blank cells or take a long time to open when many path checks stall. These bounded cases merit owner awareness, but do not establish a broad failure that blocks merging.
Pre-merge checks: 4 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 18.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: mobile terminal URL and file-path detection now uses desktop's link detection.
Description check
The description is mostly complete. It explains the user impact, implementation, rationale, testing, behavior changes, limitations, and compatibility considerations. It does not provide an actual link…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is mostly complete. It explains the user impact, implementation, rationale, testing, behavior changes, limitations, and compatibility considerations. It does not provide an actual linked issue or report full lint, typecheck, test, and build results, but these omissions do not make the description largely incomplete.
Full details: Docstring Coverage
Explanation
Docstring coverage is 18.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 32 functions across 50 files. (12 skipped: 1 unsupported, 11 over the file limit.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 2
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🛠️ Fix failing CI checks: 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
set -o pipefail
printf'%s\n''--- rpc-operation definition and binder ---'
nl -ba mobile/src/transport/rpc-operation.ts | sed -n '35,115p;235,315p'printf'%s\n''--- request tracker ---'
nl -ba mobile/src/transport/rpc-client-request-tracker.ts | sed -n '1,110p'printf'%s\n''--- hard-wrap remainder ---'
nl -ba src/shared/wrapped-terminal-link-ranges.ts | sed -n '192,360p'printf'%s\n''--- file-link extraction tail ---'
nl -ba src/shared/terminal-links.ts | sed -n '260,350p'
Repository: stablyai/orca
Length of output: 20856
Script executed:
set -o pipefail
nl -ba mobile/src/transport/rpc-request-budget.ts | sed -n '1,100p'
nl -ba mobile/src/transport/rpc-client-request-deadline.test.ts | sed -n '90,185p'
Repository: stablyai/orca
Length of output: 5174
Limit the total wait for candidate resolution.
A mobile tap can produce hundreds of distinct candidates. Each post-connect fileTapPathResolve.request is limited to 10 seconds, but mapWithConcurrency waits for every candidate before selecting the longest existing path.
With 211 candidates and eight workers, a connected session in which all requests hang can take about 27 ten-second waves, or 270 seconds. If only some requests hang, the delay depends on their number and scheduling. A prompt result does not open the file early.
Add a total deadline. At the deadline, select the longest existing reading completed by that time and ignore later responses. This preserves longest-candidate selection among completed readings, but a longer candidate that completes later will be skipped. Do not open the first existing reading.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Limit file-link hits to the tapped row.
For a path that continues on another row, rangeForParsedFileLink spans the blank cells after the path text on the first row. A tap on those cells can open a file instead of reaching the terminal. Use rangeForParsedLinkOnRow for the hit test, as the HTTP path does. (raw.githubusercontent.com)
… detection
Desktop's terminal URL and file-link detectors move to src/shared and the phone's
WebView document calls them, replacing its single-row copies. File taps carry every
reading of the tapped text so the phone opens the longest one the host finds, as
desktop does.
A tap inside a run of path rows yields hundreds of hard-wrap guesses; firing them all at once overflowed the page bridge's pending-request cap and the real path was never checked.
… plumbing
Desktop and the phone now read OSC 8 targets through one shared classifier. Terminal file taps carry only their candidate list, deduped by path, and desktop checks OSC overlap only for candidates it can resolve.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
nplez1
added a commit
to nplez1/orca
that referenced
this pull request
Oct 28, 2026
…n scan
The merge left `locales/en.json` and the fork overlay carrying entries the merged
source no longer references — mostly test-harness fixtures for the suites
upstream retired in stablyai#33770/stablyai#34156/stablyai#34161/stablyai#34234 — and nine English entries whose
source copy moved on, so the catalog still rendered the old sentence.
198 orphan keys removed from every locale catalog, the fork overlay and
`locale-ko-key-overrides.json`; the nine drifted entries now carry the source's
copy, each differing placeholder string moved to its own key
(`AccountsPane.aa4de4475b` for the fork's "Gemini CLI (legacy)" heading), and
the translations of the reworded sentences retired so they fall back to English
rather than render a stale sentence with the wrong placeholders.
`sync:localization-runtime-catalog` then regenerated the runtime subset.
Also fixes the post-sync deletion scan: it disabled rename detection on our
side only, so an upstream *rename* of a fork-untouched file read as a fork-only
deletion with a lost export (`terminal-file-link-detection-ranges.ts`, renamed
by stablyai#33964). Both sides now run with `--no-renames`.
Verified: post-sync PASS (11 checks), pnpm tc clean on node/web/cli, oxlint
clean, identity sweep 0 fixable.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 7, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 10, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 10, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 13, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 14, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 21, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream stablyai#33964 moved the file-name list that happened to contain README out of the renderer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Tapping a link or file path in the phone's terminal now finds it the same way desktop does. Before, the phone only looked at the one row you tapped, so a long URL that wrapped onto the next row opened cut off, or not at all, and several kinds of paths desktop links were ignored.
What Changed
src/shared(git mv, tests moved with it). It covers wrapped-row HTTP links (logical lines across soft and hard wraps, framed and edge-wrapped rows, URL extraction and limits) and file links (terminal-links, markdown destinations, file URIs, bare names likeMakefile,explicit-file-link-target,terminal-path-normalization). The moved code reads a small structural buffer-line type instead of xterm's class.src/shared/terminal-link-buffer-hit-testing.ts. It holds the hit tests desktop's click handlers kept private: "which URL / which file candidates contain this cell". Desktop's URL and file click handlers now call it.src/shared/terminal-osc-link-target.ts. It decides what an OSC 8 link points at (URL,file:URL or path). Desktop'shandleOscLinkkeeps its cwd and Windows checks around it.src/日本語/ファイル.ts:12,Makefile,[notes](docs/my-notes.md)andfile:///tmp/a(1).txtwere missed or mis-parsed, andsmb://links were sent to the host as paths.files.resolveTerminalPathRPC, 8 at a time with the sharedmapWithConcurrency, and opens the longest that exists, as desktop does. No new host RPC fields.document/url-tap.ts,document/path-tap.ts,terminal-path-tap.ts,terminal-file-url-tap.ts, the third file-URL resolver insidedocument/osc-link-tap.ts, most ofterminal-webview-url-tap.ts, and the tests that only pinned them.Why
The phone had three copies of the path and file-URL rules and a single-row URL matcher. All of them had fallen behind desktop (#23322, #32056). The detection is pure string and buffer code, so it moves to
src/sharedand both apps call it.Linked Issue
Part of the mobile/desktop parity audit
Visual Proof
N/A: this adopts desktop's existing behavior. The rules are desktop's wrapped HTTP link provider,
extractTerminalFileLinksand its click hit-testing, now undersrc/shared.Testing
Focused tests:
src/terminal,src/session, and the rpc-recording goldens.terminal-pane.New tests:
file:link is kept.No device run for this fleet.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Mobile behaviors removed:
file://otherhost/...andfile://server/share/...are no longer tappable. Desktop rejects non-localhost hosts in plain text too, and the phone used to send//host/pathto the host. OSC 8file:links keep their UNC host, so the host decides, as desktop does on Windows.%3Ain afile://path is decoded before:line:colparsing, as on desktop, sofile:///tmp/report%3A8%3A2now means/tmp/reportline 8 col 2.file://taps no longer have their own step ahead of OSC 8 URLs.Not done, and why:
files.pathsExistonly covers worktree paths, so batching would need a wire change..at()/toReversed()because the WebView floor lacks them, but no test scans the document bundle for such calls. That's worth a follow-up.No host or wire changes; mixed phone/host versions are unaffected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)