Skip to content

fix(server): recognize OmO installed with bun add -g, whose engine sits next to omo-ai - #278

Merged
devswha merged 3 commits into
devswha:mainfrom
ddotz:fix/omo-hoisted-senpi
Oct 1, 2026
Merged

devswha merged 3 commits into
devswha:mainfrom
ddotz:fix/omo-hoisted-senpi

Conversation

@ddotz

@ddotz ddotz commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Change

Since #249, isOmoProcess identifies OmO only from the program a pane runs: argv[0], or the script that node/bun runs. That covers an npm install, where OmO's engine sits inside omo-ai (bun …/omo-ai/node_modules/@code-yeongyu/senpi/dist/bundle/cli.js --extension …/omo-ai/plugin).

A global bun install (bun add -g omo-ai) hoists the engine next to omo-ai instead, and omo's launcher execs it. The pane's foreground process is then:

bun ~/.bun/install/global/node_modules/@code-yeongyu/senpi/dist/bundle/cli.js --extension ~/.bun/install/global/node_modules/omo-ai/plugin

Here the script is senpi's own entry, and omo-ai appears only as the extension it loads. As a result, 0.3.40 no longer recognizes the pane as OmO:

  • the chat never looks up the transcript and shows only "Conversation unavailable — show terminal output";
  • the sidebar loses the OmO mark;
  • New session does not see OmO start.

With this change, the engine entry (@code-yeongyu/senpi/dist/cli.js or dist/bundle/cli.js, run by a JS runtime) counts as OmO when an --extension argument names omo-ai's plugin. These are the entries omo doctor treats as the engine. Everything #249 ruled out stays out:

  • senpi alone, or senpi with another extension;
  • an omo-ai plugin path passed to any other script;
  • the plugin path given without --extension;
  • the entry run without a JS runtime.

Validation

  • Reproduced on a fresh clone of main (ef90055), unchanged, on macOS with omo-ai 5.1.6 installed by bun add -g omo-ai and two OmO panes:
    • isOmoProcess on each pane's argv as ps reports it returned false for both; true was expected.
    • The v0.3.40 server's GET /api/pane/conversation?pane_id=<OmO pane> returned {"source":"scrollback","turns":[]}, and the chat showed only "Conversation unavailable — show terminal output".
  • On this branch, isOmoProcess returns true for both, and paneConversation for the same panes returns source: "omo-transcript" with their turns.
  • A new test covers both argv shapes (bundled and unbundled entry) plus five near-misses that stay false. It fails on main. The fix(server): take omo from the program a pane runs, not from an argument that names it #249 cases are unchanged.
  • bun run generate:types --check, bun run typecheck, bun run build: pass.
  • bun run test:unit: 726 pass, 1 skip, 0 fail (main: 725 pass, 1 skip, 0 fail).

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4c71dd92-db92-4017-97e4-cec004951922

📥 Commits

Reviewing files that changed from the base of the PR and between 8fb3cab and 08efa36.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • OmO sessions launched through globally installed Bun setups are now recognized when the OmO plugin is loaded. Their conversations appear in chat, and their panes are correctly marked as OmO.
    • Detection now distinguishes OmO sessions from other processes when the plugin is missing, supplied in an unrelated way, or provided only after startup arguments. Existing OmO executable and script detection remains supported.

Walkthrough

isOmoProcess now recognizes Senpi when Node or Bun launches it with the omo-ai plugin as an extension before --. Tests cover matching and non-matching command forms. The changelog describes restored conversation recognition and OmO pane marking.

Changes

OmO process detection

Layer / File(s) Summary
Senpi process matching
server/omo.ts, server/omo.test.ts, CHANGELOG.md
isOmoProcess recognizes Senpi with the omo-ai plugin as an extension, while retaining direct OmO detection and rejecting invalid program paths. Tests cover accepted and rejected command forms. The changelog records the conversation and pane-marking behavior.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 08efa

The change restores detection for the supported global OmO installation shape while preserving the intended exclusions. No actionable merge-blocking issue was identified; mergeable subject to normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 8fb3c

The change affects 2 systems.

Changed systems: server, CHANGELOG.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — server (service) was modified; 2 changed files map to changed impact.
  • observed — CHANGELOG.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CHANGELOG.md: Adds an Unreleased fix note stating that the engine installed beside omo-ai by bun add -g omo-ai is recognized as OmO when omo-ai’s plugin is one of its extensions, restoring chat conversation lookup and New session startup detection.
  • observed — Modified behavior in server/omo.test.ts: Added isOmoProcess test cases for globally hoisted senpi CLI paths: both paths are expected to match when Bun runs them with the hoisted omo-ai/plugin as an extension. The tests expect no match for standalone senpi, a different extension, another script, a positional plugin path, a missing Bun executable, or a plugin path appearing only after --; a valid extension before -- is expected to match despite subsequent prompt arguments.
  • observed — Modified behavior in server/omo.ts: isOmoProcess adds Senpi CLI recognition for Node/Bun-launched scripts when an omo-ai plugin path appears as the value of --extension before --. It retains direct omo program detection and rejects missing program paths or paths containing :.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: recognizing OmO installed globally with Bun when its engine is next to omo-ai.
Description check ✅ Passed The description includes both required sections. It explains the problem, resulting behavior, excluded near-miss cases, reproduction details, tests, and validation results.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@devswha
devswha merged commit 1eb7aac into devswha:main Oct 1, 2026
11 checks passed
devswha added a commit that referenced this pull request Oct 1, 2026
Fixes #256.

Raises `REMOTE_BUNDLE_VERSION` from 9 to 10, so that remote PCs (Windows
PCs included) get the bridge-side fixes merged since `remote-v9`: #235,
#243, #249, #251, #264, #265, #267, #278, #281 and the rest of `git log
remote-v9..main -- server shared`.

`server/machines.test.ts` named the `remote-v9` directory literally and
failed on the new number; it now reads the constant.

## Order, from docs/remote-pcs.md
1. Merge this.
2. Push the `remote-v10` tag on `main`: the Remote PC bundles workflow
builds, smoke-tests and publishes the five archives and `manifest.json`.
3. Only then release the app: an app that carries the new number finds
no `remote-v10` manifest before step 2, and every connected PC's bridge
counts as incompatible until it is updated.

## Checked
`bun run typecheck`, `bun run test:unit` (734 pass). The bundle build
and smoke run in this PR's Remote PC bundles checks.
devswha added a commit that referenced this pull request Oct 1, 2026
Prepares v0.3.41.

- `package.json` and `herdr-plugin.toml` go to 0.3.41.
- The `[Unreleased]` notes move under `[0.3.41] - 2026-10-02`; compare
links added.
- 19 entries that had no PR link get one, with `by @login` for outside
contributors (#262 by @diegolhambi; #255, #277, #278, #279 by @ddotz).

After the merge: `gh workflow run release.yml --ref main -f
version=0.3.41`.
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.

2 participants