Skip to content

fix(chat): leave out palette controls whose result Chat cannot show - #4639

Merged
devswha merged 4 commits into
mainfrom
fix/palette-hide-undrawable-controls
Nov 25, 2026
Merged

devswha merged 4 commits into
mainfrom
fix/palette-hide-undrawable-controls

Conversation

@devswha

@devswha devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner

What

The chat's / palette stops suggesting plan, permission-mode, model and effort controls whose bare form, once picked, shows no result in Chat (it is sent and the chat draws nothing). Each such row is marked chatPaletteHidden in its agent's existing catalog (server/skills/<agent>.ts); the client reads the flag, never an agent name.

Hidden (27 rows, 7 agents): Codex plan; OmO efforts, reasoning; Command Code mode:accept-edits, mode:default, mode:plan, plan; Devin accept-edits, ask, autonomous, bypass, bypass-permissions, code, dangerous, fast, normal, plan, smart, yolo; Hermes approvals, reasoning, yolo; Antigravity plan, planning; Copilot allow-all, autopilot, plan.

Unchanged: rows in the Terminal group (honest handoff to the terminal) and rows whose bare form opens a card Chat draws (/model pickers for Codex, pi, omp, gjc, Letta) stay listed. A hidden command typed by hand is sent exactly as before.

Why

A control the chat cannot draw the result of should not be offered there (the rule added to the harness contract in #4634: a control whose result Ovis cannot draw is not offered).

Validation

  • bun run typecheck: pass.
  • Focused tests (src/lib/compose.test.ts, scripts/skill-menu-cases, server/commands and skills tests): 335 pass, 0 fail. The Codex regression test failed before the change (/plan listed) and passes after.
  • Checked in the isolated demo: the palette of the 7 agents, and a hand-typed Command Code /mode:plan still sends.
  • bun run check fast: not run for this PR (focused tests only).

UI change: before/after captures (desktop 1280, phone 390, light) are with the maintainer for review. On hold until he has seen them.

@devswha

devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Hold: a user-visible chat change (palette rows hidden) the maintainer has not seen yet; before/after captures go to him first.

@devswha devswha added the hold Not merged until the owner says so label Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • User Experience
    • The Chat command menu no longer suggests controls that can’t display results in Chat.
    • Terminal handoffs and commands that open Chat dialogs remain listed. Commands hidden from suggestions can still be typed and sent as before.
  • Documentation
    • Clarified which commands may be omitted from the menu and that typing them remains supported.

The change adds agent-configured palette visibility for slash commands. Chat omits marked commands from suggestions, except terminal commands and commands with a bare dialog form. Tests and documentation clarify that manually typed commands remain available.

Changes: Chat Palette Visibility

Layer / File(s) Summary
Define palette visibility
server/skills/index.ts, shared/protocol.ts, server/skills/*.ts
Agent command sources and slash commands gain palette-visibility fields. Agent configurations list commands to hide.
Map source settings to commands
server/commands.ts
paneCommands marks matching built-in commands with chatPaletteHidden: true.
Filter suggestions and verify typed commands
src/lib/compose.ts, src/lib/compose.test.ts, scripts/skill-menu-cases/*, docs/agent-commands.md, changelog.d/chat-palette-live-controls.md
Palette filtering omits marked commands unless they are terminal commands or have a bare dialog form. Tests and documentation cover menu visibility and typed-command behavior.

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

Change: Bug fix

Suggested labels: hold

Suggested reviewers: jpcarranza94

Merge Risk: Minimal · previous review 7f5fb

Chat's slash palette stops suggesting controls whose results Chat cannot show. Terminal handoffs and Chat dialogs stay listed, and typed commands still send as before. No concrete merge-blocking risk was found; the maintainer's visual review of the palette change is still pending.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(chat): leave out palette controls whose result Chat cannot show" names the main change: the chat slash palette stops offering plan, permission-mode, model and effort controls whose bare…
Description check Passed The description follows the repository template. It has a Change section that explains the problem, the resulting behavior, and the reason for the change. It has a Validation section that lists the ty…
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: Title check

Explanation

The title "fix(chat): leave out palette controls whose result Chat cannot show" names the main change: the chat slash palette stops offering plan, permission-mode, model and effort controls whose bare form produces no visible result. The changeset marks those rows with chatPaletteHidden, and compose.ts filters them out, so the title matches the change. It is specific and uses a conventional commit prefix.

Full details: Description check

Explanation

The description follows the repository template. It has a Change section that explains the problem, the resulting behavior, and the reason for the change. It has a Validation section that lists the typecheck and focused tests, with results, and states that bun run check fast was not run. It does not link an issue, although the template asks for one for features; this is a fix, so the omission is minor. The template also asks for contract-test coverage for HTTP/WS changes; the change touches shared/protocol.ts, but it adds only an optional field, and the description does not state whether contract tests were run. The 'on hold' note is useful context.

Finishing Touches

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5292ac3 and 7f5fb87.

Files selected for processing: 21

  • changelog.d/chat-palette-live-controls.md
  • docs/agent-commands.md
  • scripts/skill-menu-cases/agy.ts
  • scripts/skill-menu-cases/cmd-nested.ts
  • scripts/skill-menu-cases/codex.ts
  • scripts/skill-menu-cases/copilot.ts
  • scripts/skill-menu-cases/devin.ts
  • scripts/skill-menu-cases/hermes.ts
  • scripts/skill-menu-cases/omo.ts
  • server/commands.ts
  • server/skills/agy.ts
  • server/skills/cmd.ts
  • server/skills/codex.ts
  • server/skills/copilot.ts
  • server/skills/devin.ts
  • server/skills/hermes.ts
  • server/skills/index.ts
  • server/skills/omo.ts
  • shared/protocol.ts
  • src/lib/compose.test.ts
  • src/lib/compose.ts

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

@devswha

devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Codex adversarial review (gpt-6.2-sol-fast, xhigh) on 7f5fb87: BLOCK on one MEDIUM. Typing a hidden control whole (Codex /plan) and pressing Enter completed it to another fuzzy match (/setup-default-sandbox ). Fixed: when the query names a palette-hidden row exactly, the menu offers nothing and Enter sends the command as typed; the no-match hint stays quiet only for that exact name, so partial names behave as before (covers the LOW on namesHiddenCommand). New test fails before the fix and passes after; compose tests 73 pass, Composer component tests 89 pass, typecheck pass. The other LOW (Hermes /fast still listed) is left as is: it prints status, not a mode switch.

@devswha

devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Gate review (omo) on f1776e1: BLOCK on one MEDIUM: the exact-name check ran for inline lookups too, so use /plan with a Codex skill plan-review was sent at once instead of completing to the skill. Fixed: only a leading command typed whole skips the menu. The added inline case fails on f1776e1 and passes now; compose tests 73 pass, Composer component tests 89 pass, typecheck pass. That was this PR's one fix round; no further review round.

@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Owner approved this in the Dori session (2026-11-25).

@devswha devswha removed the hold Not merged until the owner says so label Nov 25, 2026
@devswha
devswha merged commit f3755cf into main Nov 25, 2026
21 checks passed
@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 68dfd864d. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

Owner approved (2026-11-25) after seeing the before/after captures. Reviews: Codex adversarial review (gpt-6.2-sol-fast, xhigh) on 7f5fb87 and omo gate review on f1776e1, each MEDIUM fixed (see PR comments); CodeRabbit did not review this head.

@devswha
devswha deleted the fix/palette-hide-undrawable-controls branch November 25, 2026 02:53
devswha added a commit that referenced this pull request Nov 25, 2026
…4674)

## What

This follows #4670, which made Chat send a command as data where the
agent accepts it. In a Codex pane that Ovis started on its own app
server (0.169 to 0.171, `server/approvals/codex.ts`), Chat now sends a
bare `/plan` through that server instead of typing it. It does what the
TUI's own `/plan` does: `thread/settings/update` with Plan mode, Plan's
own effort, and the thread's current model. Plan's effort is
`plan_mode_reasoning_effort` from `config/read` when Codex's config sets
one, otherwise the preset from `collaborationMode/list` (medium on
0.171.0). The server's answer counts as `native` result evidence.

In such a pane, `/plan` shows up in the `/` palette again. #4639 hid it
because Chat could not see its result; now it can.

**UI change: on hold for the maintainer's look.** Before/after (isolated
herdr-core, Ovis-launched Codex 0.171.0 after one answered prompt, `/pl`
typed in the composer, light, Korean):

| | before (main) | after |
|---|---|---|
| desktop 1280 |
![before](https://raw.githubusercontent.com/devswha/ovis/798c86dede34128aa5f586c2162cd401affd1098/shots/codex-plan-before-desktop.png)
|
![after](https://raw.githubusercontent.com/devswha/ovis/798c86dede34128aa5f586c2162cd401affd1098/shots/codex-plan-after-desktop.png)
|
| phone 390 |
![before](https://raw.githubusercontent.com/devswha/ovis/798c86dede34128aa5f586c2162cd401affd1098/shots/codex-plan-before-phone.png)
|
![after](https://raw.githubusercontent.com/devswha/ovis/798c86dede34128aa5f586c2162cd401affd1098/shots/codex-plan-after-phone.png)
|

No new control: an existing palette row comes back, only in these panes.

## When it is typed instead

- In a Codex pane Ovis did not start on its server.
- Before the server has named the thread and its model.
- While a turn runs or may run. Codex's own dispatcher allows `/plan`
only between tasks, and the server must have said the thread is idle.
- When the server has another non-subagent thread loaded. A `/resume` or
`/new` in the TUI loads another thread without telling Ovis which one it
shows, so `/plan` is typed until only one is loaded. It is also typed
when herdr reports a different Codex session for the pane, read again
right before the request (herdr-core reports none).
- When the sender is revoked or the deadline passes at the write.

If the request went out and no answer came back, the send fails as
`timeout` and is never typed again.

Codex's `/compact` stays typed: compacting through the server aborts a
running turn, and Ovis may not have heard of that turn yet.

## Validation

- `bun test server/approvals/codex.test.ts
server/core/codex-data-send.test.ts`: pass (new cases cover idle only,
another thread, unknown model, a model switch during the lookups, config
effort, revoked sender, refusal, a dropped server, a resumed thread in
the TUI). Typecheck clean.
- Live, isolated: Ovis's own `CodexServers` launched a real Codex
0.171.0 (team proxy). Before the first prompt, `/plan` was unsent. After
one answer it was applied, and the TUI showed `Plan mode` with medium.
End to end through real Ovis (`createServer` on an isolated herdr-core
0.1.18, Codex tab opened by Ovis, sent from the Chat composer): after
one answer, `/plan` typed nothing, the TUI switched to Plan mode, one
`thread/settings/update` went out, and the outcome was `result-observed`
with `native` evidence. `/plan` sent during a turn was typed, Codex
refused it as it does in the TUI, and no settings request went out.
- Reviews: omo gate reviewer and Codex adversarial (gpt-6.2-sol-fast
xhigh) on the first version found two HIGHs: a send to a thread the TUI
had left, and a compact that could abort a turn. Both are fixed in this
version as described above. A first end-to-end run through real Ovis on
herdr-core showed that herdr-core reports no Codex session, so the
thread check is now "the only loaded thread" rather than "herdr's
session". A model switch during the lookups, the configured Plan effort,
the busy guard and palette caching (offered from launch, not from
connection) are fixed too.

- `bun run check fast`: typecheck and build pass. Unit tests pass except
`server/ssh-account-add.test.ts`, which fails the same way on main here
(TMPDIR socket path too long for ssh).
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