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): explain file refusals and copy full paths - #37762
A refused terminal file tap now says why it could not open. Markdown Copy Path copies the full host path when available.
Held for Kelvin's approval. Full-path copying reverses the deliberate workspace-relative behavior shipped in #32748, including its footer action.
What Changed
Terminal taps reuse chat's existing failure feedback, with the host's reason or "Couldn't open " for older hosts. Ordinary unresolved paths stay silent, a successful sibling candidate takes precedence over refusals, and the session's existing navigation generation suppresses stale feedback and opening after tab changes or retained-route blur, including a return to the original source.
Both existing Markdown Copy Path actions prefer filePath and fall back to relativePath. For example, docs/notes.md becomes /srv/project/docs/notes.md. Host paths are copied unchanged, including Windows drive and UNC paths.
Why
The shared file-tap opener discarded the host's refusal while resolving candidates, and terminal taps supplied no failure callback. Preserving the result until candidate selection lets terminal and chat share feedback without announcing ordinary terminal misses. Path copying stays in the existing shared action, so the tab menu and footer agree.
Part of #32979, only refusal feedback. Wrapped-path reconstruction, external-file permissions and the confirmation sheet remain outside this change. #32979 remains open. #32235 is already closed; no community branches were changed.
Visual Proof
The real mobile session route rendered at 390×844 in a hidden Electron window, using fixture host replies at the native bridge. The terminal path was tapped on the canvas, and the Markdown tab menu was opened with a long press. Both captures had no page errors.
The clipboard bridge received docs/notes.md before and /srv/project/docs/notes.md after.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Reproduced on fresh main dc7cd7bebbf9eb45d79edc89f3f836c75be78dea: six focused failures, covering missing refusal feedback and relative-path copying. 50 focused opener/handler/reader/navigation tests and 27 neighboring Markdown/chat tests pass with at most two workers and background launch enabled. New navigation round-trip and selected-candidate regressions first failed on the initial patch and then passed. Changed-file lint, formatting, diff checks and React Doctor pass; all 15 changed-file checks passed against origin/main immediately before push. Ten focused RPC matrix/scenario checks also passed for the dependent recording adapters.
Exact head feb3a838977e882ba346c471ee8e5fbd866cadb5 is green: PR checks passed and Mobile verify. Mobile verify includes successful production and test typechecks, covering the final attachment-fixture correction.
Try on mobile:
In an SSH workspace terminal, print and tap /tmp/report.md outside the workspace. The toast should say that files outside an SSH workspace cannot be opened from another device. An ordinary nonexistent path inside the workspace should stay silent.
Long-press an open Markdown tab, choose Copy Path, and paste it. Expect the full host path. The footer's existing Copy path action should copy the same string.
Start a file tap on a slow connection, then switch tabs or leave the session before the response. No late failure should appear on the destination screen.
Verified on macOS through hidden Electron CDP and fixture host replies. Physical iOS/Android devices, Windows hosts and a live SSH connection were not exercised.
Risk
Level: Medium
The full-path preference changes an intentional copy policy, so this PR must stay unmerged until approved. A wrong failure classification could show feedback for unresolved guesses or hide a real refusal. The regression tests cover those cases, sibling successes and delayed navigation. No wire, grant, saved-state or path normalization changes. A revert restores the earlier behavior.
AI Disclosure
Review
Two rounds of two independent read-only Codex peers. Round one found navigation round trips reviving late feedback and incorrect fallback path text for a selected candidate; both were repaired and reproduced with failing regressions before the fix. In round two, one reviewer reported no findings and the other caught an attachment-preview test caller missing the new required generation getter. That test caller was corrected after round two; no third review was requested under the two-round cap. The correction was validated locally and by exact-head Mobile verify, including the test typecheck ratchet; it did not receive another independent Codex peer review. No findings were rejected. Test-audit and a direct simplification pass are complete. CodeRabbit's exact-head review generated no actionable findings; there are no unresolved review threads or maintainer requests.
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
Hold the whole PR. No merge or deployment. No confirmation sheet, new menu action, access expansion, or closure of the #32979 umbrella.
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)
I stated the risk: what could break, for whom, and how to back it out
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)
No actionable comments were generated in the recent review.
Walkthrough
File-open failures now include a kind, path, and optional message. Terminal and native-chat tap handlers use navigation-generation checks when reporting failures. Markdown path copying now prefers the host path and falls back to the relative path.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to feb3a
The reviewed changes are ready for merge after the required approval and normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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 two primary changes: explaining mobile file refusals and copying full paths.
Linked Issues check
The PR satisfies the active coding requirements in [#37748] and [#32230]. mobile-file-tap-open.ts preserves failed resolution responses, reports host error text, uses a path fallback when no message…
Out of Scope Changes check
The changes stay within the linked issue scope. The activation-generation updates, shared handler updates, and test changes support refusal feedback and stale-result suppression. The Markdown action c…
Description check
The description follows the repository template closely: it has ELI5, What Changed, Why, Linked Issue (Fixes #37748 and #32230), Visual Proof (before/after images and videos), Testing with manual and …
Full details: Linked Issues check
Explanation
The PR satisfies the active coding requirements in [#37748] and [#32230]. mobile-file-tap-open.ts preserves failed resolution responses, reports host error text, uses a path fallback when no message exists, keeps ordinary unresolved paths silent, and selects a successful sibling before reporting refusal. Activation state includes navigation generations, and the updated handler tests cover stale feedback and navigation cases. use-mobile-session-markdown-actions.ts copies tab.filePath and falls back to tab.relativePath, with tests covering normal, Windows, and UNC paths.
Full details: Out of Scope Changes check
Explanation
The changes stay within the linked issue scope. The activation-generation updates, shared handler updates, and test changes support refusal feedback and stale-result suppression. The Markdown action change implements [#32230]. The PR does not add the separate [#32979] confirmation sheet or other umbrella work described in the PR context.
Full details: Description check
Explanation
The description follows the repository template closely: it has ELI5, What Changed, Why, Linked Issue (Fixes #37748 and #32230), Visual Proof (before/after images and videos), Testing with manual and automated checkboxes, Risk with a Medium level and a revert path, Review, Agent skill boundary, Notes, and Checklist. Gaps: the AI Disclosure section is empty. The template says to fill it in for non-team contributors, and the author's status is not stated. The final checklist item (pnpm lint, typecheck, test, build) is unchecked. The Testing section lists targeted test runs but not the full pnpm suite. Those gaps are minor, so the description is mostly complete.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 9 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
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; 8 remain after this review.
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
A refused terminal file tap now says why it could not open. Markdown Copy Path copies the full host path when available.
Held for Kelvin's approval. Full-path copying reverses the deliberate workspace-relative behavior shipped in #32748, including its footer action.
What Changed
Terminal taps reuse chat's existing failure feedback, with the host's reason or "Couldn't open " for older hosts. Ordinary unresolved paths stay silent, a successful sibling candidate takes precedence over refusals, and the session's existing navigation generation suppresses stale feedback and opening after tab changes or retained-route blur, including a return to the original source.
Both existing Markdown Copy Path actions prefer
filePathand fall back torelativePath. For example,docs/notes.mdbecomes/srv/project/docs/notes.md. Host paths are copied unchanged, including Windows drive and UNC paths.Why
The shared file-tap opener discarded the host's refusal while resolving candidates, and terminal taps supplied no failure callback. Preserving the result until candidate selection lets terminal and chat share feedback without announcing ordinary terminal misses. Path copying stays in the existing shared action, so the tab menu and footer agree.
Linked Issue
Fixes #37748
Fixes #32230
Part of #32979, only refusal feedback. Wrapped-path reconstruction, external-file permissions and the confirmation sheet remain outside this change. #32979 remains open. #32235 is already closed; no community branches were changed.
Visual Proof
The real mobile session route rendered at 390×844 in a hidden Electron window, using fixture host replies at the native bridge. The terminal path was tapped on the canvas, and the Markdown tab menu was opened with a long press. Both captures had no page errors.
Before interaction video:
https://github.com/user-attachments/assets/58862b86-ec22-4711-ae64-71b706ef6008
After interaction video:
https://github.com/user-attachments/assets/471bc3a7-2142-4ef4-8c59-bec8c95c45de
The clipboard bridge received
docs/notes.mdbefore and/srv/project/docs/notes.mdafter.Testing
Reproduced on fresh main
dc7cd7bebbf9eb45d79edc89f3f836c75be78dea: six focused failures, covering missing refusal feedback and relative-path copying. 50 focused opener/handler/reader/navigation tests and 27 neighboring Markdown/chat tests pass with at most two workers and background launch enabled. New navigation round-trip and selected-candidate regressions first failed on the initial patch and then passed. Changed-file lint, formatting, diff checks and React Doctor pass; all 15 changed-file checks passed against origin/main immediately before push. Ten focused RPC matrix/scenario checks also passed for the dependent recording adapters.Exact head
feb3a838977e882ba346c471ee8e5fbd866cadb5is green: PR checks passed and Mobile verify. Mobile verify includes successful production and test typechecks, covering the final attachment-fixture correction.Try on mobile:
/tmp/report.mdoutside the workspace. The toast should say that files outside an SSH workspace cannot be opened from another device. An ordinary nonexistent path inside the workspace should stay silent.Worktree:
/Users/kelvinamoaba/orca/workspaces/orca/mw3-b2-terminal-dVerified on macOS through hidden Electron CDP and fixture host replies. Physical iOS/Android devices, Windows hosts and a live SSH connection were not exercised.
Risk
Level: Medium
The full-path preference changes an intentional copy policy, so this PR must stay unmerged until approved. A wrong failure classification could show feedback for unresolved guesses or hide a real refusal. The regression tests cover those cases, sibling successes and delayed navigation. No wire, grant, saved-state or path normalization changes. A revert restores the earlier behavior.
AI Disclosure
Review
Two rounds of two independent read-only Codex peers. Round one found navigation round trips reviving late feedback and incorrect fallback path text for a selected candidate; both were repaired and reproduced with failing regressions before the fix. In round two, one reviewer reported no findings and the other caught an attachment-preview test caller missing the new required generation getter. That test caller was corrected after round two; no third review was requested under the two-round cap. The correction was validated locally and by exact-head Mobile verify, including the test typecheck ratchet; it did not receive another independent Codex peer review. No findings were rejected. Test-audit and a direct simplification pass are complete. CodeRabbit's exact-head review generated no actionable findings; there are no unresolved review threads or maintainer requests.
Agent skill upstream boundary
Notes
Hold the whole PR. No merge or deployment. No confirmation sheet, new menu action, access expansion, or closure of the #32979 umbrella.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)