Repository navigation
Conversation
There was a problem hiding this comment.
ℹ️ No critical issues — the two fixes are correct and well-tested. One related surface is left unaddressed, noted below; nothing blocks merge.
Reviewed changes
- Shared refusal recognizer — new
mobile/src/transport/renderer-unavailable-refusal.tsmatches both theruntime_error+renderer_unavailablemessage shape current hosts send and a barerenderer_unavailablecode, andmobile-markdown-disk-fallback.tsnow delegates to it. - Session changed-file open — the diff-tab / edit-tab fallback moved out of
use-mobile-source-control-openers.tsinto a testablechooseSessionDiffOpen+openSessionChangedFile, with a newdevice-reviewoutcome that routes to the phone's review screen (git.diff) when the host refuses for having no renderer. - Terminal / chat file tap —
mobile-file-tap-open.tsnow pushes thesource: 'worktree'file-preview route whenfiles.openis refused withrenderer_unavailable, instead of reporting the open as failed.
I verified the extraction is behavior-preserving for every case the old inline code could reach (request order, which operation interprets, error wrapping, mounted/openingPathRef handling), and that the recognizer matches the wire shape the host actually produces (orca-runtime-file-commands.ts throws new Error('renderer_unavailable'); mapRuntimeError flattens it to code: 'runtime_error'). No reachable reply is misrouted: renderer_unavailable cannot collide with the forbidden/method_not_found edit-tab predicate, and sibling-worktree / line-column taps are intercepted earlier.
ℹ️ Open in Session still surfaces the raw renderer refusal on a headless host
This PR newly makes the review screen reachable on a rendererless host (the device-review route), and one action on that screen still shows the same raw renderer_unavailable the PR is removing elsewhere. openInSession calls files.openDiff and interprets the reply without the fallback, so tapping Open in Session on a headless host sets the action error to renderer_unavailable. The other unchanged caller (use-mobile-session-content-create-actions.ts:71, create markdown note) is already called out as out of scope in the PR body, so this may be intentional too — raising it only so the coverage decision is explicit.
Technical details
# `openInSession` has no renderer fallback
## Affected sites
- `mobile/src/session/use-mobile-diff-review-interactions.ts:188-198` — `openInSession` requests `files.openDiff` and calls `sourceFileDiffOpenRun.interpret` directly; a `renderer_unavailable` refusal reaches `setActionError` verbatim.
- `mobile/src/components/MobileDiffReviewDrawers.tsx:143-148` — the "Open in Session" action is enabled whenever there is a non-branch current item, so it is tappable on the review screen the new fallback opens.
## Required outcome
- Decide the headless behavior for this action: hide/disable it, route through the new `isRendererUnavailableRefusal`, or explicitly leave it failing. No wire change is involved either way.
## Open questions for the human (optional)
- Is "Open in Session" meant to remain available on a host that has no session tab to open?ℹ️ Nitpicks
mobile/src/source-control/session-changed-file-open.ts:53reuseschooseSessionDiffOpenon the edit reply, where the returned'edit-tab'value is meaningless and only'device-review'is consumed; callingisRendererUnavailableRefusal(editReply)directly would read more plainly.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
|
@pullfrog thanks. Both points are addressed in a512ece1d3.
Re-verified: the mobile |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 4e266291-c52a-45f4-905a-b1f5c13eac04
📥 Commits
Reviewing files that changed from the base of the PR and between 43d55a3b58da2c25ee4c5a3104467f2f73682c71 and a512ece1d3607a8c8f80cfbe85b823e2b726d003.
📒 Files selected for processing (4)
mobile/src/components/MobileDiffReviewDrawers.tsxmobile/src/session/use-mobile-diff-review-interactions.tsmobile/src/session/use-mobile-diff-review-open-in-session.test.tsmobile/src/source-control/session-changed-file-open.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Open in Session refusal guard —
openInSessionnow checksisRendererUnavailableRefusal, and on a headless refusal sets a clear "no desktop to open tabs in" message instead of surfacing the rawrenderer_unavailablecode. - Action disabled after refusal — the review overflow menu's "Open in Session" gains
controller.sessionTabsUnavailablein its disabled condition, so it turns off for the rest of the screen once the host refuses. - Edit-tab leg nitpick fixed —
session-changed-file-open.tsreplacedchooseSessionDiffOpen(editReply) === 'device-review'with a directisRendererUnavailableRefusal(editReply); behavior is identical. - Controller-level test added —
use-mobile-diff-review-open-in-session.test.tsdrives the real review controller for the headless refusal (exact message + flag) and the desktop success path (returns to the session).
Both points from the prior review are addressed by this delta, and the new test would fail without the guard (the refusal would reach setActionError as the raw code). The remaining raw-refusal caller (create markdown note) stays explicitly out of scope in the PR body. Note: mobile dependencies are not installed in this review sandbox, so the new tests were checked statically rather than executed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (43d55a3b58), commit a512ece1d3 addressed both points raised:
Open in Sessionon a host with no renderer —use-mobile-diff-review-interactions.ts:199now checksisRendererUnavailableRefusalon thefiles.openDiffreply, setsSESSION_TABS_UNAVAILABLE_MESSAGE, and returns beforeonOpenSession(). The newsessionTabsUnavailablestate is exposed through the controller and read byMobileDiffReviewDrawers.tsx:149for the action'sdisabled.- Edit-tab fallback uses the shared check —
session-changed-file-open.ts:53now callsisRendererUnavailableRefusal(editReply)directly rather than routing the edit reply throughchooseSessionDiffOpen. - Coverage — new
use-mobile-diff-review-open-in-session.test.tsmounts the real controller: the headless case asserts the explanation message is shown,onOpenSessionis not called, and the action is turned off; the desktop case asserts a successful open still returns to the session and leaves the action enabled. I re-ran it alongside the other touched suites (25 tests, all pass).
I verified the disabled flag flows through the controller's ...interactions spread, and that the added test would fail without the fix (the raw renderer_unavailable would reach actionError and onOpenSession would still not be called, so the headless assertion on the message is real).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (a512ece1d3), commit c7e680c352 reworked the headless Open in Session behavior:
- Removed the latched
sessionTabsUnavailablestate —openInSessionstill recognizes the renderer-unavailable refusal and showsSESSION_TABS_UNAVAILABLE_MESSAGE, but no longer turns the action off; each tap re-requestsfiles.openDiff, so a serve host promoted by gaining a window (attachWindowexists insrc/main/runtime/orca-runtime-attach-window.ts), or a client replaced mid-screen, can still open the tab. - Dropped the
MobileDiffReviewDrawers.tsxdisabled condition back to upstream, so that file leaves the diff. - Strengthened the controller test —
use-mobile-diff-review-open-in-session.test.tsnow mounts the realMobileDiffReviewDrawerswith the real controller and drives the actual "Review Actions" sheet: it asserts the action stays enabled after a refusal, then returns to the session on the second tap, and that a desktop success returns on the first.
I verified no dangling sessionTabsUnavailable references remain (grep across mobile/ is clean), the reverted use-mobile-diff-review-interactions.ts has no unused imports, and the new test is falsifiable: without the isRendererUnavailableRefusal guard the raw code would reach actionError, and against the latched a512ece version the disabled assertion fails. All four prior concerns (run 1's raw-refusal surfacing, run 1's edit-tab nitpick, run 2's coverage, and CodeRabbit's stale-flag risk) are addressed by this head.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
c7e680c to
d526e8c
Compare
|
Hi @Jinwoo-H, rebased on the latest |
nwparker
left a comment
There was a problem hiding this comment.
Related scope review for #22186: I checked the exact renderer_unavailable fallback in mobile-file-tap-open.ts, the shared refusal predicate, and the diff-review fallback. Thank you @Meapri for fixing existing-file/diff navigation while preserving older-host compatibility, and for explicitly identifying new Markdown notes as remaining work.
#31291 addresses that separate new-note creation/open/read/save reproduction on updated headless hosts. It credits and cross-references this PR; your older-host device fallback and #14315 diff behavior remain distinct. This is a scoped code comparison; I have not rerun this branch's simulator suite.
Create, read, and save Markdown notes on headless hosts through authorized file operations and persisted editor tabs. Addresses the Markdown-note reproduction in #22186, reported by @shota46. Thanks to @Jinwoo-H (#31101), @brennanb2025 (#25436), and @Meapri (#23357) for related community implementations and regression coverage. Those PRs retain broader/distinct scope. Validation: focused tests, paired-headless E2E, iPhone simulator proof, and all CI checks passed.
…enderer The review screen is now where a headless host's diffs open, so its Open in Session action reaches files.openDiff there too, and showed the raw renderer_unavailable. On that refusal it now says the host has no desktop to open tabs in and disables the action for the screen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tching it off A review screen can outlive both the client it started with (useHostClient swaps it on refresh or reconnect) and the host's headless state (a serve host gains a window when it is promoted), so disabling the action after one renderer_unavailable could strand it off. Show the explanation on each refusal and leave the action enabled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
d526e8c to
594f181
Compare
|
Hi @nwparker, gentle ping. Rebased onto the latest main and CI is green. |

ELI5
When the phone is paired to an Orca host with no desktop window (
orca serveon a server), tapping Open in Session on the diff review screen used to surface the rawrenderer_unavailableerror. Now it explains "This host has no desktop to open tabs in. The diff is shown here instead." and the action stays enabled, so each tap asks the host again.What Changed
renderer_unavailablecode.isRendererUnavailableReply. On that refusal it shows the explanation instead of the raw code; there is no other tab to open because the screen the user is on already shows the diff. The message goes throughtranslatelike the other strings in the file; the new key issession.useDiffReviewInteractions.sessionTabsUnavailableinen.json(other locales fall back to English).Rebase note
This PR originally also added on-device fallbacks for tapping a changed file and a file path on headless hosts. Upstream has since covered both (the changed-file tap always opens the on-device review screen, and the file tap already falls back to the file preview), so those commits were dropped in the rebase onto current
main. What remains is only the Open in Session explanation above.Why
Upstream only hides Open in Session for routed execution hosts (
useWorkspaceOnPairedHost), which doesn't cover a paired headless host. Showing the raw refusal code tells the user nothing; the explanation says why, and keeping the action enabled avoids latching off a host that may gain a window while the screen is open.Linked Issue
Part of #22186 (the Open in Session part). #14315 is now covered upstream.
Testing
use-mobile-diff-review-open-in-session.test.ts(ported during the rebase; mounts the interactions hook directly): arenderer_unavailablereply shows the explanation and doesn't return to the session, and the action stays enabled. When the host can open the tab on the next tap, the user goes back to the session. A desktop host's successful open returns to the session.node_modules); CI is green on the current head.AI Disclosure
Claude Opus 5.5 (via Claude Code) wrote the fix and the tests, directed by a human. The rebase port was also done with Claude Code.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Author
X: @mea_pri
Checklist
N/Awith reason — the only UI change is one line of explanation text; the original screenshots covered the dropped fallbacks and were removed with thempnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred). Left to CI after the rebase port; CI is green on the current head.🤖 Generated with Claude Code