Skip to content

Fix OMP spaced-colon working title detection after owner rewrite - #17723

Closed
shahidbeig-a11y wants to merge 4 commits into
stablyai:mainfrom
shahidbeig-a11y:cursor/fix-omp-spaced-colon-title-7950
Closed

shahidbeig-a11y wants to merge 4 commits into
stablyai:mainfrom
shahidbeig-a11y:cursor/fix-omp-spaced-colon-title-7950

Conversation

@shahidbeig-a11y

Copy link
Copy Markdown
Contributor

ELI5

When OMP is working on WSL, its pane title looks like π : Run a long task. Orca rewrites that to OMP : Run a long task for display, but the status parser only recognized the spaced colon while the brand was still π. After the rewrite, Orca stopped seeing the pane as working and the sidebar fell back to a green active dot.

What Changed

  • Teach getPiCompatibleTitleSeparatorStatus to treat OMP : <label> (and the equivalent π/Pi forms) as a working state marker, matching the existing π : protocol.
  • Teach getAgentLabel to recognize OMP : <label> as OMP identity so title-derived sidebar rows survive the owner rewrite.
  • Add regression tests for both the raw π : title and the rewritten OMP : title.

Why

OMP 17.2.12+ emits static π : <label> markers on WSL/ConPTY instead of braille frames. Orca's owner rewrite swaps π → OMP in place, but the compatible separator regex only matched an attached colon or spaced !/>/- — not spaced colon after OMP. Hook-less panes then lost title-derived working status and identity (#17690).

Linked Issue

Fixes #17690

Visual Proof

N/A — title parsing fix only; no UI layout or styling change. The sidebar spinner vs green-dot behavior is driven by this detection path.

Testing

  • pnpm test src/shared/omp-pi-semantic-title-preservation.test.ts src/shared/pi-state-title-marker.test.ts src/shared/agent-detection.test.ts
  • pnpm tc
  • pnpm run check:code-quality:changed
  • Manual repro via tsx: detectAgentStatusFromTitle('OMP : Run a long task') now returns working and getAgentLabel returns OMP

Platforms: logic-only shared module change; no platform-specific code paths touched.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

AI Disclosure

Implemented by Cursor Cloud Agent.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Cross-platform: shared title parser only; OMP WSL/ConPTY is the reported environment but the fix is brand-agnostic.
  • SSH/remote: title detection runs on the same shared path for local and remote panes.
  • Performance: one additional character-class in an existing anchored regex; no hot-path allocation.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • 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)

@greptile-apps

greptile-apps Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR preserves OMP identity and working status after rewriting the WSL/ConPTY π : <label> title form.

  • Recognizes rewritten OMP : <label> titles as OMP-owned.
  • Classifies spaced-colon Pi-compatible titles as working.
  • Preserves semantic labels across owner normalization and repeated rewrites.
  • Adds focused regression coverage for raw and rewritten title forms.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/shared/agent-title-identity.ts Adds exact-case OMP identity recognition for the rewritten spaced-colon title protocol.
src/shared/agent-title-owner.ts Rewrites Pi-compatible spaced-colon brands in place while preserving the semantic title label.
src/shared/pi-compatible-synthetic-title.ts Extends separator parsing so spaced colons represent the Pi-compatible working state.
src/shared/omp-pi-semantic-title-preservation.test.ts Covers raw and rewritten spaced-colon status, identity, preservation, and idempotence behavior.

Reviews (3): Last reviewed commit: "Pin session label in OMP spaced-colon fi..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 31, 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: Team

Run ID: c915d48e-85d2-411c-9de9-6ba3bac058ba

📥 Commits

Reviewing files that changed from the base of the PR and between 1910ab9 and bc79ffb.

📒 Files selected for processing (5)
  • src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.test.ts
  • src/shared/agent-title-identity.ts
  • src/shared/agent-title-owner.ts
  • src/shared/omp-pi-semantic-title-preservation.test.ts
  • src/shared/pi-compatible-synthetic-title.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/shared/agent-title-owner.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds spaced-colon support for OMP/Pi synthetic titles. The parser classifies : as working while preserving existing ! and idle handling. getAgentLabel identifies owner-rewritten OMP titles. Tests cover status classification, label detection, owner rewrites, status preservation, and fixed-point behavior.

Merge Risk: ⚪ Minimal · up to bc79f

The parser now recognizes spaced-colon working titles for OMP, π, and Pi, preserving working status and identity after owner rewriting. This is a localized title-classification change with regression coverage and no execution, access-control, storage, service, or deployment behavior changes; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 5 files. 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 main change: fixing OMP spaced-colon working-title detection after owner rewriting.
Description check ✅ Passed The description includes all required sections, explains the problem and solution, links issue #17690, documents testing, and addresses visual proof, compatibility, performance, and checklist items.
Linked Issues check ✅ Passed The changes satisfy issue #17690 by recognizing OMP : as a working title with OMP identity and preserving title-derived sidebar behavior. The additional separator handling and regression cover…
Out of Scope Changes check ✅ Passed The changes remain within scope. The parser updates, owner normalization, identity detection, and renderer tests directly support OMP/Pi title preservation and the linked issue requirements.
Full details: Linked Issues check

Explanation

The changes satisfy issue #17690 by recognizing OMP : <label> as a working title with OMP identity and preserving title-derived sidebar behavior. The additional separator handling and regression coverage address the documented reviewer requirements. [#17690]

  • Fix all pre-merge checks with AI

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.

@pullfrog pullfrog 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.

Important

The getAgentLabel change breaks the owner-rewrite fixed-point invariant — a second rewrite pass collapses OMP : <label> to ⠋ OMP and drops the session label. Details inline.

Reviewed changes

  • Separator status: PI_COMPATIBLE_SEPARATOR_RE now accepts a spaced : and getPiCompatibleTitleSeparatorStatus maps match[1] === ':' to working, so π : <label> and OMP : <label> classify as working.
  • OMP identity: getAgentLabel returns OMP for an OMP :-prefixed title.
  • Regression tests: new coverage for the raw π : and rewritten OMP : titles, plus spaced-colon entries in the classifier and owner-relabel tables.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Comment thread src/shared/agent-title-identity.ts Resolved

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

Run ID: 960ebf31-6a77-4560-a550-be01f162ec91

📥 Commits

Reviewing files that changed from the base of the PR and between 36d2750 and c660e0c46fb57cba21c7cdb6ef110432ac076982.

📒 Files selected for processing (2)
  • src/shared/agent-title-owner.ts
  • src/shared/omp-pi-semantic-title-preservation.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@@ -170,6 +172,11 @@ export function normalizeCompatibleAgentTitleForOwner(
const segmentAt = title.lastIndexOf(source.sourceTitle)
return segmentAt === -1 ? ownedSegment : title.slice(0, segmentAt) + ownedSegment
}
if (PI_COMPATIBLE_SPACED_COLON_TITLE_RE.test(source.sourceTitle)) {
const ownedSegment = source.sourceTitle.replace(/^\s*(?:Pi|OMP)/u, ownerProfile.workingLabel)

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
set -eu

echo '--- scoped repository knowledge ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print \
  | sort
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md; do
  [ -f "$f" ] || continue
  echo "--- $f ---"
  cat "$f"
done

echo '--- target outline ---'
ast-grep outline src/shared/agent-title-owner.ts

echo '--- target implementation ---'
cat -n src/shared/agent-title-owner.ts | sed -n '1,240p'

echo '--- directly bound symbols and tests ---'
rg -n -C 4 \
  "getProfileForTitle|getAgentLabel|isLegacyPiCompatibleTitle|workingLabel|Pi :|π" \
  src test tests 2>/dev/null || true

Repository: stablyai/orca

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -eu

echo '--- target file ---'
cat -n src/shared/agent-title-owner.ts | sed -n '1,245p'

echo '--- bound helper locations ---'
rg -n --glob '*.ts' \
  "export function getAgentLabel|function getAgentLabel|export function isLegacyPiCompatibleTitle|function isLegacyPiCompatibleTitle|export function getSyntheticAgentTitleProfile|SYNTHETIC_AGENT_TITLE_PROFILES" \
  src/shared

echo '--- agent detection helper ---'
agent_file="$(rg -l --glob '*.ts' "export function getAgentLabel|function getAgentLabel" src/shared | head -n 1)"
[ -n "$agent_file" ]
cat -n "$agent_file" | sed -n '1,220p'

echo '--- Pi compatibility helper ---'
pi_file="$(rg -l --glob '*.ts' "export function isLegacyPiCompatibleTitle|function isLegacyPiCompatibleTitle" src/shared | head -n 1)"
[ -n "$pi_file" ]
cat -n "$pi_file" | sed -n '1,220p'

echo '--- focused tests ---'
rg -n -C 8 --glob '*.{test,spec}.ts' \
  "agent-title-owner|getProfileForTitle|getAgentLabel|isLegacyPiCompatibleTitle|normalizeCompatibleAgentTitleForOwner|Pi :|π :" \
  src

Repository: stablyai/orca

Length of output: 50370


Fix Pi : title detection before the re-ownership branch.

getAgentLabel('Pi : Run a long task') returns null: its Pi-compatible matcher accepts only bare/status labels, while isLegacyPiCompatibleTitle accepts only π titles. Therefore getProfileForTitle finds no profile, and the line-176 replacement cannot run. Add detection support and a π → Pi → OMP round-trip test.

@pullfrog pullfrog 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.

ℹ️ No critical issues — the fixed-point collapse from the prior review is resolved. Two minor suggestions inline.

Reviewed changes

  • Fixed-point restore: normalizeCompatibleAgentTitleForOwner now swaps the brand in place for spaced-colon OMP : <label> titles before the sourceStatus === 'working' collapse, so a second owner-rewrite pass keeps OMP : Run a long task instead of collapsing it to ⠋ OMP.
  • Regression tests: added π : and OMP : spaced-colon entries to the fixed-point re-run table.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Comment thread src/shared/agent-title-owner.ts Resolved

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Stronger fixed-point assertion: the fixed-point re-run test now also asserts the session label survives for the π : / OMP : spaced-colon entries, so the OMP : Run a long task case fails on the pre-fix collapse to ⠋ OMP instead of passing on it.

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

@euclodius

Copy link
Copy Markdown

This fixes the working OMP : <label> case, but a fresh idle OMP session remains absent from the sidebar.

Before the first turn, the owner-rewritten title is OMP > <label>:

detectAgentStatusFromTitle('OMP > New OMP session') // 'idle'
getAgentLabel('OMP > New OMP session') // null

Because buildTitleDerivedAgentRow rejects !status || !label, no row is emitted. When work starts and the title changes to OMP : <label>, this PR makes the row appear, which creates the visible “missing until work starts” behavior.

Could this PR generalize the fix instead of special-casing only OMP :?

  • derive Pi/OMP identity from the same compatible separator grammar used for status (>, !, -, spaced :, attached :);
  • use that identity in getAgentLabel;
  • preserve all recognized separator titles in place in normalizeCompatibleAgentTitleForOwner, so repeated normalization does not collapse the session label;
  • add a renderer regression in worktree-title-derived-agent-rows.test.ts asserting OMP > New OMP session produces ['omp', 'idle', 'OMP > New OMP session'].

This also removes the current identity/status asymmetry instead of adding another delimiter-specific branch.

OMP 17.2.12+ emits π : <label> on WSL/ConPTY. Orca rewrites the brand to
OMP : <label>, but getPiCompatibleTitleSeparatorStatus only matched an
attached colon or spaced !/>/- separators — not spaced colon after OMP.
That dropped title-derived working status and OMP identity, so hook-less
panes fell back to a green active dot (stablyai#17690).
Re-running normalizeCompatibleAgentTitleForOwner on OMP : <label> was
collapsing to a bare working label because getAgentLabel now recognizes
the rewritten form. Route Pi/OMP spaced-colon titles through the same
in-place brand swap as π-form titles instead of the bare-label path.
Derive OMP/Pi identity from the same separator grammar used for status
(>, !, -, spaced :, attached :), use it in getAgentLabel, and preserve
all ASCII separator titles in place during owner rewrite so idle sessions
like OMP > <label> row before the first turn (stablyai#17690).
@cursor
cursor Bot force-pushed the cursor/fix-omp-spaced-colon-title-7950 branch from f5b0bd8 to bc79ffb Compare September 2, 2026 20:29
@coderabbitai

coderabbitai Bot commented Sep 2, 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.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

The delta since the prior review generalizes Pi/OMP separator detection from the spaced-colon special case to the full π/Pi/OMP separator grammar.

  • Centralized separator-brand detection: added getPiCompatibleTitleSeparatorBrand in pi-compatible-synthetic-title.ts, returning Pi/OMP for any π/Pi/OMP title carrying a :, !, >, or - separator (null when a braille spinner is present); getAgentLabel now consumes it in place of the old OMP :-only regex.
  • Generalized owner rewrite: replaced PI_COMPATIBLE_SPACED_COLON_TITLE_RE with isPiCompatibleAsciiSeparatorTitle, so the in-place brand swap covers OMP > New OMP session and the other ASCII-branded idle/attention titles, not just OMP : <label>.
  • Regression coverage: added an idle-separator sidebar-row test and an OMP > New OMP session fixed-point entry that pin the newly recognized identity and owner-rewrite surface.

Verified the changed suites pass (176 tests across the four touched test families).

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

@shahidbeig-a11y

Copy link
Copy Markdown
Contributor Author

@euclodius thanks — addressed in bc79ffb.

That commit derives Pi/OMP identity from the same compatible separator grammar (>, !, -, spaced :, attached :), uses it in getAgentLabel, preserves those titles in place during owner rewrite, and adds the renderer regression in worktree-title-derived-agent-rows.test.ts for OMP > New OMP session → ['omp', 'idle', 'OMP > New OMP session'].

@nwparker

Copy link
Copy Markdown
Contributor

Current main already contains the broader fix in merged commit (fixes #17690), with rendered spaced-colon title tests and owner-rewrite identity preservation. It also covers the idle gap noted in the issue. Closing this conflicting duplicate; credit to the original author for the separator/identity direction.

@nwparker nwparker closed this Sep 19, 2026
@nwparker

Copy link
Copy Markdown
Contributor

Correction: Current main already contains the broader fix in merged commit 8bb48041a92, which fixes #17690 with rendered spaced-colon title tests and owner-rewrite identity preservation. It also covers the idle OMP greater-than title gap noted in the issue. This stale conflicting branch is superseded; credit to the original author for the separator and identity direction.

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 working pane falls back to green active after title becomes OMP : label

4 participants