Repository navigation
fix(server): take omo from the program a pane runs, not from an argument that names it - #249
Merged
Merged
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced Oct 1, 2026
devswha
added a commit
that referenced
this pull request
Oct 1, 2026
Release v0.3.40: moves the Unreleased notes under 0.3.40 and bumps `package.json` and `herdr-plugin.toml`. What's in it: - Fixes from #249, #251, #252, #263, #264, #265, #267. - The iPhone CJK and text-symbol fix (#272). - Emoji cell widths matching herdr (#273). Every changelog entry already ends with its PR link. All these PRs are by @devswha, so no credits to add. No remote bundle change: `REMOTE_BUNDLE_VERSION` stays 9. The Windows PC part of #264 and #265 reaches a PC with the next remote bundle, as its changelog entry says.
devswha
added a commit
that referenced
this pull request
Oct 1, 2026
…ts next to omo-ai (#278) ## 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 #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). --------- Co-authored-by: Hako <devswha@gmail.com>
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.
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.
Change
isOmoProcesstook a foreground process for omo when any word of its argv was an omo path, sogrep -q …/omo-ai/x,cat …/bin/omoornode watch.js …/omo-ai/plugincounted as omo. The sidebar then named the paneomo, the transcript lookup counted it as a second omo in the cwd, andstartShellAgentcould report a start.Now only the program counts:
argv[0], or, whenargv[0]isnode/nodejs/bun, the script it runs (the first word after it that is not a flag). The word must still be one path (no:), as #243 required.Shapes kept, the first two exactly as herdr 0.9.0's
pane.process_inforeported them for omo 5.1.7 in a test pane:/home/u/.bun/bin/bun …/omo-ai/node_modules/@code-yeongyu/senpi/dist/bundle/cli.js --extension …/omo-ai/plugin/home/u/.bun/bin/bun …/omo-ai/plugin/runtime/ast-grep-mcp/cli.js mcp(omo's MCP child, same process group)node …/bin/omo,node --flag …/omo-ai/bin/omo.js, a nativeomo, and the SDK child…/omo-ai/…/claudeThe change is confined to
isOmoProcessand one regex above it inserver/omo.ts; Windows paths (#234) are untouched.Closes #248
Also checked: the omo question cards against real omo 5.1.7 (no defect found, no code change)
In the isolated
herdr-web-ui-testsession (herdr 0.9.0), a server from this branch, and a real omo asked for a two-questionask_user_questionform:Question 1 of 2, Red/Green/Blue, chips Color/Fruits), identical at 120, 60 and 40 columns.2 answered; 0 unansweredwith the answers sent. A stale answer got 409prompt_changed.options must contain 2 to 4 items when present.pibefore the first turn andclaudewith statusidle(notblocked) while the form showed; the card still came from the session's pending call.Validation
bun run typecheckpasses.bun run test:unit: 673 pass, 0 fail (two new tests inserver/omo.test.ts, one per direction).bun test ./server/omo.contract.test.ts ./server/omo-prompt.contract.test.ts ./server/prompt.contract.test.ts: 10 pass.