Skip to content

fix(mobile): open terminal urls and file paths with desktop's link detection - #33964

Merged
AmoabaKelvin merged 5 commits into
mainfrom
mobile-terminal-links-parity
Oct 27, 2026
Merged

AmoabaKelvin merged 5 commits into
mainfrom
mobile-terminal-links-parity

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​163 $\color{#cf222e}{\Huge{\mathbf{−}}}$​421 $\color{#cf222e}{\Huge{\mathbf{−}}}$​258
Prod 56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​508 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1061 $\color{#cf222e}{\Huge{\mathbf{−}}}$​553

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

  • 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.
  • Phone taps (terminal Linux support #1, Add Ctrl+Click to open links in terminal #4). The WebView document calls the shared hit tests at the tapped cell. The tap order is unchanged: OSC 8, then URL, then file path.
    • 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)

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-terminal-links-parity branch from 36bc98e to 193e2f3 Compare October 27, 2026 01:08
@AmoabaKelvin
AmoabaKelvin marked this pull request as ready for review October 27, 2026 01:08
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0364bc62-3c23-4bb9-82f0-08881b016813
Commits

Reviewing files that changed from the base of the PR and between 31ae413 and fcad0bc.

Files selected for processing: 81
  • config/flaky-test-pattern-baseline.txt
  • mobile/src/session/TerminalPaneView.tsx
  • mobile/src/session/mobile-file-tap-open.test.ts
  • mobile/src/session/mobile-file-tap-open.ts
  • mobile/src/session/mobile-native-chat-open-file.test.ts
  • mobile/src/session/mobile-native-chat-open-file.ts
  • mobile/src/session/use-mobile-file-tap-handlers.test.ts
  • mobile/src/session/use-mobile-file-tap-handlers.ts
  • mobile/src/terminal/document/bottom-row-backdrop.test.ts
  • mobile/src/terminal/document/cell-geometry.ts
  • mobile/src/terminal/document/document-terminal-shape.ts
  • mobile/src/terminal/document/long-press-selection-drag.test.ts
  • mobile/src/terminal/document/osc-link-tap.ts
  • mobile/src/terminal/document/path-tap.ts
  • mobile/src/terminal/document/surface-tap.ts
  • mobile/src/terminal/document/url-tap.ts
  • mobile/src/terminal/terminal-file-url-tap.ts
  • mobile/src/terminal/terminal-path-tap.test.ts
  • mobile/src/terminal/terminal-path-tap.ts
  • mobile/src/terminal/terminal-webview-contract.ts
  • mobile/src/terminal/terminal-webview-notification-dispatch.ts
  • mobile/src/terminal/terminal-webview-tap-routing.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.ts
  • mobile/src/test-support/rpc-recording/adapters/file-tap-open-mount-adapters.ts
  • src/renderer/src/components/browser-pane/navigate/navigate-browser-page-url.ts
  • src/renderer/src/components/dashboard-popout/preview-terminal-links.ts
  • src/renderer/src/components/editor/editor-dropped-file-open.ts
  • src/renderer/src/components/native-chat/native-chat-file-link-existence.test.ts
  • src/renderer/src/components/native-chat/native-chat-file-link-existence.ts
  • src/renderer/src/components/native-chat/native-chat-file-link.ts
  • src/renderer/src/components/sidebar/comment-markdown-native-chat-file-links.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-absolute-file.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-path-validation.ts
  • src/renderer/src/components/terminal-pane/edge-wrapped-terminal-http-links.test.ts
  • src/renderer/src/components/terminal-pane/issue-4631-terminal-hover-link-provider.repro.test.ts
  • src/renderer/src/components/terminal-pane/repro-8832-url-next-line.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-hit-testing.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-target.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-target.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-handle-links.ts
  • src/renderer/src/components/terminal-pane/terminal-link-handlers.ts
  • src/renderer/src/components/terminal-pane/terminal-link-same-id-ssh-file-host.test.ts
  • src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.ts
  • src/renderer/src/components/terminal-pane/terminal-worktree-path-link.ts
  • src/renderer/src/components/terminal-pane/wrapped-terminal-http-link-provider.ts
  • src/renderer/src/lib/pane-manager/pane-dom-creation.ts
  • src/renderer/src/lib/user-opened-local-path.ts
  • src/shared/edge-wrapped-terminal-http-links.ts
  • src/shared/explicit-file-link-target.ts
  • src/shared/hard-wrapped-terminal-http-links.test.ts
  • src/shared/hard-wrapped-terminal-http-links.ts
  • src/shared/hard-wrapped-terminal-path-fragments.ts
  • src/shared/terminal-bare-file-link-detection.ts
  • src/shared/terminal-file-link-detection-ranges.ts
  • src/shared/terminal-file-uri-link.test.ts
  • src/shared/terminal-file-uri-link.ts
  • src/shared/terminal-http-link-limits.ts
  • src/shared/terminal-http-logical-lines.ts
  • src/shared/terminal-http-url-extraction.test.ts
  • src/shared/terminal-http-url-extraction.ts
  • src/shared/terminal-link-buffer-hit-testing.ts
  • src/shared/terminal-link-buffer.ts
  • src/shared/terminal-link-logical-line-deduplication.ts
  • src/shared/terminal-link-row-range.ts
  • src/shared/terminal-links-cjk.test.ts
  • src/shared/terminal-links-redos.test.ts
  • src/shared/terminal-links.test.ts
  • src/shared/terminal-links.ts
  • src/shared/terminal-markdown-file-links.test.ts
  • src/shared/terminal-markdown-file-links.ts
  • src/shared/terminal-osc-link-cells.ts
  • src/shared/terminal-osc-link-target.ts
  • src/shared/terminal-path-normalization.test.ts
  • src/shared/terminal-path-normalization.ts
  • src/shared/wrapped-terminal-link-ranges.test.ts
  • src/shared/wrapped-terminal-link-ranges.ts

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 98a1a973-1db6-4931-a213-4bda64ea59f4
Commits

Reviewing files that changed from the base of the PR and between ebe4b08 and 31ae413.

Files selected for processing: 81
  • config/flaky-test-pattern-baseline.txt
  • mobile/src/session/TerminalPaneView.tsx
  • mobile/src/session/mobile-file-tap-open.test.ts
  • mobile/src/session/mobile-file-tap-open.ts
  • mobile/src/session/mobile-native-chat-open-file.test.ts
  • mobile/src/session/mobile-native-chat-open-file.ts
  • mobile/src/session/use-mobile-file-tap-handlers.test.ts
  • mobile/src/session/use-mobile-file-tap-handlers.ts
  • mobile/src/terminal/document/bottom-row-backdrop.test.ts
  • mobile/src/terminal/document/cell-geometry.ts
  • mobile/src/terminal/document/document-terminal-shape.ts
  • mobile/src/terminal/document/long-press-selection-drag.test.ts
  • mobile/src/terminal/document/osc-link-tap.ts
  • mobile/src/terminal/document/path-tap.ts
  • mobile/src/terminal/document/surface-tap.ts
  • mobile/src/terminal/document/url-tap.ts
  • mobile/src/terminal/terminal-file-url-tap.ts
  • mobile/src/terminal/terminal-path-tap.test.ts
  • mobile/src/terminal/terminal-path-tap.ts
  • mobile/src/terminal/terminal-webview-contract.ts
  • mobile/src/terminal/terminal-webview-notification-dispatch.ts
  • mobile/src/terminal/terminal-webview-tap-routing.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.ts
  • mobile/src/test-support/rpc-recording/adapters/file-tap-open-mount-adapters.ts
  • src/renderer/src/components/browser-pane/navigate/navigate-browser-page-url.ts
  • src/renderer/src/components/dashboard-popout/preview-terminal-links.ts
  • src/renderer/src/components/editor/editor-dropped-file-open.ts
  • src/renderer/src/components/native-chat/native-chat-file-link-existence.test.ts
  • src/renderer/src/components/native-chat/native-chat-file-link-existence.ts
  • src/renderer/src/components/native-chat/native-chat-file-link.ts
  • src/renderer/src/components/sidebar/comment-markdown-native-chat-file-links.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-absolute-file.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-path-validation.ts
  • src/renderer/src/components/terminal-pane/edge-wrapped-terminal-http-links.test.ts
  • src/renderer/src/components/terminal-pane/issue-4631-terminal-hover-link-provider.repro.test.ts
  • src/renderer/src/components/terminal-pane/repro-8832-url-next-line.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-hit-testing.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-target.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-target.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-handle-links.ts
  • src/renderer/src/components/terminal-pane/terminal-link-handlers.ts
  • src/renderer/src/components/terminal-pane/terminal-link-same-id-ssh-file-host.test.ts
  • src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.ts
  • src/renderer/src/components/terminal-pane/terminal-worktree-path-link.ts
  • src/renderer/src/components/terminal-pane/wrapped-terminal-http-link-provider.ts
  • src/renderer/src/lib/pane-manager/pane-dom-creation.ts
  • src/renderer/src/lib/user-opened-local-path.ts
  • src/shared/edge-wrapped-terminal-http-links.ts
  • src/shared/explicit-file-link-target.ts
  • src/shared/hard-wrapped-terminal-http-links.test.ts
  • src/shared/hard-wrapped-terminal-http-links.ts
  • src/shared/hard-wrapped-terminal-path-fragments.ts
  • src/shared/terminal-bare-file-link-detection.ts
  • src/shared/terminal-file-link-detection-ranges.ts
  • src/shared/terminal-file-uri-link.test.ts
  • src/shared/terminal-file-uri-link.ts
  • src/shared/terminal-http-link-limits.ts
  • src/shared/terminal-http-logical-lines.ts
  • src/shared/terminal-http-url-extraction.test.ts
  • src/shared/terminal-http-url-extraction.ts
  • src/shared/terminal-link-buffer-hit-testing.ts
  • src/shared/terminal-link-buffer.ts
  • src/shared/terminal-link-logical-line-deduplication.ts
  • src/shared/terminal-link-row-range.ts
  • src/shared/terminal-links-cjk.test.ts
  • src/shared/terminal-links-redos.test.ts
  • src/shared/terminal-links.test.ts
  • src/shared/terminal-links.ts
  • src/shared/terminal-markdown-file-links.test.ts
  • src/shared/terminal-markdown-file-links.ts
  • src/shared/terminal-osc-link-cells.ts
  • src/shared/terminal-osc-link-target.ts
  • src/shared/terminal-path-normalization.test.ts
  • src/shared/terminal-path-normalization.ts
  • src/shared/wrapped-terminal-link-ranges.test.ts
  • src/shared/wrapped-terminal-link-ranges.ts
Files with no reviewable changes: 19
  • mobile/src/terminal/terminal-path-tap.test.ts
  • src/shared/terminal-bare-file-link-detection.ts
  • src/shared/terminal-file-uri-link.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • mobile/src/terminal/document/url-tap.ts
  • mobile/src/terminal/terminal-file-url-tap.ts
  • src/shared/terminal-links-redos.test.ts
  • src/shared/hard-wrapped-terminal-path-fragments.ts
  • src/shared/terminal-path-normalization.ts
  • src/shared/terminal-http-url-extraction.test.ts
  • src/shared/wrapped-terminal-link-ranges.test.ts
  • mobile/src/terminal/terminal-path-tap.ts
  • src/shared/terminal-link-logical-line-deduplication.ts
  • mobile/src/terminal/document/path-tap.ts
  • src/shared/terminal-markdown-file-links.test.ts
  • src/shared/terminal-http-link-limits.ts
  • src/shared/hard-wrapped-terminal-http-links.test.ts
  • src/shared/terminal-path-normalization.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.ts
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: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive 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 Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: mobile terminal URL and file-path detection now uses desktop's link detection.
Description check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

❤️ Share

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

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-terminal-links-parity branch 4 times, most recently from 7bab91a to ebe4b08 Compare October 27, 2026 03:24

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8cdce2cc-9139-4a6c-befd-5f8a96cd8e2a
Commits

Reviewing files that changed from the base of the PR and between 3347d47 and ebe4b08.

Files selected for processing: 157
  • config/flaky-test-pattern-baseline.txt
  • mobile/src/session/TerminalPaneView.tsx
  • mobile/src/session/mobile-file-tap-open.test.ts
  • mobile/src/session/mobile-file-tap-open.ts
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/session/mobile-native-chat-open-file.test.ts
  • mobile/src/session/mobile-native-chat-open-file.ts
  • mobile/src/session/mobile-terminal-tab-agent.test.ts
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/session/mobile-worker-takeover-send-sites.test.ts
  • mobile/src/session/terminal-field-submit-binding-send.test.tsx
  • mobile/src/session/use-mobile-file-tap-handlers.test.ts
  • mobile/src/session/use-mobile-file-tap-handlers.ts
  • mobile/src/session/use-mobile-session-tab-reconciliation.ts
  • mobile/src/session/use-mobile-session-terminal-input.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
  • mobile/src/session/use-mobile-session-terminal-subscription.ts
  • mobile/src/session/use-mobile-terminal-paste.test.ts
  • mobile/src/session/use-mobile-terminal-paste.ts
  • mobile/src/terminal/document/bottom-row-backdrop.test.ts
  • mobile/src/terminal/document/cell-geometry.ts
  • mobile/src/terminal/document/document-scope.ts
  • mobile/src/terminal/document/document-terminal-double.test-support.ts
  • mobile/src/terminal/document/document-terminal-shape.ts
  • mobile/src/terminal/document/host-message-router.ts
  • mobile/src/terminal/document/host-seams.test.ts
  • mobile/src/terminal/document/long-press-selection-drag.test.ts
  • mobile/src/terminal/document/mode-mirroring.ts
  • mobile/src/terminal/document/osc-link-tap.ts
  • mobile/src/terminal/document/path-tap.ts
  • mobile/src/terminal/document/query-reply.ts
  • mobile/src/terminal/document/selection-range.test.ts
  • mobile/src/terminal/document/selection-range.ts
  • mobile/src/terminal/document/selection-state-and-eviction.ts
  • mobile/src/terminal/document/surface-tap.ts
  • mobile/src/terminal/document/terminal-init.ts
  • mobile/src/terminal/document/terminal-theme.ts
  • mobile/src/terminal/document/url-tap.ts
  • mobile/src/terminal/mobile-terminal-query-reply.test.ts
  • mobile/src/terminal/mobile-terminal-query-reply.ts
  • mobile/src/terminal/terminal-accessory-keys.test.ts
  • mobile/src/terminal/terminal-accessory-keys.ts
  • mobile/src/terminal/terminal-file-url-tap.ts
  • mobile/src/terminal/terminal-grid-fit.ts
  • mobile/src/terminal/terminal-key-mode-encoding.test.ts
  • mobile/src/terminal/terminal-key-mode-encoding.ts
  • mobile/src/terminal/terminal-path-tap.test.ts
  • mobile/src/terminal/terminal-path-tap.ts
  • mobile/src/terminal/terminal-webview-contract.ts
  • mobile/src/terminal/terminal-webview-messages.ts
  • mobile/src/terminal/terminal-webview-notification-dispatch.ts
  • mobile/src/terminal/terminal-webview-tap-routing.test.ts
  • mobile/src/terminal/terminal-webview-theme.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.ts
  • mobile/src/terminal/use-terminal-webview-controller.ts
  • mobile/src/terminal/worker-terminal-takeover-report.test.ts
  • mobile/src/terminal/worker-terminal-takeover-report.ts
  • mobile/src/test-support/rpc-recording/adapters/file-tap-open-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/terminal-mount-adapters.ts
  • src/main/runtime/rpc/methods/terminal/terminal-send-method.ts
  • src/main/runtime/rpc/terminal-send.test.ts
  • src/main/runtime/terminal/output/headless-terminal-state.ts
  • src/renderer/src/components/browser-pane/navigate/navigate-browser-page-url.ts
  • src/renderer/src/components/dashboard-popout/preview-terminal-links.ts
  • src/renderer/src/components/dashboard-popout/preview-terminal-options.ts
  • src/renderer/src/components/editor/editor-dropped-file-open.ts
  • src/renderer/src/components/native-chat/native-chat-file-link-existence.test.ts
  • src/renderer/src/components/native-chat/native-chat-file-link-existence.ts
  • src/renderer/src/components/native-chat/native-chat-file-link.ts
  • src/renderer/src/components/plain-ssh-terminal/PlainSshTerminalView.tsx
  • src/renderer/src/components/settings/TerminalAdvancedSection.tsx
  • src/renderer/src/components/settings/TerminalContrastSetting.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/sidebar/comment-markdown-native-chat-file-links.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-absolute-file.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-path-validation.ts
  • src/renderer/src/components/terminal-pane/edge-wrapped-terminal-http-links.test.ts
  • src/renderer/src/components/terminal-pane/issue-4631-terminal-hover-link-provider.repro.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/apply-reattach-payload.ts
  • src/renderer/src/components/terminal-pane/pty-connection/hidden-output-seq-and-skip.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-context.test.ts
  • src/renderer/src/components/terminal-pane/repro-8832-url-next-line.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-hit-testing.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-target.test.ts
  • src/renderer/src/components/terminal-pane/terminal-file-link-target.ts
  • src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-handle-links.ts
  • src/renderer/src/components/terminal-pane/terminal-keyboard-runtime.ts
  • src/renderer/src/components/terminal-pane/terminal-link-handlers.ts
  • src/renderer/src/components/terminal-pane/terminal-link-same-id-ssh-file-host.test.ts
  • src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts
  • src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.ts
  • src/renderer/src/components/terminal-pane/terminal-worktree-path-link.ts
  • src/renderer/src/components/terminal-pane/wrapped-terminal-http-link-provider.ts
  • src/renderer/src/lib/agent-status.ts
  • src/renderer/src/lib/open-tab-occupant-agent.ts
  • src/renderer/src/lib/pane-manager/pane-dom-creation.ts
  • src/renderer/src/lib/pane-manager/pane-terminal-options.ts
  • src/renderer/src/lib/terminal-theme.ts
  • src/renderer/src/lib/use-tab-agent-opencode-native-title.test.ts
  • src/renderer/src/lib/use-tab-agent-process-signals.test.ts
  • src/renderer/src/lib/use-tab-agent-sleeping-session.test.ts
  • src/renderer/src/lib/use-tab-agent.test.ts
  • src/renderer/src/lib/use-tab-agent.ts
  • src/renderer/src/lib/user-opened-local-path.ts
  • src/renderer/src/lib/worker-terminal-takeover-report.test.ts
  • src/renderer/src/lib/worker-terminal-takeover-report.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-terminal-theme.ts
  • src/shared/agent-type-icon-agent.ts
  • src/shared/edge-wrapped-terminal-http-links.ts
  • src/shared/explicit-file-link-target.ts
  • src/shared/hard-wrapped-terminal-http-links.test.ts
  • src/shared/hard-wrapped-terminal-http-links.ts
  • src/shared/hard-wrapped-terminal-path-fragments.ts
  • src/shared/tab-agent-from-signals-pi-identity.test.ts
  • src/shared/tab-agent-from-signals.ts
  • src/shared/tab-agent-identity-decision-table.test.ts
  • src/shared/terminal-bare-file-link-detection.ts
  • src/shared/terminal-contrast-correction.test.ts
  • src/shared/terminal-contrast-correction.ts
  • src/shared/terminal-file-link-detection-ranges.ts
  • src/shared/terminal-file-uri-link.test.ts
  • src/shared/terminal-file-uri-link.ts
  • src/shared/terminal-http-link-limits.ts
  • src/shared/terminal-http-logical-lines.ts
  • src/shared/terminal-http-url-extraction.test.ts
  • src/shared/terminal-http-url-extraction.ts
  • src/shared/terminal-kitty-keyboard-mode-tracker.ts
  • src/shared/terminal-link-buffer-hit-testing.ts
  • src/shared/terminal-link-buffer.ts
  • src/shared/terminal-link-logical-line-deduplication.ts
  • src/shared/terminal-link-row-range.ts
  • src/shared/terminal-links-cjk.test.ts
  • src/shared/terminal-links-redos.test.ts
  • src/shared/terminal-links.test.ts
  • src/shared/terminal-links.ts
  • src/shared/terminal-markdown-file-links.test.ts
  • src/shared/terminal-markdown-file-links.ts
  • src/shared/terminal-modified-enter-encoding.ts
  • src/shared/terminal-osc-link-cells.ts
  • src/shared/terminal-osc-link-target.ts
  • src/shared/terminal-path-normalization.test.ts
  • src/shared/terminal-path-normalization.ts
  • src/shared/terminal-title-contrast.ts
  • src/shared/terminal-unicode-provider.ts
  • src/shared/terminal-word-separator.ts
  • src/shared/worker-terminal-takeover-report-gate.test.ts
  • src/shared/worker-terminal-takeover-report-gate.ts
  • src/shared/wrapped-terminal-link-ranges.test.ts
  • src/shared/wrapped-terminal-link-ranges.ts
Files with no reviewable changes: 8
  • mobile/src/terminal/terminal-path-tap.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • src/renderer/src/lib/worker-terminal-takeover-report.test.ts
  • mobile/src/terminal/document/url-tap.ts
  • mobile/src/terminal/terminal-file-url-tap.ts
  • mobile/src/terminal/terminal-webview-url-tap.ts
  • mobile/src/terminal/terminal-path-tap.ts
  • mobile/src/terminal/document/path-tap.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

Comment on lines +113 to +123
const readings = await mapWithConcurrency(
options.candidates,
FILE_TAP_RESOLVE_CONCURRENCY,
async (target) => ({
target,
// Why: a reading the host cannot answer must not hide a sibling.
resolved: existingFileTapResolution(
await requestFileTapResolution(options, target.pathText).catch(() => null)
)
})
)

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.

Minor · Stability & Availability · Quick win

Supported by static analysis

Script executed:

rg -n 'fileTapPathResolve|findTerminalFileLinksAtBufferPosition|extractTerminalFileLinks|FILE_TAP_RESOLVE_CONCURRENCY' mobile/src/session/mobile-file-tap-open.ts mobile/src/terminal/document/surface-tap.ts src/shared/terminal-link-buffer-hit-testing.ts mobile/src/session
sed -n '20,85p' src/shared/terminal-link-buffer-hit-testing.ts
sed -n '60,105p' mobile/src/terminal/document/surface-tap.ts

Repository: stablyai/orca

Length of output: 4499


Script executed:

set -o pipefail
printf '%s\n' '--- mobile-file-tap-open.ts ---'
nl -ba mobile/src/session/mobile-file-tap-open.ts | sed -n '1,180p'
printf '%s\n' '--- surface-tap.ts ---'
nl -ba mobile/src/terminal/document/surface-tap.ts | sed -n '1,130p'
printf '%s\n' '--- hit-testing module ---'
nl -ba src/shared/terminal-link-buffer-hit-testing.ts | sed -n '1,180p'
printf '%s\n' '--- resolution binding and definitions ---'
rg -n -F --glob '*.ts' -e 'terminalArtifactPathResolve' -e 'fileTapPathResolve' -e 'function mapWithConcurrency' -e 'timeoutMs' src mobile | sed -n '1,240p'
printf '%s\n' '--- bound operation files ---'
nl -ba mobile/src/files/mobile-file-preview-operations.ts | sed -n '1,220p'
nl -ba src/shared/map-with-concurrency.ts | sed -n '1,140p'

Repository: stablyai/orca

Length of output: 44796


Script executed:

set -o pipefail
printf '%s\n' '--- rpc operation definitions ---'
rg -n -F --glob '*.ts' -e 'export function bindDeferredRpcOperation' -e 'function bindDeferredRpcOperation' -e 'export function defineRpcOperation' -e 'function defineRpcOperation' -e 'class DeferredRpc' -e 'timeoutMs' mobile/src/transport src/shared | sed -n '1,220p'
printf '%s\n' '--- rpc operation files ---'
rg --files mobile/src/transport src/shared | rg 'rpc-(operation|request|sender)|deferred|transport'
printf '%s\n' '--- candidate generation and extraction ---'
rg -n -F --glob '*.ts' -e 'buildHardWrappedPathLogicalLineCandidates' -e 'buildWrappedLogicalLine' -e 'extractTerminalFileLinkCandidates' src/shared
nl -ba src/shared/wrapped-terminal-link-ranges.ts | sed -n '1,280p'
nl -ba src/shared/terminal-links.ts | sed -n '1,260p'

Repository: stablyai/orca

Length of output: 41963


Script executed:

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.

Comment on lines +72 to +73
const range = rangeForParsedFileLink(logicalLine, parsed.startIndex, parsed.endIndex)
if (!range || !rangeContainsBufferPosition(range, position, terminalColumns)) {

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.

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)

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-terminal-links-parity branch from ebe4b08 to 31ae413 Compare October 27, 2026 04:31
… 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.
The xterm buffer subset gets its own module, and the text-only OSC resolver goes now that the router uses findExactTerminalFileLink.
@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-terminal-links-parity branch from 31ae413 to fcad0bc Compare October 27, 2026 05:07
@AmoabaKelvin
AmoabaKelvin merged commit f719d0f into main Oct 27, 2026
55 checks passed
audichuang added a commit to audichuang/orca that referenced this pull request Oct 28, 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.
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.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 2, 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 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant