Skip to content

fix(icons): recognize OmO panes without an agent kind - #224

Merged
devswha merged 4 commits into
devswha:mainfrom
beomq:fix/omo-pane-icons
Oct 1, 2026
Merged

devswha merged 4 commits into
devswha:mainfrom
beomq:fix/omo-pane-icons

Conversation

@beomq

@beomq beomq commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

fix(icons): recognize OmO panes without an agent kind

Change

Selecting OmO in the new-session dialog starts OmO in the pane's shell. Herdr can
report that running pane without an agent kind, but labelOmoPanes previously
probed only panes labelled pi or claude. The sidebar therefore displayed a
shell mark instead of the existing OmO mark.

Include panes without an agent kind in the existing foreground-process check.
Keep the pi and claude handling and the existing process matcher unchanged.
Do not infer identity from terminal titles: an ordinary shell named OmO DAG
still remains a shell.

Add contract coverage for both the missing-kind OmO case and the shell control,
and record the user-visible fix in the changelog. This changes display detection
only; it does not add Herdr lifecycle-state reporting or session-restore support.

Reproduction

  1. Open the new-session dialog and choose OmO.
  2. Confirm OmO starts in the new pane.
  3. When Herdr's snapshot has no agent kind for that pane, observe the shell mark
    instead of the OmO mark in the sidebar.

Validation

  • Before the fix, the new missing-kind regression failed with
    Expected: "omo", Received: undefined.
  • After the fix, the two new contract tests passed.
  • bun run generate:types --check: passed.
  • bun run typecheck: passed.
  • bun run build: passed.
  • TMPDIR=/private/tmp bun run test:unit: 627 passed, 0 failed.
  • Real HTTP and browser checks against an owned, isolated Herdr session:
    /api/session reports agent: "omo"; the OmO mark is visible at 1280 x 800
    and 390 x 844; the shell control keeps its shell mark; no page errors occurred.
    These checks use a live OmO process stand-in matching the existing detection
    contract, not an authenticated model session or a complete new-session-dialog
    run. They verify the process-to-snapshot-to-icon path.
  • Additional sidebar regression QA: all 24 kinds in the new-session menu plus
    gjc rendered successfully at desktop and mobile widths (1280 and 390 px).
    Each owned test pane reported its kind through pane.report_agent; the real
    HTTP/sidebar path rendered one nonzero-size SVG per kind with no page errors.
    Letta uses the intended initial-letter fallback rather than a dedicated logo.
    This verifies reported-kind rendering, not automatic detection or startup of
    every agent CLI. No non-OmO detection behavior was changed.
  • Actual CLI startup QA (no injected agent kind, no prompts): Claude, Codex,
    Cursor, Gemini, Grok, Kimi, OpenCode, Pi, OMP, and GJC were automatically
    detected with their respective kinds by Herdr. Claude was detected at its
    folder-trust prompt; this does not claim an authenticated model turn.
    The real omo CLI remained unclassified in Herdr's raw snapshot but was
    correctly labelled omo by the patched web UI, reproducing the exact fix.
    Cline exited with a killed shell message and no remaining CLI process, so
    its automatic detection could not be validated. Twelve other menu kinds
    have no executable installed here; agy is installed but its top-level
    command is a help-only utility without an interactive session launch.

Existing macOS test limitations

The broader OMO transcript contract suite is not fully green on this Mac.
Unchanged upstream reproduces failures in unique-runtime transcript inference,
holder binding, and a test that reads Linux /proc/<pid>/fd. These are outside
the sidebar fix. The default macOS temporary path also differs from its
canonical /private/var path in an existing unit assertion; the unit suite
passes with TMPDIR=/private/tmp. No existing test was skipped or weakened.

@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: ef40ffea-80e5-4166-afc7-a20587b959f6

📥 Commits

Reviewing files that changed from the base of the PR and between cd26e75 and fd53386.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • server/omo.contract.test.ts
🚧 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; 3 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Omo panes now keep their Omo identification in the sidebar when agent information is unavailable, including panes opened through the new-session dialog.
    • Pane identification now checks running processes rather than relying on the pane title, so ordinary shell sessions remain identified as shells, even when their title includes “OmO.”
    • Running Omo processes are recognized whether a pane has no agent label or is labeled as Pi or Claude.

Walkthrough

labelOmoPanes now checks unlabeled panes for an Omo process tree and labels matches as omo. Tests cover snapshot immutability and confirm that a shell titled “OmO DAG” remains unlabeled.

Changes

Omo pane labeling

Layer / File(s) Summary
Unlabeled pane detection and contract tests
server/conversation.ts, server/omo.contract.test.ts, CHANGELOG.md
labelOmoPanes includes panes with no agent kind when checking for an Omo process tree. Tests cover matching Omo panes, unchanged input snapshots, and shell panes titled “OmO DAG.” The changelog records the behavior.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: devswha

Merge Risk: ⚪ Minimal · up to fd533

The change enables OmO sidebar labels for panes without a reported agent kind while retaining process-based detection. No actionable merge-blocking risk is identified.

Architecture Summary

Architecture risk: 🔵 Low · up to fd533

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 server/conversation.ts: labelOmoPanes now includes unlabeled panes among its candidates for omo process detection; previously it checked only panes labeled pi or claude. Matching panes and agents continue to be labeled omo.
  • observed — Modified behavior in CHANGELOG.md: Adds an Unreleased fix note describing OmO sidebar-mark detection from foreground processes, including newly started OmO panes, while ordinary shells remain shells.
  • observed — Modified behavior in server/omo.contract.test.ts: Imports labelOmoPanes for the new labeling contract tests.
  • observed — Modified behavior in server/omo.contract.test.ts: Adds a test that a running Omo pane with no agent kind is labeled "omo" in the returned snapshot, while the original snapshot remains unlabeled; the workspace is closed in finally.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: recognizing OmO panes that lack an agent kind. It is concise and specific.
Description check ✅ Passed The description includes the required Change and Validation sections. It explains the problem, resulting behavior, regression controls, contract-test coverage, validation results, and known test limit…
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 f76a790 into devswha:main Oct 1, 2026
9 checks passed
devswha added a commit that referenced this pull request Oct 1, 2026
Release v0.3.38: moves the Unreleased notes under 0.3.38 and bumps
`package.json` and `herdr-plugin.toml`.

In this release: Windows PCs over SSH (#227) with an interim mirrored
terminal (#228), sidebar workspace folding (#222), Gajae Code in New
session (#220), gjc background results ending a chat turn (#225), OmO
pane marks without an agent kind (#224 by @beomq).

The mirror entry now says that a phone cannot pan the pane-sized grid
yet (#230).

Remote bundle `remote-v9` is tagged on `79abf6c`; `release.yml` runs
only after its release is published.

`bun scripts/release-notes.ts 0.3.38` prints the notes and exits 0.
nahwan-kim added a commit to nahwan-kim/herdr-web-ui that referenced this pull request Oct 1, 2026
…a time

omo 5.1's ask_user_question form (question tabs, numbered options, a typed
answer row and a review tab) matched no prompt reader. herdr labels an omo
pane `pi` while it waits, so the chat showed the last-resort card with only
Enter and Esc.

- server/prompt.ts reads the form for pi/omo panes, panes herdr reports
  without an agent (devswha#224), and claude, which herdr shows while omo's SDK
  child runs: the question asked now, the review after
  the last one, and the typed-answer field. A number picks an option as omo
  does; the review submits, reopens a question, or sends a comment.
- The text comes from the ask_user_question call in omo's session file when
  it can be found, so a pane too short for the form, or one that wraps it,
  still gets the whole question; otherwise it is read off the screen.
- InteractivePrompt gains optional `steps`; the card shows a chip per
  question. After an answer to such a form the server returns once the next
  step shows and the card reads it at once.
devswha added a commit that referenced this pull request Oct 1, 2026
…a time (#237)

## Change

omo 5.1 asks with an `ask_user_question` form: a tab per question,
numbered options with descriptions, a "Type your own answer..." row, and
a review tab after the last question. No prompt reader knew this screen.
herdr labels an omo pane `pi` while it waits, so the chat fell back to
the last-resort card, which offered only Enter and Esc. omo expects the
number of an option.

With this change, `server/prompt.ts` reads the form for panes herdr
reports as `pi`/`omo`, panes it reports with no agent (as in #224), and
`claude` (shown while omo's SDK child runs). The hint lines are specific
to omo, so other screens are left alone.

- **Question card:** shows the question being asked now, titled
`Question 1 of 2`, with a chip per question (answered ones checked; the
current one in the accent). A single choice sends the option's number,
as omo does, and omo moves on. A multiple choice clears the answer
(Backspace) and then sends the numbers, followed by Tab. A typed answer
clears any earlier text first. Picking an answer advances to the next
question.
- **Review card:** after the last question. Submit; tap an answer's row
to reopen that question; or type a comment, which omo sends with the
answers.
- **Typing card:** while an answer is being typed in omo's own field,
the card offers to save it (Enter) or discard it (Esc).
- **Text from omo's session:** the questions and options come from the
pending `ask_user_question` call in the pane's session file
(`omoTranscriptForPane`, cached for 15 s, reading the file's last 1 MB).
The screen only says where the form stands. So a pane too short for the
form still gets a card: a 9-option form needs 9 rows instead of 28. A
pane that wraps the text no longer garbles it. Without the session file,
the card is read off the screen. That path joins Korean words the pane
wrapped at its edge back together.
- **Fast transitions:** `InteractivePrompt` gains an optional `steps`.
After answering a form, the answer request returns once omo shows the
next step, and the card reads that step right away instead of waiting
for the next 2 s poll. A fallback card is suppressed for 3 s after an
answer, so herdr's lagging `blocked` status does not flash Enter/Esc
once the form closes.

Limits:
- A cut-off form needs at least one option row in view to tell which
question it is.
- With the tabs out of view, the answered state of earlier questions is
inferred from omo's `n/m answered` count (questions answered in order).
If the count doesn't fit that, the earlier chips are left unchecked.
- Card titles and the review's "Submit" are English server strings, like
the Codex and Claude cards.

## Validation

- `bun run typecheck`, `bun run build`, and `generate:types --check`
pass.
- `test:unit`: 657 pass. The same 6 Codex/updater tests fail on
`upstream/main` on this Mac before the change.
- New unit tests in `server/prompt.test.ts`:
- fixtures taken from omo 5.1.7 as herdr reads it at 120 columns, and
from omo's own renderer at 40 and 60 columns;
- session-file parsing (pending, answered, moved on, malformed, a tail
starting mid-record);
  - cut-off forms with and without the session;
  - the typing card;
  - the review with its rows out of view.
- New `server/omo-prompt.contract.test.ts`, run against a real herdr
pane that runs a fake omo form reported as `pi`. It answers question 1,
reads question 2 immediately with its steps, gets a 409 for a stale
answer, then submits from the review. The existing
`prompt.contract.test.ts` still passes.
- Manual QA against real omo 5.1.7 in an isolated herdr session, in
headless Chromium with the Korean UI:
- Desktop: question 1 → question 2 (shown 96–307 ms after the tap) →
review → reopen question 1 → typed answer → submit with a comment. omo
received `comment-submitted; 2 answered`. No card reappeared in the 4 s
after submit.
- Phone (390 px), driven with real touch taps: multiple choice →
question 2 → review → submit.
- A pane resized to 15 rows with the title and tabs off screen: the card
came from the session file. Then option 4, a typed answer, the review
and submit, all through the API. A typing card was raised from the
terminal and saved from the card.

Screenshots of the question, review and typing cards, desktop and phone,
can be added on request.

---------

Co-authored-by: Hako <[email protected]>
devswha added a commit that referenced this pull request Oct 1, 2026
…arrived (#244)

Closes #242.

## Cause
After a reconnect the client clears what it knows about the server's
features and learns them again from the `snapshot` frame. The terminal's
output can arrive first, and the masked input shows as soon as output is
on screen. A Send in that gap made `sendSecret` answer "unsupported"
locally and send nothing, so the password field stayed with an error.

`submit` already waits for the snapshot (up to 2 s) before it decides;
`sendSecret` did not. It became visible on 2026-10-01 after the snapshot
got slower: it now asks herdr for the foreground process of every shell
pane (#224).

## Fix
`sendSecret` waits for the connection's snapshot the same way, then
sends or answers unsupported.

## Evidence
- `scripts/secret-input-regression.ts` alone, 25 runs with frame
logging: 5 failures before, each with the snapshot arriving after the
first output and no `secret` frame sent; 0 failures in 25 runs after.
- `src/lib/ws.test.ts` (new, a fake WebSocket): a secret entered before
the snapshot is sent once the snapshot lists masked input; it fails with
the old `sendSecret`. A snapshot without the feature still answers
unsupported and sends nothing.
- `bun run typecheck`; `bun run test:unit` 656 pass.
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