fix(sidebar): keep OMP split-pane status tied to its PTY - #21671
Merged
Merged
Conversation
Contributor
|
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
force-pushed
the
fix/omp-15557-sparse-pane-status
branch
from
September 19, 2026 12:45
1aada8d to
4381d0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
ptyIdsByTabId, then resolve each PTY throughterminalLayoutsByTabId.ptyIdsByLeafId.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/orcaworktree/private/tmp/orca-15557-fix;/Users/nwparker/projects/oh-my-piwas 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.pnpm tc:web— passed.pnpm run check:code-quality:changed— 0 findings across all changed-file gates.git diff --check— passed.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 remainsworkingafter 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
/Users/nwparker/projects/oh-my-pi