Skip to content

fix(omp): handle static WSL titles and clear stale spinners - #13891

Closed
euclodius wants to merge 2 commits into
stablyai:mainfrom
euclodius:fix-omp-wsl-status
Closed

euclodius wants to merge 2 commits into
stablyai:mainfrom
euclodius:fix-omp-wsl-status

Conversation

@euclodius

@euclodius euclodius commented Aug 12, 2026 •

Copy link
Copy Markdown

Summary

  • Classify bare and wrapper-prefixed OMP 17.2.12+ WSL/ConPTY titles as working, idle, or permission.
  • Preserve the legacy no-space π: title as idle.
  • Stop a pane's synthetic title spinner when its ordinary hook status is cleared.
  • Leave connection-scoped transient clears isolated from pane spinner state.
  • Document the native-title and status-clear invariants on the new exported functions.

Closes #13890

Screenshots

No screenshots attached. The fix changes terminal-title-derived status rather than layout or styling. The live smoke was verified through Orca's terminal and worktree APIs without publishing local workspace or session data.

Testing

  • pnpm lint — not run project-wide; the pre-commit oxlint, React Doctor lint, and oxfmt tasks passed for all changed files.
  • pnpm typecheck — pnpm run typecheck:node and pnpm run typecheck:web passed.
  • pnpm test — not run project-wide; 3 focused suites passed locally (95 tests).
  • pnpm build — not run as a production build; the Electron dev runtime launched successfully.
  • Added regression coverage for bare and wrapper-prefixed native OMP states, main/renderer working-to-idle parity, ordinary pane clear cleanup, and transient connection-clear isolation.
  • A/B runtime validation on Windows + WSL2:
    • OMP 17.2.11: three consecutive standard-launcher turns ended in done with no stuck spinner.
    • Isolated OMP 17.2.14 under the patched Orca dev runtime: the static working title normalized to ⠋ Pi, then returned to Pi after completion.

AI Review Report

Reviewed the native OMP title → shared status classifier → main/renderer title tracker path and the hook clear → synthetic spinner lifecycle. The review covered delimiter precedence, the legacy no-space π: title, nested wrapper prefixes, working-to-idle ordering, ordinary pane clears, and connection-scoped transient clears.

An independent review found that the first parser version missed wrapper-prefixed titles such as zsh | π : cwd. The parser was updated to use the repository's existing getWrapperTitleSegments convention, bare and nested-wrapper regression cases were added, and the follow-up review returned APPROVE with no remaining actionable findings.

Cross-platform scope was checked explicitly: the new state-title protocol is used for WSL/ConPTY, existing animated Pi-compatible titles remain unchanged, and the shared parser behavior stays identical between main and renderer paths.

Security Audit

This change adds no network requests, credentials, persistence, renderer IPC surface, or privilege boundary. Native title parsing is bounded to existing terminal-title strings and requires an explicit π state delimiter. The no-space legacy π: form remains idle to avoid broadening the working match.

Pane-scoped clears stop only the addressed spinner. Connection-scoped transient clears carry no pane key and are intentionally ignored, preserving the existing cross-connection isolation contract.

Notes

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f1d07d6b-5705-4388-bb81-cf281b2bbfb3

📥 Commits

Reviewing files that changed from the base of the PR and between 0a0ae97 and d2ed811.

📒 Files selected for processing (7)
  • src/main/index.ts
  • src/main/synthetic-title-spinner.test.ts
  • src/main/synthetic-title-spinner.ts
  • src/renderer/src/components/terminal-pane/terminal-title-tracker-parity.test.ts
  • src/shared/agent-detection.test.ts
  • src/shared/agent-title-status.ts
  • src/shared/pi-compatible-synthetic-title.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/shared/agent-detection.test.ts
  • src/main/synthetic-title-spinner.ts
  • src/main/index.ts
  • src/main/synthetic-title-spinner.test.ts
  • src/shared/agent-title-status.ts
  • src/renderer/src/components/terminal-pane/terminal-title-tracker-parity.test.ts

📝 Walkthrough

Walkthrough

The change adds native Pi/OMP title detection for working, permission, and idle states, including wrapped terminal titles. Native detection runs before synthetic and general title detection. The main process now stops synthetic title spinners for pane-scoped status-clear events. Connection-scoped clears do not stop spinners. Tests cover title parsing, renderer/main parity, and spinner cleanup behavior.

Mergeability Score: ⚪ Minimal · up to d2ed8

The change updates native title status handling and spinner cleanup with focused regression coverage and runtime validation; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the static WSL title handling and stale spinner cleanup addressed by the changes.
Description check ✅ Passed The description provides clear scope, rationale, linked issue, testing results, runtime validation, and security notes.
Linked Issues check ✅ Passed The changes satisfy issue #13890 by adding native title classification, spinner-clear isolation, and regression coverage.
Out of Scope Changes check ✅ Passed The parser, lifecycle, documentation, and regression tests are directly related to the linked issue objectives.

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.

@euclodius

Copy link
Copy Markdown
Author

This is effectively P0 for the Windows + WSL OMP workflow. OMP 17.3.0 contains Grok fixes we need, but it retains the static ConPTY title states that this PR handles. Upgrading before this Orca fix makes live agent status unreliable: the working state can disappear or the workspace spinner can remain stuck after a turn completes. That leaves us pinned to an older OMP build and unable to use the newer Grok support in the normal Orca workflow. The implementation is narrowly scoped, reproduced, and already has focused regression coverage. Could this please be prioritized for review, merge, and the next stable release?

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@euclodius

Copy link
Copy Markdown
Author

Related OMP lifecycle work has now appeared in #14279 and #14330 (tracking #14278).

They confirm a second cause of the same user-visible stuck-working symptom: Orca's generated OMP extension can wait forever for agent_settled / ctx.isIdle() instead of settling terminal agent_end from willContinue. #14279 is the broader integration fix; #14330 is the narrower willContinue fix.

This PR remains complementary and non-duplicative:

I added reciprocal comments on both newer PRs so these changes can be evaluated together rather than as competing fixes.

@euclodius

Copy link
Copy Markdown
Author

Completing the cross-link: #13923 is the competing implementation for the same #13890 WSL/ConPTY native-title and stale-spinner bug addressed here.

The related OMP lifecycle pair remains #14279 / #14330 for #14278 (agent_end / willContinue). Maintainers can choose the preferred implementation within each pair; the roots are distinct, but the combined user-facing status failure needs urgent triage.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@OrcaWin

OrcaWin commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

#13923 is the implementation to land for #13890. It is now rebased on current origin/main at 36e5dd46b3.

This PR is incomplete for the same bug:

  • Native-title parsing lives in the synthetic-title module and still splits on wrapper segments, so an OMP label that legally contains | or Gemini glyphs can steal status.
  • Spinner cleanup is wired to pane-scoped agentStatus:clear (PTY teardown / alias eviction), not dropStatusEntry. Dismissing a live hook row therefore leaves the 80ms synthetic spinner running.
  • There is no stale native-title neutralization (π : → π > through the existing 3s title-free fallback).

#13923 owns those contracts: shared first-marker opaque parser, subscribeStatusDrop → spinner stop, and clearOmpNativeWorkingStatus. Transient SSH clearStatusEntriesForConnection does not emit status-drop (locked by test on Windows/WSL after rebase). Leaving this PR open for comparison; not closing or merging either PR from this review.

@nwparker

Copy link
Copy Markdown
Contributor

Closing as superseded by #14602, which states: "Supersedes #13891 and #13923, which each fix part of this. Neither is modified or closed by this PR." The static WSL title handling landed there. Please reopen if anything from this branch is still missing.

@nwparker nwparker closed this Sep 14, 2026
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.

[Bug]: OMP 17.2.12+ loses working status and can leave a spinner stuck on WSL

4 participants