Skip to content

fix(mobile): open Markdown, file and diff tabs on hosts with no desktop window - #25436

Open
brennanb2025 wants to merge 28 commits into
mainfrom
brennanb2025/mobile-serve-render-8165
Open

brennanb2025 wants to merge 28 commits into
mainfrom
brennanb2025/mobile-serve-render-8165

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 27 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3795 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3782
Prod 61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3738 $\color{#cf222e}{\Huge{\mathbf{−}}}$​788 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2950

ELI5

When your phone talks to an Orca computer that has no desktop window open (a headless orca serve host on Linux or macOS, or a Mac whose Orca window is closed), opening a Markdown file, a code file, or a diff as a tab failed with the raw error renderer_unavailable, and New tab → Markdown Note left a stray untitled.md behind. The cause: only the desktop window knew how to open those tabs, and on these hosts there is no window. Now the host itself opens, saves and closes those tabs, so the phone works the same with or without a window. Phones paired to an older host that still refuses show the file or diff on the phone instead of an error.

What Changed

The problem

  • Phone paired to a host with no desktop window: tapping a changed file in a session's Changes list showed renderer_unavailable ([Bug] ADE mobile: diff viewer fails with renderer_unavailable when opening a changed file for review #14315). Tapping a file path in a terminal did nothing; in a chat it said "Couldn't open …". "Open in Session" on the phone's review screen showed renderer_unavailable.
  • New tab → Markdown Note created untitled.md on disk and then failed with renderer_unavailable, leaving the file behind ([bug] Mobile markdown tabs show renderer_unavailable on orca serve hosts (works via desktop host) #22186).
  • The file browser worked on the same host because it only previews file contents; it never needed a tab.
  • Why: editor tabs (Markdown, other files, diffs) had exactly one owner, the desktop window. The host forwarded files.open, files.openDiff, markdown.readTab and markdown.saveTab to the window and answered renderer_unavailable when there was none. Terminal, browser and chat tabs did not have this problem because the host already owns them.

What this changes for you

Situation Before After
Tap a changed file (serve host, or desktop with window closed) renderer_unavailable The diff opens as a session tab
Tap a file path in a terminal or chat Nothing / "Couldn't open …" The file opens as a tab (host side covered by tests; on the Android emulator a terminal path tap never reached the host on any phone or host version, so this row was not confirmed on a phone)
Markdown tab Could not be opened Opens, is editable, and Save writes the file on the host. If the file changed on the host since you loaded it, Save reports a conflict instead of overwriting
New tab → Markdown Note Stray untitled.md, then renderer_unavailable The note is created and opened as a tab. If the tab can't open (for example the desktop window is still starting), the created note opens in the phone's preview with one message, instead of being left invisible
Phone edits tabs while a desktop window is still taking over Unpredictable "The computer's Orca window is still starting. Try again."; nothing changes until the window is ready
Close a tab whose file has unsaved changes in the desktop window Failed Refused with "This file has unsaved changes on the computer. Open Orca there to save or discard them."
Open the desktop window later n/a The Markdown/file tabs the phone opened are there (diff tabs are not kept, same as on the desktop today)
Desktop with its window open Works Unchanged
Current phone + older host that still refuses Raw renderer_unavailable Changed file opens in the phone's review screen; tapped file opens in the phone's preview; "Open in Session" says "Update Orca on this computer to open this as a tab."; Markdown Note on a host known to have no window says "Update Orca on this computer to create notes from your phone" and creates nothing
Released phone + updated host Broken Opening and editing file, Markdown and diff tabs work with no phone update. Creating a note needs a current phone (released iOS 0.0.27 already fails note creation on every host at an existing create-file check this PR does not weaken)

Every mobile request that answered renderer_unavailable was checked. Covered: files.open, files.openDiff, markdown.readTab, markdown.saveTab, and session.tabs.close / closeLifecycle / activate / move for editor tabs. Not covered: closing a browser tab that a since-closed desktop window hosted (browser engine scope; other browser tabs already work headless). Two window-dependent bugs found along the way are not renderer_unavailable and are left for separate fixes: headless worktree.sleep reports success without sleeping, and the empty Switch Branch sheet on serve (STA-9443).

How it works

  • One decision for who owns editor tabs. resolveEditorAuthority (src/main/runtime/editor-authority.ts) is derived on every call, never stored, and has three answers: "window" when an authoritative desktop window is attached (every path exactly as before); "host" when no live window document exists (no window, or its renderer is gone), so nothing can later write back a stale view; "unavailable" when a desktop window is open but still taking over (for example a serve host whose window promotion is slow or failed). In that last state the phone gets "The computer's Orca window is still starting. Try again." and the host changes nothing, so the window can never miss a host change; once the window finishes taking over, the window route works.
  • Host-owned edit tabs live in the existing workspace session, the same store and writer the host already uses for headless terminal tabs, in the exact format the desktop window writes. So a window that opens later restores them with no conversion code. Diff tabs are kept in memory only, matching the existing rule that diffs are not persisted; they end on close, worktree removal, process exit, or when a window takes over.
  • Shared logic instead of a second copy. Editor file ids, the tab projection the phone sees, Markdown read-only rules and language detection moved from the renderer to src/shared/, and both the window and the host use them.
  • Markdown read and save on the host (host-markdown-document-reader.ts, runtime-mobile-markdown-documents.ts): bounded 2 MiB UTF-8-safe reads, binary refused, version = the existing content hash. Save runs one at a time per file, re-reads and compares the hash (identical re-save succeeds, anything else is a conflict), re-checks ownership right before the write, then verifies by reading back. Files with an unsaved desktop draft, over the edit limit, or outside the workspace are read-only or refused, never overwritten. SSH goes through the existing provider routing. Rows naming files outside the workspace are not listed on the phone while the host owns the tabs (as before this PR), and stay in the session for the desktop.
  • Capability, no wire change. New hosts advertise session-tabs.host-editor-tabs.v1. No new request, parameter or stream message; the host publishes the existing markdown / file tab kinds that phones already decode from desktop hosts.
  • Phone fallback for older hosts, built on community PR fix(mobile): explain Open in Session refusal on headless hosts #23357 by @Meapri (X: @mea_pri), with credit and a Co-authored-by trailer: one exact renderer_unavailable check (never timeouts, disconnects or browser errors), device review / preview fallbacks, plain copy. The Markdown Note check reads the host's status at tap time: capability → create; host reports no usable window and no capability → one toast, nothing created; unknown → try as before, and if the host refuses after creating the file, open that file in the phone's preview.

Why

  • Moving tab ownership to the host when there is no window removes the bug class: every editor-tab request now has an owner on every host, instead of patching each call site to degrade.
  • Persisting edit tabs in the existing session (rather than a separate live-only list) gives one owner and one writer, survives a serve restart, and lets a desktop window pick the tabs up unchanged.
  • Alternative considered: only the phone fallback from fix(mobile): explain Open in Session refusal on headless hosts #23357. It stops the raw error but leaves serve hosts without real tabs, Markdown editing or notes; we kept it for old hosts only.

Differences from the common pattern (host serves file bytes and diffs by request; the client owns its open files):

  1. Editor tabs are host-owned session tabs, not per-client open-file state. Intended: Orca's session tabs are one list shared by desktop, phones and web and are already host-owned for terminals, browsers and chats; a per-client list on serve would fork that model.
  2. Save is a hash check plus per-file serialization through Orca's existing write path, not a temp file + rename. Temporary: matches the bytes path desktop saves use today; follow-up "atomic checked write for runtime file writes, local and SSH relay" (needs a negotiated relay operation). Residual race: an outside process writing between the re-read and the write.
  3. The version token is Orca's existing Markdown content hash, not SHA-256. Intended: it is already the markdown.* wire token.
  4. With a desktop window present, the window's draft stays in the loop. Intended: the window owns unsaved text the host cannot see.
  5. The "Update Orca on this computer" messages for older hosts. Intended: hosts and phones update independently, and each message answers something the user just tapped.

Linked Issue

Fixes #22186
Fixes #14315

Visual Proof

Android emulator paired directly to a headless orca serve host on macOS (no desktop window), with a fixture repo holding notes/readme.md and an uncommitted change to src/app.txt.

Action Before (host on main) After (host and phone from this PR)
New tab → Markdown Note Note fails with renderer_unavailable untitled.md opens as a tab
Source Control → tap changed src/app.txt renderer_unavailable in Source Control app.txt diff opens as a session tab
After: Save when the file changed on the host After: host restarted Current phone + older host
Save shows a conflict and leaves the file alone Note tab kept, diff tab gone Markdown Note says Update Orca on this computer Changed file opens in the phone review screen

The jumbled note text comes from how the emulator injects typed text into the phone's editor, which this PR does not change; the host saved exactly the bytes the editor showed.

Testing

  • New host specs: open / openDiff / dedupe / caller navigation, close / activate / move / split, one group model for desktop-written sessions, folder and SSH workspaces, Markdown read / save / conflict / truncation / drafts / SSH provider, session model and placement, window take-over (slow or failed promotion refuses with no write; crashed renderer; window closed and reopened; an open that crosses a take-over), renderer hydration of host-written tabs. Every behavioural test was ablated and fails without its fix.

  • Regression: src/main/runtime, src/main/ipc, src/main/window, src/renderer/src/runtime, src/renderer/src/store/slices/editor, src/shared: 30134 passed, 0 failed. Phone suites + RPC recordings pass.

  • tc:node, tc:web, tc:cli pass; oxlint, anti-slop, changed-code quality and React Doctor clean.

  • Phone QA (an agent on an Android emulator, 2 rounds, headless orca serve on macOS, isolated profiles):

    • Old host + old phone: Note shows renderer_unavailable and leaves untitled.md (twice: untitled-2.md); changed file shows renderer_unavailable. This is the bug.
    • New host + new phone: Note opens as a tab with the file on disk; changed file opens as a diff tab; Save writes the file; Save after an outside change shows conflict and leaves the file unchanged; closing a tab from its long-press menu removes it for good; after a host restart the note tab is still there and the diff tab is gone.
    • Old host + new phone: Note says "Update Orca on this computer to create notes from your phone" and creates nothing; changed file opens in the phone's review screen.
    • Not run: released phone + new host (the emulator couldn't switch the dev client to the older bundle in time).
    • Seen on every host, not changed here: a tab opened from the Note or Source Control action is added but the phone stays on its current tab (the phone keeps its own tab choice unless the host asks it to follow, since August); a terminal path tap opened nothing on any phone or host version, even with one path per line (separately, the phone's path detector joins two paths printed on one line into one).
  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • SSH: reads and saves resolve the execution host through the existing provider routing; a disconnected SSH host fails the request and keeps the tab. Folder workspaces: open, Markdown and Note work without git; diffs refuse with "This folder isn't a Git repository."
  • Mixed versions: see the table above; no new request or stream message.

Author X/Twitter: @BrennanKB5

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)

brennanb2025 and others added 27 commits October 4, 2026 23:16
…detection with main

A host with no desktop window has to name, label and project editor tabs
exactly as the window does. Move the window's owned/diff editor file id
rules, the Markdown/file tab projection, the Markdown read-only rules and
language detection (with the Monaco filename map) into src/shared; the
renderer modules re-export or call them, so window behaviour is unchanged.
When a desktop window's promotion times out or fails, the host takes the
editor tabs back while that window's document may still be alive with an
older session read. Track window documents by webContents id and committed
main-frame generation; every host editor commit marks live documents
obsolete. An obsolete document's graph is refused (with one reload) and
its session set/patch/set-sync/checkpoint writes are not staged: only its
unsaved drafts are merged onto matching current rows, and a checkpoint
whose draft row is gone answers { ok: false } so unload keeps the text.
Senders that saw no host commit are admitted exactly as before.
…ith no window

On a serve host (or a desktop with no window) the phone could not open a
file, Markdown or diff tab: every editor RPC needed the window and failed
with renderer_unavailable. Editor authority is now derived on every call:
the window while an authoritative window with the editor methods exists,
otherwise the host. The host writes edit tabs into the workspace session in
the window's own formats (one session write per operation, re-checking
authority right before the commit), keeps diff tabs in memory, overlays both
onto the headless snapshot, and refuses to close a tab holding unsaved
drafts. An open that crosses a window attach fails with a retryable error
instead of writing. Host diffs need a Git target, so a plain folder gets a
clear refusal. Advertised as session-tabs.host-editor-tabs.v1.
markdown.readTab and markdown.saveTab also needed the window. With host
editor authority the host answers them from its session rows: a bounded
2 MiB UTF-8-safe read (SSH: whole file up to 2 MiB, ranged reads above,
a plain refusal on relays without them), version = hash of the returned
content, and oversized, truncated, read-only, draft or outside-workspace
rows are not editable. A save captures the execution host and SSH
generation before any await, runs in a per-file lane, compares the current
hash, re-checks ownership right before the write through a new optional
beforeWrite hook, and verifies the result. Includes a contract test that
the host's rows and replies decode with what released phones read.
…t open tabs

An older host with no desktop window refuses editor tabs with
renderer_unavailable. The phone now recognises exactly that refusal: a
Changes tap opens the device review, a file tap the device preview, and
Open in Session explains "Update Orca on this computer to open this as a
tab." on each try without latching it off. Markdown Note checks this tap's
own status read: a host advertising host editor tabs creates the note; a
known window-less host without it gets one toast and nothing is created;
an unknown status makes the legacy attempt and, if refused after creating
the file, opens it in the device preview. desktopWindowStatus is an
optional validated field. Three RPC goldens re-recorded for the copy change.

Co-authored-by: Meapri <[email protected]>
…ting instead of fencing its document

The host took editor tabs back whenever no window was authoritative, including
while a promoted window's hand-over had timed out or failed and its document
was still alive. That document could later persist the session it read, so a
fence marked it obsolete, refused its graph, forced a reload and dropped its
session writes, which could leave a live window silently disconnected.

Editor authority is now three-valued and derived per call: 'window' when an
authoritative window owns editors, 'host' when no live window document exists
(no window registered, or its renderer crashed or was destroyed), and
'unavailable' when a registered window is alive but not authoritative. In that
last state editor opens, diffs, Markdown reads and saves, and editor close,
activate and move refuse with a retryable "still starting" error and nothing is
written; the late graph attaches as before and the window takes over. With no
host commit possible under a live document, the fence and its session-write,
checkpoint and graph-refusal plumbing are removed.
…and keep diff focus live-only

On a desktop whose window was closed, the phone saw the session's terminals in
a synthetic group and its editors in the window's group, a split the desktop
never had; a phone reorder then wrote that split into the session and the
reopened window restored it. When the session is unified, every tab
(terminals, browsers, editors, live diffs) is now placed through the window's
persisted groups and layout, so the phone's groups are the session's groups.
Legacy sessions and worktrees with no editor tabs keep today's projection, and
persisting a layout never writes the synthetic group into a unified session.

A focused diff was persisted as the worktree's active editor file and group
focus, outliving the diff and leaving the phone with no active tab after it
closed. Diff focus now lives only in the snapshot (with the tab it replaced),
a persisted layout leaves diff ids out, and closing a diff returns to that tab.
When the focused tab is gone, the published active tab falls back to the
group's most recent tab, terminals included, instead of none.
A host-created editor wrapper took sortOrder = tabOrder.length, so a gap left
by an earlier close could give two wrappers one sortOrder; the host now
appends to the deduped order and renumbers siblings, as the window does for an
unpinned, unanchored open. An explicit open of a row restored as a preview now
clears the preview flag on the row and its wrapper, so a window restore cannot
replace the tab the user opened. A read-only row's leftover draft, which no
surface shows, no longer makes its tab impossible to close from the phone.
…ssion partition

The phone's full tab list hydrates against the local session partition, but it
also visited every workspace with a live host diff. For an SSH workspace, whose
rows live in the SSH partition, that reconcile found no edit rows and dropped
its Markdown and file tabs, so they vanished from the full list while a diff was
open and came back in the per-workspace list. Workspaces with live diffs or
editor-only rows outside the local partition are now hydrated through their own
scoped hydrate. The test store now answers a missing host id with the local
partition, as production does, so this cannot be masked again.
… that landed

With no window, a Markdown tab whose file sits outside the workspace (opened
from a terminal link, on another SSH target, or under another root) was listed
to the phone, but every read of it was refused, so tapping it showed "Couldn't
load markdown" with a Retry that could never work. The host now lists only
rows a phone may read, as a host with no window did before; the rows stay in
the session for the window. The same rule applies to non-Markdown file rows.

A save re-checked tab ownership after the write, so closing the tab while the
bytes were landing reported a failed save for text that was on disk; the write
is fenced by its pre-write check and the verify read is the post-condition. An
SSH relay without ranged reads now answers the too-large code phones already
explain instead of an English sentence they show as a generic failure.
…t open as a tab

Markdown Note creates untitled.md and then asks the host to open it. When that
open failed for any reason other than the host having no editor window (for
example a desktop window that is still starting, or a dropped connection), the
phone showed the error and left the created file invisible; tapping again made
untitled-2.md. The phone now opens the note it just created in the device
preview and shows the reason once as a toast, so the user has the note and no
stray file. The host's new "still starting" refusal is pinned as not matching
the exact renderer_unavailable fallback predicate.
…t of the projection

The projection grew past the file-size limit with the unified group placement
and the active-tab fallback; each now lives in its own module. The tab-state
owner is typed as an editor-authority host instead of a bare object.
…ktop window closed

A closed window leaves the terminal graph unavailable for good, and the
close path asserted a ready graph for every paired-client close before it
knew which tab was addressed. Host-owned Markdown, file and diff closes
never touch the graph, so they no longer wait on it; terminal and other
graph-backed closes still refuse as before.
…e the way the window does

The host compared paths with only separators folded, so on Windows a row
opened from a terminal link with other letter case (or under a root stored
with a lowercase drive) was hidden from the phone while the window listed
it. Compare with the shared runtime path key instead, which folds case for
Windows drive and UNC roots only and treats a backslash on a POSIX root as
a filename character.
…thout asking them to tap Note again

When the computer could not open a just-created note as a tab, the phone
showed the note and repeated the host's reason, which for a window that is
still starting ends in "Try again". The only way to try again is another
Note tap, which creates untitled-2.md and leaves the first note behind.
Say what happened instead: the note is open on this phone and the computer
could not open it as a tab.
…preview

The content-create recording mounted the hook without the router and host
id the screen always passes, so a Note whose tab open failed crashed on
the preview navigation and the golden recorded that crash as the error.
Inject both, and re-record the one affected golden: each failure now shows
the created note on the device and one Note message, with no inline error.
Editor file ids depend on every row in the partition, and each hydrate
pass asked for them once per worktree, so a pass cost O(worktrees x rows):
about 110 ms at 100 workspaces x 20 rows and 1 s at 200 x 30. Assign them
once per openFilesByWorktree object and index by worktree (4 ms and 8 ms).
The cache re-derives when a worktree's row array or length changes, since
a worktree rename re-keys the stored map in place.
…b list after its window closes

The unscoped hydrate reconciles editor tabs against the local partition
only, and its second pass covered just worktrees with live diffs or no
snapshot. An SSH workspace whose closed window had last published editor
tabs kept those stale tabs in the full list (and lost its own Markdown
tab there) while its own list was right. Reconcile every workspace whose
snapshot holds editor tabs or whose own partition has edit rows against
that partition.
…isted groups

With the desktop window closed, a remote client's reorder, split or move
in a workspace with a host editor tab wrote the headless snapshot's groups
back as the whole group model. The snapshot shows only what the host can
render, so a group holding an agent chat, a closed browser page or a
hidden editor row disappeared, and the window reopened without its split.
It also stored snapshot-only ids such as agent-session:<id> in tab orders.

A move now edits the unified session's persisted groups: visible tabs take
the order and group the move gave them, every member the snapshot could
not show keeps its group and neighbour, a group goes only when it is truly
empty, and the persisted layout is kept with a new split grafted beside
the group it came from. Snapshot ids are translated to wrapper ids for
terminals, browsers, chats and editors (both when projecting and when
persisting), and every member's sortOrder follows its group order.

A session that already holds the synthetic headless terminal group from
an earlier terminal split is edited like any other, so an editor moved out
of it lands where clients see it; the guard that refused those writes is
gone. The host still never adds that group to a unified session, and
terminal-only worktrees keep origin/main's behaviour.
…t editor close

The graph check for a paired client's close now lives in one helper next
to closeHostEditorTab: it skips the terminal graph for a host-owned
editor close while the window is closed, and otherwise captures the ready
graph and asserts it stayed stable, exactly as before. This keeps the
close mixin within its line limit.
…tes it

A phone activating an agent chat tab fell into the editor branch, so with
host-owned editors it ran the host editor activation, which threw
workspace_session_unavailable instead of focusing the chat. Chat tabs are
renderer-owned unified tabs like browser tabs and now take that path.

Recording an editor tab's focus is bookkeeping, so a host with no owned
session partition still completes the activation instead of throwing.
…a remote move edits the groups

With the window closed, a chat replaced by /clear kept a wrapper naming the session it replaced,
so the host could not translate the new chat's id. A remote move of that chat was dropped from the
saved groups, and a rebuilt snapshot placed it in the active group. Fall back to the replaced
session's wrapper, as the window's own mirror does.
…a group the session cannot keep

With the window closed, splitting a diff into its own group showed the new group once, then the
next list folded the diff back, because diffs are never saved and the saved groups had nowhere to
hold that group. The host now refuses that split as a no-op, the same way it treats a drop the
window cannot split. Legacy sessions are unchanged. The move persistence moves out of the editor
command module to keep it under the line limit.
…2025/mobile-serve-render-8165

# Conflicts:
#	src/renderer/src/lib/language-detect.ts
@brennanb2025
brennanb2025 marked this pull request as ready for review October 6, 2026 10:43
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Walkthrough

The runtime can own file and Markdown editor tabs when no desktop window owns them. It publishes those tabs to mobile session snapshots and persists editor groups, focus, and Markdown changes. Shared modules provide editor identity, language detection, and tab projections. Mobile flows handle renderer-unavailable responses with device previews or host-update messages. Monaco language-association files and related configuration now use the shared directory.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🔵 Low · up to 3c54a

Phones can now open file, Markdown, and diff tabs on hosts without a desktop window. Two small issues remain. Stored phone snapshots can still point to a removed diff tab after a desktop window takes over. One host check on Markdown saves is skipped for older tab records. Neither issue is likely to cause serious failures, but both should be fixed in a follow-up.

🚥 Pre-merge checks | ✅ 3 | ❌ 1 | ❓ 1

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check Warning The PR also adds unrelated mobile chat work. mobile/src/session/MobileNativeChatBackgroundTasks.tsx adds a background-task UI, and mobile/src/session/MobileNativeChatAsk.tsx adds auto-advance, col… Remove the unrelated mobile chat implementation and its tests from this pull request, or move that work to a separate pull request.
Docstring Coverage Inconclusive Docstring coverage is 39.84% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 128 functions across 50 files. (33 skippe… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: enabling mobile Markdown, file, and diff tabs on hosts without a desktop window.
Description check Passed The description is complete and directly aligned with the PR. It includes the user impact, implementation details, rationale, linked issues, visual proof, testing results, compatibility notes, and che…
Linked Issues check Passed [#22186] The host now owns Markdown file tabs when no desktop window is available. It supports bounded reads, conflict-checked saves, Markdown Notes, SSH, folders, and window handover. The PR adds hos…
Full details: Out of Scope Changes check

Explanation

The PR also adds unrelated mobile chat work. mobile/src/session/MobileNativeChatBackgroundTasks.tsx adds a background-task UI, and mobile/src/session/MobileNativeChatAsk.tsx adds auto-advance, collapse, and submission behavior. These changes do not implement Markdown tabs, file tabs, diff tabs, or older-host fallbacks for [#22186] or [#14315].

Full details: Docstring Coverage

Explanation

Docstring coverage is 39.84% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 128 functions across 50 files. (33 skipped: 5 unsupported, 28 over the file limit.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

@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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 90a0de18-a596-4caa-aa10-43fa5b2f0a07
📥 Commits

Reviewing files that changed from the base of the PR and between 29e6696 and 8c81a58.

📒 Files selected for processing (85)
  • config/scripts/generate-monaco-associations.mjs
  • config/tsconfig.cli.json
  • mobile/rpc-foundation/goldens/matrix-session.content-create-files.open-1.json
  • mobile/rpc-foundation/goldens/matrix-session.markdown-disk-fallback-files.read-1.json
  • mobile/rpc-foundation/goldens/session-markdown-disk-read.json
  • mobile/rpc-foundation/goldens/session-markdown-tab-disk-fallback.json
  • mobile/src/files/mobile-file-mutation-ownership.ts
  • mobile/src/session/host-editor-tab-release-contract.test.ts
  • mobile/src/session/markdown-note-host-editor-tabs.ts
  • mobile/src/session/mobile-file-tap-open.test.ts
  • mobile/src/session/mobile-file-tap-open.ts
  • mobile/src/session/mobile-markdown-disk-fallback.test.ts
  • mobile/src/session/mobile-markdown-disk-fallback.ts
  • mobile/src/session/use-mobile-diff-review-interactions.ts
  • mobile/src/session/use-mobile-diff-review-open-in-session.test.ts
  • mobile/src/session/use-mobile-session-content-create-actions.ts
  • mobile/src/session/use-mobile-session-content-create-markdown-note.test.ts
  • mobile/src/source-control/session-changed-file-open.test.ts
  • mobile/src/source-control/session-changed-file-open.ts
  • mobile/src/source-control/use-mobile-source-control-openers.ts
  • mobile/src/tasks/task-runtime-reply-schema.test.ts
  • mobile/src/tasks/task-runtime-reply-schema.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/transport/renderer-unavailable-refusal.test.ts
  • mobile/src/transport/renderer-unavailable-refusal.ts
  • src/main/persistence/terminal-topology/terminal-topology-boundary-ratchet.test.ts
  • src/main/runtime/editor-authority.ts
  • src/main/runtime/headless-tab-group-split-layout.ts
  • src/main/runtime/host-editor-file-id-assignments.ts
  • src/main/runtime/host-editor-session-layout.ts
  • src/main/runtime/host-editor-session-model.test.ts
  • src/main/runtime/host-editor-session-model.ts
  • src/main/runtime/host-editor-tab-commands.ts
  • src/main/runtime/host-editor-tab-focus.ts
  • src/main/runtime/host-editor-tab-group-edit.test.ts
  • src/main/runtime/host-editor-tab-group-edit.ts
  • src/main/runtime/host-editor-tab-group-placement.ts
  • src/main/runtime/host-editor-tab-groups.test.ts
  • src/main/runtime/host-editor-tab-move-persistence.ts
  • src/main/runtime/host-editor-tab-projection.test.ts
  • src/main/runtime/host-editor-tab-projection.ts
  • src/main/runtime/host-editor-tab-publication.ts
  • src/main/runtime/host-editor-tab-state.ts
  • src/main/runtime/host-editor-tabs-folder.test.ts
  • src/main/runtime/host-editor-tabs-lifecycle.test.ts
  • src/main/runtime/host-editor-tabs-open.test.ts
  • src/main/runtime/host-editor-tabs-test-harness.spec.ts
  • src/main/runtime/host-editor-window-recovery.test.ts
  • src/main/runtime/host-markdown-document-reader.ts
  • src/main/runtime/host-markdown-documents-ssh.test.ts
  • src/main/runtime/host-markdown-documents.test.ts
  • src/main/runtime/orca-runtime-apply-mobile-session-tab-navigation.ts
  • src/main/runtime/orca-runtime-close-headless-mobile-terminal-tab.ts
  • src/main/runtime/orca-runtime-close-mobile-session-tab.ts
  • src/main/runtime/orca-runtime-file-commands.ts
  • src/main/runtime/orca-runtime-files-mobile-explorer-reads.test.ts
  • src/main/runtime/orca-runtime-hydrate-headless-mobile-session-tabs-from-workspace-session.ts
  • src/main/runtime/orca-runtime-move-headless-mobile-session-tab.ts
  • src/main/runtime/orca-runtime-perform-mobile-session-pty-records-refresh.ts
  • src/main/runtime/orca-runtime-persist-headless-terminal-title.ts
  • src/main/runtime/orca-runtime-preserved-branch-cleanup.ts
  • src/main/runtime/orca-runtime-stored-mobile-snapshot-has-stale-preserved-tab.ts
  • src/main/runtime/orca-runtime-sync-window-graph.ts
  • src/main/runtime/orca-runtime-test-fixtures.spec.ts
  • src/main/runtime/runtime-file-command-host.ts
  • src/main/runtime/runtime-file-commands-constructor.ts
  • src/main/runtime/runtime-file-commands-write-file-explorer-file.ts
  • src/main/runtime/runtime-mobile-markdown-documents.ts
  • src/main/runtime/runtime-workspace-session-controller.ts
  • src/renderer/src/lib/language-detect.ts
  • src/renderer/src/runtime/mobile-markdown-bridge.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-session-editor-tabs.ts
  • src/renderer/src/store/slices/editor/actions/hydrate-editor-session.ts
  • src/renderer/src/store/slices/editor/file-ids/editor-file-ids.ts
  • src/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-ids.ts
  • src/renderer/src/store/slices/store-session-host-editor-tabs-hydration.test.ts
  • src/shared/editor-file-identity.ts
  • src/shared/language-detect.test.ts
  • src/shared/language-detect.ts
  • src/shared/mobile-markdown-document.ts
  • src/shared/mobile-session-editor-tab-projection.ts
  • src/shared/monaco-filename-language.test.ts
  • src/shared/monaco-filename-language.ts
  • src/shared/monaco-language-associations.json
  • src/shared/protocol-version.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.

Comment on lines +158 to +170
// Why: diffs are never persisted, so a window taking editor authority starts without them.
protected retireHostEditorDiffTabsForWindowTakeover(): void {
for (const worktreeId of getHostEditorTabState(this).clearAllDiffs()) {
const snapshot = this.mobileSessionTabsByWorktree.get(worktreeId)
if (snapshot) {
this.storeMobileSessionSnapshot(worktreeId, {
...snapshot,
snapshotVersion: snapshot.snapshotVersion + 1,
tabs: snapshot.tabs.filter((tab) => tab.type !== 'file' || tab.mode !== 'diff')
})
}
}
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Also remove retired diff ids from tabGroups and activeTabId.

This method filters diff tabs out of snapshot.tabs. It keeps activeTabId, activeTabType, activeGroupId and every tabGroups[].tabOrder/activeTabId unchanged. If a phone opened a diff and the diff was active, the stored snapshot then names an active tab that is no longer in tabs. The renderer's next publication overwrites this snapshot only for the worktrees it actually publishes. A worktree it does not publish keeps the dangling ids until a later rebuild. Rebuild the editor overlay for the remaining tabs, or strip the retired ids explicitly.

🐛 Proposed fix
   protected retireHostEditorDiffTabsForWindowTakeover(): void {
     for (const worktreeId of getHostEditorTabState(this).clearAllDiffs()) {
       const snapshot = this.mobileSessionTabsByWorktree.get(worktreeId)
       if (snapshot) {
+        const retired = new Set(
+          snapshot.tabs
+            .filter((tab) => tab.type === 'file' && tab.mode === 'diff')
+            .map((tab) => tab.id)
+        )
+        const tabs = snapshot.tabs.filter((tab) => !retired.has(tab.id))
+        const active = retired.has(snapshot.activeTabId ?? '')
+          ? (tabs[0] ?? null)
+          : (tabs.find((tab) => tab.id === snapshot.activeTabId) ?? null)
         this.storeMobileSessionSnapshot(worktreeId, {
           ...snapshot,
           snapshotVersion: snapshot.snapshotVersion + 1,
-          tabs: snapshot.tabs.filter((tab) => tab.type !== 'file' || tab.mode !== 'diff')
+          activeTabId: active?.id ?? null,
+          activeTabType: active?.type ?? null,
+          tabGroups: snapshot.tabGroups?.map((group) => {
+            const tabOrder = group.tabOrder.filter((id) => !retired.has(id))
+            return {
+              ...group,
+              tabOrder,
+              activeTabId: retired.has(group.activeTabId ?? '')
+                ? (tabOrder[0] ?? null)
+                : group.activeTabId
+            }
+          }),
+          tabs: tabs.map((tab) => ({ ...tab, isActive: tab.id === active?.id }))
         })
       }
     }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Why: diffs are never persisted, so a window taking editor authority starts without them.
protected retireHostEditorDiffTabsForWindowTakeover(): void {
for (const worktreeId of getHostEditorTabState(this).clearAllDiffs()) {
const snapshot = this.mobileSessionTabsByWorktree.get(worktreeId)
if (snapshot) {
this.storeMobileSessionSnapshot(worktreeId, {
...snapshot,
snapshotVersion: snapshot.snapshotVersion + 1,
tabs: snapshot.tabs.filter((tab) => tab.type !== 'file' || tab.mode !== 'diff')
})
}
}
}
// Why: diffs are never persisted, so a window taking editor authority starts without them.
protected retireHostEditorDiffTabsForWindowTakeover(): void {
for (const worktreeId of getHostEditorTabState(this).clearAllDiffs()) {
const snapshot = this.mobileSessionTabsByWorktree.get(worktreeId)
if (snapshot) {
const retired = new Set(
snapshot.tabs
.filter((tab) => tab.type === 'file' && tab.mode === 'diff')
.map((tab) => tab.id)
)
const tabs = snapshot.tabs.filter((tab) => !retired.has(tab.id))
const active = retired.has(snapshot.activeTabId ?? '')
? (tabs[0] ?? null)
: (tabs.find((tab) => tab.id === snapshot.activeTabId) ?? null)
this.storeMobileSessionSnapshot(worktreeId, {
...snapshot,
snapshotVersion: snapshot.snapshotVersion + 1,
activeTabId: active?.id ?? null,
activeTabType: active?.type ?? null,
tabGroups: snapshot.tabGroups?.map((group) => {
const tabOrder = group.tabOrder.filter((id) => !retired.has(id))
return {
...group,
tabOrder,
activeTabId: retired.has(group.activeTabId ?? '')
? (tabOrder[0] ?? null)
: group.activeTabId
}
}),
tabs: tabs.map((tab) => ({ ...tab, isActive: tab.id === active?.id }))
})
}
}
}

Comment on lines +135 to +144
function recordedWrapperHost(
runtime: HostMarkdownRuntime,
worktreeId: string,
record: HostEditTabRecord
): ExecutionHostId | null {
const wrapper = runtime
.getOwnWorkspaceSessionForWorktree(worktreeId)
?.unifiedTabs?.[worktreeId]?.find((tab) => tab.id === record.tabId)
return wrapper?.executionHostId ?? 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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Look up the persisted wrapper by record.wrapperId, not record.tabId.

listHostEditTabs sets tabId to the restored file id when the wrapper's own id equals the legacy file id (tabId: wrapper.id === legacyId ? id : wrapper.id). In that case record.tabId does not equal any unifiedTabs entry id. The find then returns undefined, recordedWrapperHost returns null, and resolveHostMarkdownTab silently skips the recorded-host check at Line 122. The HostEditTabRecord.wrapperId field exists for this lookup. Its documentation says it is "The persisted wrapper's own id".

🐛 Proposed fix
 function recordedWrapperHost(
   runtime: HostMarkdownRuntime,
   worktreeId: string,
   record: HostEditTabRecord
 ): ExecutionHostId | null {
+  if (record.wrapperId === null) {
+    return null
+  }
   const wrapper = runtime
     .getOwnWorkspaceSessionForWorktree(worktreeId)
-    ?.unifiedTabs?.[worktreeId]?.find((tab) => tab.id === record.tabId)
+    ?.unifiedTabs?.[worktreeId]?.find((tab) => tab.id === record.wrapperId)
   return wrapper?.executionHostId ?? null
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function recordedWrapperHost(
runtime: HostMarkdownRuntime,
worktreeId: string,
record: HostEditTabRecord
): ExecutionHostId | null {
const wrapper = runtime
.getOwnWorkspaceSessionForWorktree(worktreeId)
?.unifiedTabs?.[worktreeId]?.find((tab) => tab.id === record.tabId)
return wrapper?.executionHostId ?? null
}
function recordedWrapperHost(
runtime: HostMarkdownRuntime,
worktreeId: string,
record: HostEditTabRecord
): ExecutionHostId | null {
if (record.wrapperId === null) {
return null
}
const wrapper = runtime
.getOwnWorkspaceSessionForWorktree(worktreeId)
?.unifiedTabs?.[worktreeId]?.find((tab) => tab.id === record.wrapperId)
return wrapper?.executionHostId ?? null
}

…erve-render-8165

Keeps one mechanism for editor tabs on a host with no window: main's
headless editor projection (mobile-session-editor-projection.ts) is
removed in favour of this branch's host editor tabs, which already list
and close the rows a converted SSH host's migration carries in.
closeHostEditorTab now honours force, as main's contract did. Main's
specs expect this branch's plain draft-refusal message and seed the
README row inside the workspace the projection lists.

@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.

🧹 Nitpick comments (1)
mobile/src/session/use-mobile-session-content-create-actions.ts (1)

108-129: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Do not run router.push inside the try block that catches open failures.

previewCreatedNote() on Line 117 runs inside the try block. If router.push throws there, the catch block on Line 121 calls previewCreatedNote() a second time and shows the device-opened toast. Store the refusal result in a variable and call previewCreatedNote() after the try block. The try block then covers only the RPC.

♻️ Proposed restructure
-        try {
-          const openResponse = await sourceFileOpenRun.request(
-            client,
-            { worktree, relativePath },
-            { timeoutMs: 15_000 }
-          )
-          if (isRendererUnavailableRefusal(openResponse)) {
-            previewCreatedNote()
-            return
-          }
-          interpretOrThrowRefusalMessage(() => sourceFileOpenRun.interpret(openResponse), '')
-        } catch {
+        let refused = false
+        try {
+          const openResponse = await sourceFileOpenRun.request(
+            client,
+            { worktree, relativePath },
+            { timeoutMs: 15_000 }
+          )
+          refused = isRendererUnavailableRefusal(openResponse)
+          if (!refused) {
+            interpretOrThrowRefusalMessage(() => sourceFileOpenRun.interpret(openResponse), '')
+          }
+        } catch {
           previewCreatedNote()
           showToast(...)
           return
         }
+        if (refused) {
+          previewCreatedNote()
+          return
+        }

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3a9a33e6-8b62-4b4a-8613-16de6770c5fc
📥 Commits

Reviewing files that changed from the base of the PR and between 8c81a58 and 3c54afc.

📒 Files selected for processing (88)
  • config/scripts/generate-monaco-associations.mjs
  • config/tsconfig.cli.json
  • mobile/rpc-foundation/goldens/matrix-session.content-create-files.open-1.json
  • mobile/rpc-foundation/goldens/matrix-session.markdown-disk-fallback-files.read-1.json
  • mobile/rpc-foundation/goldens/session-markdown-disk-read.json
  • mobile/rpc-foundation/goldens/session-markdown-tab-disk-fallback.json
  • mobile/src/files/mobile-file-mutation-ownership.ts
  • mobile/src/session/host-editor-tab-release-contract.test.ts
  • mobile/src/session/markdown-note-host-editor-tabs.ts
  • mobile/src/session/mobile-file-tap-open.test.ts
  • mobile/src/session/mobile-file-tap-open.ts
  • mobile/src/session/mobile-markdown-disk-fallback.test.ts
  • mobile/src/session/mobile-markdown-disk-fallback.ts
  • mobile/src/session/use-mobile-diff-review-interactions.ts
  • mobile/src/session/use-mobile-diff-review-open-in-session.test.ts
  • mobile/src/session/use-mobile-session-content-create-actions.ts
  • mobile/src/session/use-mobile-session-content-create-markdown-note.test.ts
  • mobile/src/source-control/session-changed-file-open.test.ts
  • mobile/src/source-control/session-changed-file-open.ts
  • mobile/src/source-control/use-mobile-source-control-openers.ts
  • mobile/src/tasks/task-runtime-reply-schema.test.ts
  • mobile/src/tasks/task-runtime-reply-schema.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/transport/renderer-unavailable-refusal.test.ts
  • mobile/src/transport/renderer-unavailable-refusal.ts
  • src/main/persistence/terminal-topology/terminal-topology-boundary-ratchet.test.ts
  • src/main/runtime/editor-authority.ts
  • src/main/runtime/headless-tab-group-split-layout.ts
  • src/main/runtime/host-editor-file-id-assignments.ts
  • src/main/runtime/host-editor-session-layout.ts
  • src/main/runtime/host-editor-session-model.test.ts
  • src/main/runtime/host-editor-session-model.ts
  • src/main/runtime/host-editor-tab-commands.ts
  • src/main/runtime/host-editor-tab-focus.ts
  • src/main/runtime/host-editor-tab-group-edit.test.ts
  • src/main/runtime/host-editor-tab-group-edit.ts
  • src/main/runtime/host-editor-tab-group-placement.ts
  • src/main/runtime/host-editor-tab-groups.test.ts
  • src/main/runtime/host-editor-tab-move-persistence.ts
  • src/main/runtime/host-editor-tab-projection.test.ts
  • src/main/runtime/host-editor-tab-projection.ts
  • src/main/runtime/host-editor-tab-publication.ts
  • src/main/runtime/host-editor-tab-state.ts
  • src/main/runtime/host-editor-tabs-folder.test.ts
  • src/main/runtime/host-editor-tabs-lifecycle.test.ts
  • src/main/runtime/host-editor-tabs-open.test.ts
  • src/main/runtime/host-editor-tabs-test-harness.spec.ts
  • src/main/runtime/host-editor-window-recovery.test.ts
  • src/main/runtime/host-markdown-document-reader.ts
  • src/main/runtime/host-markdown-documents-ssh.test.ts
  • src/main/runtime/host-markdown-documents.test.ts
  • src/main/runtime/mobile-session-editor-projection.ts
  • src/main/runtime/orca-runtime-apply-mobile-session-tab-navigation.ts
  • src/main/runtime/orca-runtime-close-headless-mobile-terminal-tab.ts
  • src/main/runtime/orca-runtime-close-mobile-session-tab.ts
  • src/main/runtime/orca-runtime-file-commands.ts
  • src/main/runtime/orca-runtime-files-mobile-explorer-reads.test.ts
  • src/main/runtime/orca-runtime-hydrate-headless-mobile-session-tabs-from-workspace-session.ts
  • src/main/runtime/orca-runtime-move-headless-mobile-session-tab.ts
  • src/main/runtime/orca-runtime-perform-mobile-session-pty-records-refresh.ts
  • src/main/runtime/orca-runtime-persist-headless-terminal-title.ts
  • src/main/runtime/orca-runtime-preserved-branch-cleanup.ts
  • src/main/runtime/orca-runtime-stored-mobile-snapshot-has-stale-preserved-tab.ts
  • src/main/runtime/orca-runtime-sync-window-graph.ts
  • src/main/runtime/orca-runtime-test-fixtures.spec.ts
  • src/main/runtime/orca-runtime-tests/mobile-session-tabs-cold-serve-hydrate.spec.ts
  • src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts
  • src/main/runtime/runtime-file-command-host.ts
  • src/main/runtime/runtime-file-commands-constructor.ts
  • src/main/runtime/runtime-file-commands-write-file-explorer-file.ts
  • src/main/runtime/runtime-mobile-markdown-documents.ts
  • src/main/runtime/runtime-workspace-session-controller.ts
  • src/renderer/src/lib/language-detect.ts
  • src/renderer/src/runtime/mobile-markdown-bridge.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-session-editor-tabs.ts
  • src/renderer/src/store/slices/editor/actions/hydrate-editor-session.ts
  • src/renderer/src/store/slices/editor/file-ids/editor-file-ids.ts
  • src/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-ids.ts
  • src/renderer/src/store/slices/store-session-host-editor-tabs-hydration.test.ts
  • src/shared/editor-file-identity.ts
  • src/shared/language-detect.test.ts
  • src/shared/language-detect.ts
  • src/shared/mobile-markdown-document.ts
  • src/shared/mobile-session-editor-tab-projection.ts
  • src/shared/monaco-filename-language.test.ts
  • src/shared/monaco-filename-language.ts
  • src/shared/monaco-language-associations.json
  • src/shared/protocol-version.ts
💤 Files with no reviewable changes (5)
  • src/shared/monaco-filename-language.test.ts
  • src/shared/monaco-language-associations.json
  • src/shared/monaco-filename-language.ts
  • src/shared/language-detect.test.ts
  • src/main/runtime/mobile-session-editor-projection.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • mobile/rpc-foundation/goldens/session-markdown-tab-disk-fallback.json
  • mobile/rpc-foundation/goldens/session-markdown-disk-read.json
  • mobile/rpc-foundation/goldens/matrix-session.markdown-disk-fallback-files.read-1.json

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

@nwparker nwparker 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.

Cross-reference for #22186 after reviewing the host Markdown reader/save path and note-creation scope: thank you @brennanb2025 for the broader headless-tab implementation, SSH ownership/reconnect checks, and Android evidence.

#31291 addresses the narrower new Markdown note creation/open/read/save reproduction and credits this PR. It does not replace your broader host-owned editor model, SSH-backed document flow, diff tabs, or older-host fallback. #22186 remains linked as an addressed reproduction rather than automatically closed. This is an overlap/integration review, not a blanket approval or a claim that I reran this branch's tests.

nwparker added a commit that referenced this pull request Oct 21, 2026
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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants