Skip to content

[Bug]: Tab group split ratio reverts to the host's layout on a remote runtime environment #13218

Closed

Description

@wongang2

Operating system

macOS

Orca version

1.4.175 (code references below are from a 1.4.157 tree, but the same shape is present in the 1.4.175 bundle)

Details

Short summary

When a desktop client is connected to a remote runtime environment, resizing tab group splits (the divider between side-by-side / stacked tab groups) does not stick. Within seconds the divider snaps back to the ratio configured on the host machine. Splits inside a tab (the terminal pane tree) do persist, so two very similar interactions behave differently.

Reproduction

  1. Machine A (host) runs Orca and shares its runtime environment.
  2. Machine B connects to A's environment and works in the mirrored session.
  3. On B, open a worktree that has two tab groups and drag the divider between them to change the ratio.
  4. Trigger anything that produces a host-side tab snapshot — e.g. an agent updates a tab title or status on A.
  5. The divider on B jumps back to A's ratio.

Expected: each client keeps its own tab group layout. Screen sizes differ between machines, so the host's ratio is rarely right for the client.

Actual: the host's layout is authoritative and re-applied on every snapshot; the client's drag is effectively write-only to the screen.

What I found while debugging

  • There is no upstream RPC carrying group-level layout. The session.tabs.* method set contains updatePaneLayout (the pane tree inside a tab, which is why that one persists) but nothing for tabGroupLayout / group ratio. I verified the method list in the shipped 1.4.175 bundle as well.
  • src/renderer/src/runtime/web-session-tabs-sync.ts:2371-2411 recomputes layoutByWorktree[worktreeId] from snapshot.tabGroupLayout on every host snapshot. Local layout survives only for extraGroupIds — groups the host does not know about. For any group the host does know about, the host ratio wins.
  • src/renderer/src/lib/runtime-session-mirror-owners.ts:23-28 includes activeRuntimeEnvironmentId in the mirrored environment set, so this sync path appears to be reached by desktop clients on a remote environment, not only by the browser client. The symptom above was observed on a desktop client.
  • For paired web clients, src/renderer/src/web/web-workspace-session.ts:4-18 persists only four session fields, so tabGroupLayouts is not retained client-side either — the value is neither sent upstream nor stored locally.

Suggested direction

Either persist tab group layout per client (alongside the existing per-host workspace session partitioning), or add a session.tabs.updateGroupLayout-style method so a client's own window layout is the source of truth for that client. Treating the host's ratio as authoritative for every connected client makes remote sessions unusable on a differently sized screen.

Activity

  1. AmethystLiang commented on Aug 8, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  2. soichisumi commented on Aug 12, 2026

    @soichisumi
    Contributor

    Additional data points from an independent setup (v1.4.179, macOS, paired remote runtime over WebSocket)

    We hit the same symptom (outer tab-group divider reverting on a remote-runtime-owned workspace) and did some digging that may help narrow this down:

    1. Persisted-state signature matches the "missing ratio" description in [Bug]: Remote outer tab-group divider snaps back to 50/50 after session updates #11162. In orca-data.json (workspaceSessionsByHostId["runtime:<env-id>"].tabGroupLayouts), the affected workspace has a nested split layout whose two "type":"split" nodes both lack the ratio field entirely — identical across 5 consecutive hourly backup generations (~4h window). So the divider is not reverting to a stored 50/50; the ratio never gets persisted at all.
    2. It does NOT affect all remote-owned workspaces. Of 24 workspaces owned by our paired remote runtime, 13 have split layouts, and only 2 of those 13 show the missing-ratio signature; the other 11 persist ratios correctly. This distribution is consistent with the corrected (narrower) scope described in [Bug]: Remote outer tab-group divider snaps back to 50/50 after session updates #11162 — client-only composite layouts losing nesting/ratios when the host omits topology — rather than "host ratio always wins for every drag".
    3. Code check at main HEAD a0a654c3a9 (as of 2026-08-11): setTabGroupSplitRatio commits renderer-locally with no RPC; the session.tabs.* method list has updatePaneLayout (inner pane tree) but no outer group-ratio mutation; web-session-tabs-sync.ts reapplies snapshot.tabGroupLayout as authoritative. Matches what this issue and [Bug]: Remote outer tab-group divider snaps back to 50/50 after session updates #11162 describe.
    4. Possibly related packaging note: the fix for One invalid field in one tab record wipes the entire persisted workspace session at startup #12918 (PR fix(persistence): salvage corrupt workspace session entries #13431, merged) is not an ancestor of either the v1.4.179 or v1.4.180 release tag (git merge-base --is-ancestor against the tags), so that state-wipe symptom can still occur on the latest tagged releases.
  3. bbingz commented on Aug 19, 2026

    @bbingz
    Contributor

    There's an open PR for this: #13224.

    Once a remote client has laid out all of the host's tab groups, it keeps its own split ratios instead of letting a subsequent host snapshot pull them back.

    2 files / 169 lines, mergeable. No CI results yet (fork workflow approval pending).

  4. added theissue type on Sep 19, 2026
  5. nwparker commented on Oct 26, 2026

    @nwparker
    Contributor

    Closing as a duplicate of #11162, which tracks the same tab-group divider snapping back to the host's layout on a remote runtime.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggitos:macosIssues affecting macOS

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions