Skip to content

A paired desktop's tab moves, splits, resizes, props and renames in a server workspace go to the server's layout (switch-on builds only) - #31714

Merged
Jinwoo-H merged 36 commits into
mainfrom
fd/h5c1-server-layout-writes
Oct 22, 2026
Merged

Jinwoo-H merged 36 commits into
mainfrom
fd/h5c1-server-layout-writes

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1594 $\color{#cf222e}{\Huge{\mathbf{−}}}$​182 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1412
Prod 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​546 $\color{#cf222e}{\Huge{\mathbf{−}}}$​137 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​409

ELI5

This only affects test builds where the main process owns the layout (the "layout-owner" switch, still off for users). In those builds, a desktop paired to an Orca server already draws the server's workspaces from the server's own layout. But when you rearranged, renamed or closed tabs there, the desktop mostly changed its own copy, and the server's next update could put things back. Now each of those changes goes to the server's main process, which applies it to the one layout everyone draws from, so the change sticks, and phones and other desktops see it.

What Changed

Before (switch-on builds, a desktop paired to a server that advertises layout.intents.v1):

  • Dragging a tab, splitting a group, resizing groups or panes, moving a pane, changing a tab's color, pin or view mode, picking the chat pane, or renaming a non-terminal tab changed only the desktop's copy. The server's next layout update could undo it, and phones paired to the server never saw it.
  • A close or rename went to the server over its old RPC. The desktop kept separate "close" and "focus" bookkeeping for that workspace that the server's layout updates no longer need.

After:

  • Placement and props (H5c-1 and H5c-2) go to the server's main as layout.apply intents, under the server's ids, through one explicit allow-list (SERVER_ROUTED_LAYOUT_COMMANDS in server-layout-apply.ts): moveTab, splitGroup, setGroupRatios, setPaneRatios, equalizePanes, movePane, setTabProps, setChatPane, and renameTab.
    • The desktop shows the result once the server's update with the change arrives.
    • A refusal redraws from the server's updates and is never resent.
    • Update positions are tracked per server stream (layout-frame-position.ts).
  • Closes, terminal names, splits and new terminal tabs stay on their RPCs (session.tabs.close, terminal.close, terminal.rename, terminal.split, session.tabs.createTerminal). The server's main now applies those to its own layout (D2 Main closes, renames, sleeps and starts new tabs' terminals itself, with or without a window (dark, layout-owner build only) #31571), and its close stops the terminals it ends.
    • We deliberately do NOT send a window-style closeTabs to a server. Main reads that as "the window already stopped the terminals" and stops nothing, but a paired desktop can't stop a server's terminals itself.
    • A refused close redraws from the server's updates. A close that never reached the server is held and replayed, as before.
  • Two exceptions stay on today's path. A custom rename of a terminal tab stays on terminal.rename, which also names the server's terminal. setTabProps { clearLaunchAgent }, this desktop's guess that a launched agent exited, is never sent to the server, so it can't clear the server's relaunch record.
  • Bookkeeping for drawn workspaces. A workspace drawn from the server's updates skips the old mirror's id-mapping and close or focus bookkeeping (apply-snapshot.ts). It also skips pane-geometry-only session pushes. Servers without the capability run all of it exactly as today; that part goes at the Phase 2 server cutoff (ledger L240).

Known issues:

Known remaining old-path writes, tracked as ledger rows L269-L276 with owners:

  • confirmed close of a pinned server tab;
  • chat on a windowless server;
  • sleep resume records;
  • detaching a pane into a new tab;
  • simulator tabs;
  • browser profile and page records;
  • the default-tabs flag;
  • splitting a pane with no handle yet.

Why

The server's main owns the layout, so the only way a desktop change sticks, and reaches phones and other desktops, is for that main to apply it. We considered sending everything through layout.apply. But closes and starts need the server's terminal side, which its own close and start already do, and the window-style close would stop nothing on the server. So each write goes where the server applies it fully: placement and props through layout.apply, closes and starts through the existing RPCs. An explicit allow-list keeps this reviewable and keeps old servers on today's path.

Linked Issue

Ledger: H5c-1 and H5c-2 (design H5c). L240 marked "goes at the Phase 2 server cutoff". Remaining writes: L269-L276.

Visual Proof

N/A: dark change, switch-on builds only. The e2e specs below drive the paired desktop against a real switch-on server.

Testing

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

Unit tests:

  • routing with id translation;
  • the off-list commands and old servers keeping today's path;
  • refusals redrawing;
  • per-stream positions;
  • an undelivered close of a drawn tab held for replay;
  • clearLaunchAgent kept off the route;
  • server side: close and stop, the pinned refusal, rename, and routed commands with and without a server window.

The new behaviour tests fail on the old code.

Gates:

  • pnpm tc, the CI static-analysis gate, oxlint, and the e2e typecheck ratchet pass.
  • Per-test switch-on comparison over src/renderer/src/runtime, components/terminal-pane, components/tab-group, src/main/runtime/rpc and src/main/runtime/session-tabs, at base b3f1607 vs head: 12,267 vs 12,294 tests, 0 failing at either.

Server specs: switch-on, fresh build.

Spec Base b3f1607 Head
paired-mobile-desktop-tab-composition pass pass
paired-desktop-server-layout-frames pass pass
headless-serve-focused-terminal-create pass pass
live-background-terminal-mount-authority pass pass
paired-desktop-server-layout-intents new pass
paired-desktop-server-layout-writes new pass

Note: build:orcad's file-watcher preflight (a 5 s timer) timed out at load ~90 on the shared build machine. A retry at lower load passed; this PR doesn't touch orcad.

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

  • Mixed versions: a server without layout.intents.v1 never receives layout.apply from this path and keeps today's RPCs. Nothing new goes on the wire; the intents are existing layout.apply commands.
  • SSH and local workspaces: untouched, since only runtime:<env> workspaces drawn from a server's updates take these routes.
  • Switch-off: every new branch sits behind ORCA_LAYOUT_OWNER_IS_MAIN, or behind isServerFrameDrawnWorkspace, which is false with the switch off. I checked the switch-off bundle at this head against the merge base, and every new code path in it is unreachable. A per-test switch-off comparison of the touched folders gave base 12,267 tests vs head 12,294, with no tests failing at head that pass at base. The one failure at base was the capability-advertisement test in workspace-layout-paired-desktop.test.ts, and it passes at head.

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)

…erver's stream; a restarted main starts its positions over
…-writes

# Conflicts:
#	.github/workflows/layout-owner-e2e.yml
#	src/renderer/src/components/tab-group/tab-group-layout-owner-commands.test.ts
#	src/renderer/src/components/tab-group/tab-group-layout-owner-commands.ts
#	src/renderer/src/components/terminal-pane/pty-connection/exited-split-pane-close.test.ts
#	src/renderer/src/components/terminal-pane/terminal-pane-layout-owner-gestures.test.ts
…ps and agent-launch tabs itself, with or without a window (layout-owner build)
…SH relay session; agent-launch tabs main writes keep the window's focus rule, prompt and outcome (layout-owner build)
…ow's ids, and the pane attaches to it (layout-owner build)
…s layout holds, with no window tree (layout-owner build, L197)
…t to, and a failed start keeps the tab's startup
…hy, which drops its hold and prompt; a rename through main answers the name it stored (layout-owner build)
… and a failed start's startup never runs twice
…, so no runtime module loads before its base class
…m what phones list at once, not at the window's next publish (layout-owner build)
…w asks over IPC, which labels itself a client (layout-owner build)
…es draw land in that server's main (layout-owner build)

- Routes setTabProps, setChatPane and non-terminal renameTab to the server's main as layout.apply;
  closes, starts, sleeps and terminal names keep the RPCs that main now applies (session.tabs.close,
  terminal.close, terminal.split, session.tabs.createTerminal, terminal.rename). A window-style
  closeTabs is never routed: main takes it as already stopped and stops nothing.
- A close the server refuses (a pinned tab) redraws the workspace from the server's frames, so the
  window's optimistic drop never outlives the answer; same for a refused pane close.
- A frame-drawn workspace keeps none of the mirror's ledgers (L240): no tab-id mappings, close or
  focus intents; they stay only for servers without layout.intents.v1 until the Phase 2 cutoff.
  Its pane-geometry push is skipped (it goes as intents); pane renames still push.
- e2e: paired-desktop-server-layout-writes covers close (layout, session.tabs, terminal stop),
  rename, split and new tab on a windowless switch-on serve.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The desktop now routes supported layout commands to paired servers and applies replies using the answering frame stream. Frame positions and epochs are tracked separately for each runtime target. Frame-drawn workspaces use server layout state for selected tab, pane, and snapshot operations, with redraw handling for specified failures. The changes also add unit and end-to-end tests for routing, frame-drawn writes, tab ordering, splitting, closing, renaming, and terminal creation.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to a0014

A refused tab close during server-stream replacement may leave the displayed layout out of sync, and the parity tests may not detect a rendering mismatch. These bounded risks warrant owner awareness before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 56.06% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 66 functions across 38 files. 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 identifies the primary change: routing paired-desktop layout operations to the server in switch-on builds.
Description check Passed The description is complete and follows the repository template. It explains the user impact, implementation, rationale, testing, scope, known issues, and compatibility considerations.
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.
✨ Finishing Touches: 💡 1
📝 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.

❤️ 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: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a3874c5a-f809-483c-8a41-8deb9a398be2
📥 Commits

Reviewing files that changed from the base of the PR and between 5f50b95 and 90f19e6.

📒 Files selected for processing: 37
  • .github/workflows/layout-owner-e2e.yml
  • src/main/runtime/paired-desktop-server-writes-layout-owner.test.ts
  • src/renderer/src/components/tab-group/tab-group-layout-owner-commands.test.ts
  • src/renderer/src/components/tab-group/tab-group-layout-owner-commands.ts
  • src/renderer/src/components/terminal-pane/layout-owner-pane-close.test.ts
  • src/renderer/src/components/terminal-pane/terminal-layout-title-persist.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-pane-detach-layout-owner.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-layout-owner-commands.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-layout-owner-commands.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-layout-owner-gestures.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-tab-detach-frame-drawn.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-close-actions.ts
  • src/renderer/src/runtime/layout-apply-hold-release.ts
  • src/renderer/src/runtime/layout-apply-send.test.ts
  • src/renderer/src/runtime/layout-apply-send.ts
  • src/renderer/src/runtime/layout-frame-position.test.ts
  • src/renderer/src/runtime/layout-frame-position.ts
  • src/renderer/src/runtime/layout-frame-stream.ts
  • src/renderer/src/runtime/layout-owner-command.test.ts
  • src/renderer/src/runtime/server-layout-apply-routes.ts
  • src/renderer/src/runtime/server-layout-apply.test.ts
  • src/renderer/src/runtime/server-layout-apply.ts
  • src/renderer/src/runtime/server-layout-frame-ids.ts
  • src/renderer/src/runtime/server-layout-frames.ts
  • src/renderer/src/runtime/web-runtime-session-frame-drawn-writes.test.ts
  • src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts
  • src/renderer/src/runtime/web-runtime-session-undelivered-close.ts
  • src/renderer/src/runtime/web-runtime-terminal-actions.ts
  • src/renderer/src/runtime/web-session-tabs-sync/active-session-subscription.ts
  • src/renderer/src/runtime/web-session-tabs-sync/apply-snapshot.ts
  • src/renderer/src/runtime/web-session-tabs-sync/frame-drawn-server-workspaces.test.ts
  • src/renderer/src/runtime/web-session-tabs-sync/frame-drawn-server-workspaces.ts
  • src/renderer/src/runtime/web-session-tabs-sync/initial-terminal-seeder.ts
  • tests/e2e/helpers/paired-desktop-server-layout.ts
  • tests/e2e/paired-desktop-server-layout-frames.spec.ts
  • tests/e2e/paired-desktop-server-layout-intents.spec.ts
  • tests/e2e/paired-desktop-server-layout-writes.spec.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.

Comment on lines +73 to +102
export async function desktopTree(page: Page, worktreeId: string): Promise<Tree> {
return page.evaluate((id) => {
const state = window.__store!.getState()
const tabs = state.unifiedTabsByWorktree[id] ?? []
type Node = { type: 'leaf'; leafId: string } | { type: 'split'; first: Node; second: Node }
const leaves = (node: Node | null | undefined): string[] =>
!node
? []
: node.type === 'leaf'
? [node.leafId]
: [...leaves(node.first), ...leaves(node.second)]
return (state.groupsByWorktree[id] ?? []).map((group) => ({
id: group.id,
tabs: group.tabOrder.map((tabId) => {
const tab = tabs.find((candidate) => candidate.id === tabId)
if (!tab) {
return { id: tabId, kind: 'missing', panes: [] }
}
return {
id: tab.id,
kind: tab.contentType,
panes:
tab.contentType === 'terminal'
? leaves(state.terminalLayoutsByTabId[tab.entityId]?.root)
: []
}
})
}))
}, worktreeId)
}

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Check the desktop side of the parity assertion in the DOM, not in the store.

desktopTree reads groupsByWorktree, unifiedTabsByWorktree, and terminalLayoutsByTabId from window.__store. expectFrameDrawnTreeMatchesServer compares that store copy with the server layout. The intents spec and the writes spec use this comparison as their main assertion. Two failures can pass undetected:

  • The frame sync writes the correct store state, but the tab strip renders the wrong tab order.
  • The tab strip still renders a closed tab.

Add a DOM read of the tab order next to the store tree. For example, read the [data-testid="sortable-tab"] elements and their data-tab-id values for each group. Read the .pane[data-leaf-id] elements for pane order. Then require the DOM order to match the server tree as well.

The writes spec also performs the rename step through setTabCustomTitle on the store. It does not use the tab-rename UI, so that step does not test the user rename path.

As per coding guidelines: "Use window.__store for setup; assert user-visible behavior through the DOM (getByRole, toBeVisible, toHaveText). Writing state and reading it back cannot catch broken rendering. This applies to hidden CDP-driven renderers too."

Source: Coding guidelines

…ver sends an anchor the server does not hold (layout-owner build)
…the routing point, skipping desktop-only tabs (layout-owner build)

@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: 1


ℹ️ 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: e83d07e4-53ab-45f1-bdaf-00985d672764
📥 Commits

Reviewing files that changed from the base of the PR and between 90f19e6 and a001413.

📒 Files selected for processing: 10
  • src/renderer/src/components/tab-group/tab-group-layout-owner-commands.test.ts
  • src/renderer/src/components/tab-group/tab-group-layout-owner-commands.ts
  • src/renderer/src/components/terminal-pane/pty-connection-main-pane-restore-start.test.ts
  • src/renderer/src/runtime/layout-apply-send.ts
  • src/renderer/src/runtime/layout-frame-stream.ts
  • src/renderer/src/runtime/server-layout-apply.test.ts
  • src/renderer/src/runtime/server-layout-apply.ts
  • src/renderer/src/runtime/server-layout-frames.ts
  • src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts
  • src/renderer/src/runtime/web-session-user-tab-close-params.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.

Comment on lines +201 to +205
const frameDrawn = isServerFrameDrawnWorkspace(environmentId, args.worktreeId)
const immediateHostTabId = toHostSessionTabId(args.tabId)
if (isClose) {
// The host's id for this tab; a frame-drawn close that never arrived is held under it for replay.
let closeHostTabId = immediateHostTabId
if (isClose && !frameDrawn) {

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

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
# Inspect whether frame-drawn classification requires a registered layout route.
rg -n -C 6 \
  'isFrameDrawnServerWorkspace|isServerFrameDrawnWorkspace|layout\.intents\.v1|serverLayoutApplyRoute|redrawServerLayoutWorkspace' \
  src/renderer/src/runtime/server-layout-apply-routes.ts \
  src/renderer/src/runtime/server-layout-frames.ts \
  src/renderer/src/runtime/web-session-tabs-sync/frame-drawn-server-workspaces.ts

Repository: stablyai/orca

Length of output: 7455


🏁 Script executed:

set -e
printf '%s\n' '--- route registry ---'
nl -ba src/renderer/src/runtime/server-layout-apply-routes.ts | sed -n '1,180p'
printf '%s\n' '--- frame workspace state call sites ---'
rg -n -C 8 -F -- \
  'setFrameDrawnServerWorkspaces' \
  src/renderer/src/runtime/server-layout-frames.ts \
  src/renderer/src/runtime/web-session-tabs-sync/frame-drawn-server-workspaces.ts
printf '%s\n' '--- route provider call sites ---'
rg -n -C 12 -F -- \
  'provideServerLayoutApplyRoutes' \
  src/renderer/src/runtime/server-layout-frames.ts \
  src/renderer/src/runtime
printf '%s\n' '--- capability and frame lifecycle references ---'
rg -n -C 8 -e 'layout\.intents\.v1' -e 'showServerLayoutFrames' -e 'isFrameDrawnServerWorkspace' -e 'serverLayoutApplyRoute' \
  src/renderer/src/runtime/server-layout-frames.ts \
  src/renderer/src/runtime/web-session-tabs-sync/frame-drawn-server-workspaces.ts \
  src/renderer/src/runtime/server-layout-apply-routes.ts

Repository: stablyai/orca

Length of output: 31658


🏁 Script executed:

set -e
printf '%s\n' '--- installServerLayoutFrames lifecycle ---'
nl -ba src/renderer/src/runtime/server-layout-frames.ts | sed -n '55,235p'
printf '%s\n' '--- lifecycle close and redraw flow ---'
nl -ba src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts | sed -n '150,285p'

Repository: stablyai/orca

Length of output: 15289


🏁 Script executed:

set -e
printf '%s\n' '--- installServerLayoutFrames teardown and callers ---'
nl -ba src/renderer/src/runtime/server-layout-frames.ts | sed -n '234,335p'
rg -n -C 12 -e 'serverFrames\.close|frames\.close|close\(false\)|close\(true\)|returnWorkspaces' \
  src/renderer/src/runtime/server-layout-frames.ts \
  src/renderer/src/runtime \
  --glob '*.ts' --glob '*.tsx'

Repository: stablyai/orca

Length of output: 17484


🏁 Script executed:

set -e
printf '%s\n' '--- lifecycle imports and post-RPC handling ---'
nl -ba src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts | sed -n '1,90p'
nl -ba src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts | sed -n '260,390p'
printf '%s\n' '--- route API usages in lifecycle ---'
rg -n -C 8 -e 'redrawServerLayoutWorkspace|serverLayoutApplyRoute|isServerFrameDrawnWorkspace' \
  src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts

Repository: stablyai/orca

Length of output: 13139


Retain recovery when the server layout route is unavailable.

During stream replacement, close(false) removes the old route but preserves the frame-drawn classification for the replacement stream. Before its first snapshot, redrawServerLayoutWorkspace has no route. A refused close can therefore skip mirror intent recording and fail to redraw the workspace. Use the mirror close-intent and recovery path when the redraw route is unavailable. Do not clear the inherited classification unconditionally.

@Jinwoo-H
Jinwoo-H merged commit 4dd97f0 into main Oct 22, 2026
46 checks passed
Jinwoo-H added a commit that referenced this pull request Oct 22, 2026
…mark reach a server's own layout (dark, layout-owner build only; stacked on #31714) (#31869)

* wip(h5c-1): server workspace layout intents go to the server's main; positions per stream

* wip(h5c-1): e2e without a cast

* fix(h5c-1): a routed move never moves here; routed callers read the server's stream; a restarted main starts its positions over

* fix(h5c-1): layout-apply-send back under its line limit

* test(h5c-1): a routed answer reaches the handler with the server's stream key

* fix(terminal): a CLI or phone close through main keeps a pinned tab, as the window-era close did

* feat(terminal): main applies phone closes, renames, pane titles, sleeps and agent-launch tabs itself, with or without a window (layout-owner build)

* fix(terminal): a tab close through main also ends the tab's dormant SSH relay session; agent-launch tabs main writes keep the window's focus rule, prompt and outcome (layout-owner build)

* feat(terminal): main starts a new tab's first terminal under the window's ids, and the pane attaches to it (layout-owner build)

* test(terminal): tests that counted the window's create calls or publications see main's start of a new tab

* fix(terminal): an account-switch restart binds only into a pane main's layout holds, with no window tree (layout-owner build, L197)

* test(terminal): the new-tab start tests hold no type assertions; the start's ledger row is L252

* fix(terminal): a new tab's pane attaches to any terminal main binds it to, and a failed start keeps the tab's startup

* test(terminal): a Claude account-switch restart's tests draw the pane main holds

* fix(terminal): a launch pane main takes back still tells the window why, which drops its hold and prompt; a rename through main answers the name it stored (layout-owner build)

* fix(terminal): a new tab another owner's terminal won attaches to it, and a failed start's startup never runs twice

* fix(terminal): main's pane close reads its stop result as a type only, so no runtime module loads before its base class

* fix(terminal): a phone's close through main drops the closed rows from what phones list at once, not at the window's next publish (layout-owner build)

* chore(terminal): mark the phone-close row drop interim (ledger L260)

* test(worktree-create): a new local tab's startup counts as run when main starts it (layout-owner build)

* test(worktree-create): record main's starts without a type assertion

* fix(terminal): a tab closed before main declines its start gets no startup back (layout-owner build)

* fix(terminal): the window's new tab starts in main when its own window asks over IPC, which labels itself a client (layout-owner build)

* feat(h5c-2): a paired desktop's writes to a server workspace its frames draw land in that server's main (layout-owner build)

- Routes setTabProps, setChatPane and non-terminal renameTab to the server's main as layout.apply;
  closes, starts, sleeps and terminal names keep the RPCs that main now applies (session.tabs.close,
  terminal.close, terminal.split, session.tabs.createTerminal, terminal.rename). A window-style
  closeTabs is never routed: main takes it as already stopped and stops nothing.
- A close the server refuses (a pinned tab) redraws the workspace from the server's frames, so the
  window's optimistic drop never outlives the answer; same for a refused pane close.
- A frame-drawn workspace keeps none of the mirror's ledgers (L240): no tab-id mappings, close or
  focus intents; they stay only for servers without layout.intents.v1 until the Phase 2 cutoff.
  Its pane-geometry push is skipped (it goes as intents); pane renames still push.
- e2e: paired-desktop-server-layout-writes covers close (layout, session.tabs, terminal stop),
  rename, split and new tab on a windowless switch-on serve.

* fix(h5c-2): an undelivered close of a frame-drawn tab is held for replay; a launch-agent clear stays off the server route

* refactor(h5c-2): the undelivered-close test moves to its own module, keeping the lifecycle file under its line cap

* fix(layout): a paired desktop's pane detach, handle-less split and default-tabs mark on a server workspace go to the server's main (layout-owner build, L272/L276/L275)

* fix(layout): a pane a paired server's main detached takes the terminal the server's frame drew, not the desktop's possibly stale one (layout-owner build, L272)

* test(layout): the detach test resets the drawn layout after each case

* test(layout): drop the in-test reset the afterEach now covers
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