Skip to content

fix(prompt): read an omp multi-select Ask whose hint a narrow pane clips - #1814

Merged
devswha merged 1 commit into
mainfrom
fix/omp-ask-clipped-multi-hint
Oct 24, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/omp-ask-clipped-multi-hint

Conversation

@devswha

@devswha devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Refs #1644 (the clipped multi-select hint noted there after #1812).

Summary

  • server/dialogs/omp.ts: at 60 columns, omp 18.12.6 clips the multi-select Ask hint inside its cancel label: ␣ toggle · ⏎ next · ↑/↓ move · ⇥/←/→ question · ⎋ cance…. OMP_MULTI_HINT_RE needs the whole cancel, so the question gave no card.
    • The new OMP_MULTI_CLIPPED_HINT_RE accepts that hint: toggle, then submit or next, then move, then Esc, with the start of "cancel" or nothing, ending in … or ....
    • parseOmpQuestion uses it to find the hint and to mark the card multi-select.
  • server/dialogs/live.ts: promptTailIsActive accepts the same clipped hint for omp-question, so the card stays while the question waits.
  • server/fixtures/omp-ask-18.12.6-multi-60.txt: the real 60-column multi-select screen. It comes from the same recording as fix(prompt): keep an omp Ask card above omp's status row #1812's fixtures (omp 18.12.6 with composer.shape: pi, isolated herdr test session, fake model provider).
  • server/dialogs/omp.test.ts: that screen gives the multi-select card (question, three options, multi_select: true), the same card it gives without its status row.
  • changelog.d/omp-ask-clipped-multi-hint.md.

Part 2 of #1644 (Markdown in the question and options) is still a separate follow-up. It needs shared/protocol.ts, the remote PC bundle and a REMOTE_BUNDLE_VERSION bump.

server/dialogs/*.ts is part of the remote PC bundle; the release process refreshes it (docs/development.md).

Verification

  • On main the new test fails: the 60-column multi-select screen gives no card. It passes with this change.
  • All 24 recorded screens (omp 18.8.7 and 18.12.6, 120 and 60 columns, text and ANSI) replayed:
    • every multi-select screen gives the same card (multi_select: true);
    • answered screens give none;
    • single-select and review screens are unchanged.
  • server/dialogs/, server/prompt.test.ts, server/core/omp-submit.test.ts, server/conventions.test.ts: 507/507. Typecheck. bun run check fast.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 5c6a072 and dd6f626.

Files selected for processing: 5
  • changelog.d/omp-ask-clipped-multi-hint.md
  • server/dialogs/live.ts
  • server/dialogs/omp.test.ts
  • server/dialogs/omp.ts
  • server/fixtures/omp-ask-18.12.6-multi-60.txt

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

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved recognition of multi-select Ask prompts when narrow layouts clip the end of the Escape/cancel hint.

OMP multi-select prompt parsing now recognizes a footer clipped within its Escape/cancel label. The live-screen check uses this pattern to keep the omp-question card active. A narrow-pane fixture and test cover the prompt.

Changes: OMP multi-select hint handling

Layer / File(s) Summary
Recognize clipped multi-select footers
server/dialogs/omp.ts
A new pattern matches multi-select footers clipped within the Escape/cancel label. Hint lookup and multi-select classification accept the pattern.
Keep the question active in the live screen
server/dialogs/live.ts, server/fixtures/omp-ask-18.12.6-multi-60.txt, server/dialogs/omp.test.ts, changelog.d/omp-ask-clipped-multi-hint.md
The live-screen check accepts the clipped hint. The fixture and test cover a narrow-pane prompt, its parsed question and options, and parsing after status-row removal. The changelog records the fix.

Priority: Low

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

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

  • Issue 1644 reports the same OMP prompt behavior: the card should remain active below the status row when the multi-select hint is clipped.

Possibly related PRs

  • devswha/ovis#1812: Changes the OMP Ask card’s live-screen lifecycle above its status row, a related state in the same lifecycle check.
  • devswha/ovis#1761: Relocates promptTailIsActive to server/dialogs/live.ts, where this PR extends the OMP check.
Merge Risk: Minimal · up to dd6f6

No merge-blocking issues were identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the fix for reading an OMP multi-select Ask when a narrow pane clips its hint.
Description check Passed The description explains the clipped-hint problem, implementation, regression coverage, validation results, and scope boundaries. It uses Summary and Verification headings instead of the template's Ch…
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.
Full details: Description check

Explanation

The description explains the clipped-hint problem, implementation, regression coverage, validation results, and scope boundaries. It uses Summary and Verification headings instead of the template's Change and Validation headings, but it provides the required information.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Merge pass: review-work report. Overall: PASSED.

Lane Verdict Confidence
Manual QA (5 rows, artifacts kept) PASS -
Code review: omo-native-code-reviewer with the programming and remove-ai-slops skills PASS (0 blocker, 0 major) -
Gate review: a fresh reviewer on another model APPROVE HIGH

Manual QA

  • 514 tests pass, and the typecheck passes.
  • The new test fails on main.
  • All 21 omp fixtures replayed on this head and on main: only multi-60 changes. It goes from no card to c484b427ad51 multi=true opts=3, the same card as at 120 columns.
  • The fix(prompt): keep an omp Ask card above omp's status row #1812 stale-card probe gives no stale card on multi-60 or multi-120.

Code review

  • The regex needs the multi-select keys, so single-select and review footers don't match.
  • (?=\s|$) is needed: the parser joins the hint line with the status row.
  • Reverting the live.ts change, reverting the multiSelect change, and dropping the toggle requirement each fail the tests.

Gate review

  • The 60-column card has the same options and answer steps as the 120-column one.
  • Direct probes passed for: clipped single-select and review footers, later output containing …, stacked panels, ANSI colouring, and rejection when the … is missing.

Follow-up notes

  • F1: a negative test should pin that a hint missing its … is refused. The production code already rejects it.
  • The regex prefix is duplicated with OMP_MULTI_HINT_RE.
  • A hint clipped before ⎋ still gives no card.

All required checks are green and no review thread is open.

@devswha
devswha merged commit c165e04 into main Oct 24, 2026
17 checks passed
@devswha
devswha deleted the fix/omp-ask-clipped-multi-hint branch October 24, 2026 07:11
devswha added a commit that referenced this pull request Oct 24, 2026
## Change

herdr 0.9.5 already detects Letta Code (agent kind `letta`, from its
`letta.toml` detection manifest), and `GET /api/agents` lists it. The
app's supported-agent list left it out, though, so **New workspace**,
**New tab with agent…** and **New worktree** hid an installed `letta`.

This PR adds `letta` to `SUPPORTED_AGENT_KINDS` along with:
- the label **Letta Code** in `/api/agents` (`server/agents-routes.ts`);
- a skill-syntax row. Letta's slash menu opens only on a leading `/` and
lists skills as bare `/<skill-id>` rows (letta-code 0.34.23,
`src/cli/components/SlashCommandAutocomplete.tsx`);
- a Supported agents row in the guide and a changelog fragment.

There is no new UI: the existing picker lists one more agent, with the
fallback letter mark (lobe-icons has no Letta mark). The launch uses the
existing generic path and adds no permission flags. A first message
waits for the first ready turn, because Letta takes a prompt on its
command line only with `-p` (its headless mode).

**Telemetry:** the deployed Worker refuses a harness it does not list
(`telemetryHarnesses`, `telemetry/deployed.json`), so Letta counts as
`other`. Test (h) in `server/telemetry.test.ts` lists it as not yet
deployed instead of adding it to `TELEMETRY_HARNESSES`, so no Worker
deploy is needed.

**No native chat reader yet.** In its default mode, Letta keeps the
conversation on the Letta server. Locally, `~/.letta/sessions.jsonl`
holds only session metadata. Chat shows the terminal's text until a
follow-up reads it. The storage findings are in
#1730 (comment).

Part of #1730 (the picker; the issue stays open for the reader, prompts
and session history).

**Scope notes**
- Untouched: `server/conversation.ts`, the claude stores and
`shared/protocol.ts` (open #1813), and `server/dialogs/` (open #1814).
- The outside Copilot PR #1650 edits the same lines in
`shared/supported-agents.ts`, `shared/skill-syntax.ts`, `docs/guide.md`,
`server/telemetry.test.ts`, `src/lib/agentLaunchMode.test.ts` and
`src/lib/api.test.ts`. Whichever PR lands second needs a small rebase
that keeps both entries; in the telemetry test that means `undeployed =
new Set(["copilot", "letta"])`, or #1650's mapping.

## Validation

- `bun run check fast`: passed on the committed tree (workflow syntax,
generated types and themes, typecheck, build, unit tests with 0
failures).
- Focused tests (the touched files, `scripts/changelog-fold.test.ts`,
every `conventions.test.ts`): 115 passed, 0 failed.
`server/agents-routes.test.ts` checks the label. `src/lib/api.test.ts`
checks that Letta is offered where installed, hidden where `installed:
false`, and offered from an older bridge that sends no installation
metadata.
- Browser check on the demo build over its fixture transport (no herdr
session; `/api/agents` and the create requests intercepted, so nothing
launched), 4 of 4 passed:
- **New workspace** offers Letta Code and not an unsupported kind, and
Start sends `{"agent":{"kind":"letta"}}`;
- **New tab with agent…** does the same through `POST /api/tab/create`;
  - with `installed: false`, Letta Code is not offered;
- the picker at 1440×900 and 390×844 (dark) shows the Letta Code row
unclipped.
- A separate code-review agent found no blockers. Its two fixes are
applied: a test assertion that passed without the change was dropped,
and the guide and changelog now name New worktree too.

Not run: launching a real `letta` (it is not installed here), so a first
message sent to a live Letta pane has not been tried end to end. The
generic pending path holds such a message until herdr reports the pane
ready, and the user can always send or discard it.
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.

1 participant