Skip to content

fix(sidebar): keep OMP split-pane status tied to its PTY - #21671

Merged
nwparker merged 1 commit into
mainfrom
fix/omp-15557-sparse-pane-status
Sep 19, 2026
Merged

nwparker merged 1 commit into
mainfrom
fix/omp-15557-sparse-pane-status

Conversation

@nwparker

@nwparker nwparker commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​137 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​137
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​111 $\color{#cf222e}{\Huge{\mathbf{−}}}$​26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​85

ELI5

When a split terminal closes one pane, the remaining panes keep their process IDs, but the terminal's numeric pane IDs can have gaps. Orca used the pane number as if it were still a neat 1, 2, 3 list, so it could put a finished OMP pane's title on its sibling and leave the sidebar showing Running forever.

This change follows each live pane's PTY (the process Orca is actually displaying) back to its stable layout leaf. A completed OMP pane now settles its own sidebar row while a still-running sibling remains Running.

What changed

  • Keep the existing dense, parked-tab, and title-matching resolution paths.
  • For sparse live PaneManager IDs, map the live slot order to ptyIdsByTabId, then resolve each PTY through terminalLayoutsByTabId.ptyIdsByLeafId.
  • Share the sparse-slot resolver with the existing runtime title mapping code.
  • Add regressions for parked slots, revealed tabs, nested splits, closed panes, and sparse IDs whose layout order differs from PTY order.

This supersedes the attribution portion of #14702 and addresses #15557. It does not change OMP, hook transport, daemon lifetime, or user-facing title styling.

Verification

All commands ran in the isolated stablyai/orca worktree /private/tmp/orca-15557-fix; /Users/nwparker/projects/oh-my-pi was read-only and was not modified.

  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.test.ts src/renderer/src/lib/runtime-pane-title-leaf-id.test.ts — 33/33 passed.
  • Related sidebar/runtime suites — 62/62 passed.
  • pnpm tc:web — passed.
  • pnpm run check:code-quality:changed — 0 findings across all changed-file gates.
  • git diff --check — passed.
  • Commit hooks (oxlint, React Doctor, oxfmt) — passed.

The focused regression drives OMP-compatible spinner/ready titles through the same row projection used by the sidebar and asserts the exact pane keys, provider labels, and idle/working states. This is stronger than a screenshot-only check because it exercises the identity mapping that caused the bug.

Visual proof

No layout or styling changed, so a screenshot would not prove the identity bug. The regression captures the user-visible result: the completed pane is idle, while its OMP sibling remains working after a sparse split/close sequence.

Merge risk / readiness

Low merge risk. Three renderer-only TypeScript files, no wire/schema/provider changes, and no OMP source changes. Existing dense and parked paths remain covered. Ready for review after required CI is green.

Checklist

  • ELI5 included
  • Focused regression tests included
  • OMP source inspected read-only at /Users/nwparker/projects/oh-my-pi
  • Typecheck, quality, formatting, and diff checks passed
  • Cross-pane behavior verified with sparse IDs and mismatched layout order
  • No negative user-facing trade-off identified

@pullfrog

pullfrog Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Use stable PTY-to-leaf bindings when in-session pane closes leave sparse runtime pane ids. Keep the existing parked and dense slot resolution paths, and cover the completed OMP pane/sibling-running case from #15557.

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
@nwparker
nwparker force-pushed the fix/omp-15557-sparse-pane-status branch from 1aada8d to 4381d0c Compare September 19, 2026 12:45
@nwparker
nwparker merged commit 5cc89b6 into main Sep 19, 2026
29 checks passed
@nwparker
nwparker deleted the fix/omp-15557-sparse-pane-status branch September 19, 2026 12:57
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