Skip to content

fix(chat): withhold fallback Enter when an agent menu appears - #4700

Closed
devswha wants to merge 2 commits into
mainfrom
fix/fallback-send-picker
Closed

devswha wants to merge 2 commits into
mainfrom
fix/fallback-send-picker

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What broke

After agent.prompt refused, the Chat fallback checked for an agent-owned menu before pasting, but not before its separate Enter.

Fix

Read for an agent-owned menu again after the paste and before the fallback Enter. If that check is blocked or cannot verify the screen, withhold Enter and report the existing partial-send outcome instead of retrying the paste.

The post-review pass distinguishes a worded navigation hint from ordinary draft prose. When the browser receives confirmation that the bridge deliberately withheld Enter, it retires only that command key so an explicit retry can work after the user checks the terminal. A lost response does not retire the key.

Validation

  • Final check fast passed at bc3e9613d.

  • Red on main: the recorded-screen fallback test resolved as sent instead of reporting a partial delivery. Green: HERDR_TEST_MODE=unit bun test ./server/core/input-line-send.test.ts ./server/core/chat-prompt-guard.test.ts ./server/core/agent-input-send.test.ts --timeout 20000 (54 passed).

  • git diff --check.

  • bun run check fast at 14da0c383: workflow syntax, generated files, typecheck and build passed. The full unit step failed in the unchanged server/machine-core-choice.test.ts (setup did not settle). The same test file also failed independently on unmodified main 6946dcb01. A first run hit the Unix socket path limit with a long TMPDIR; using a shorter directory removed that failure.

  • At bc3e9613d, bun run typecheck passed. The input-line, prompt-guard, agent input, fallback answers and composer-draft unit tests passed (139).

No live approval or trust prompt was used. The separate Antigravity renderer and queued-paste status observations are unchanged.

Before and after

Korean light-theme isolated demo: desktop before / desktop after · phone before / phone after.

Review notes

Codex reviewed pushed head 14da0c383 once. Both reproduced MEDIUM findings (ordinary draft text mistaken for a menu, and replay of the received partial outcome on explicit retry) were addressed together in bc3e9613d. No second review was requested.

Closes #3764

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

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

On hold for the owner to review the Korean light-theme before/after captures linked above (desktop 1280 px and phone 390 px). Please do not merge until the owner has seen them.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b0f20e7 and bc3e961.

Files selected for processing: 8

  • changelog.d/fallback-send-picker.md
  • server/core/composer.ts
  • server/core/input-line-send.test.ts
  • server/dialogs/fallback.ts
  • shared/submit-outcome.ts
  • src/lib/composerDraft.test.ts
  • src/lib/composerDraft.ts
  • src/lib/useComposerSends.ts
  • 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

@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #4726

@devswha devswha closed this Nov 25, 2026
devswha added a commit that referenced this pull request Nov 26, 2026
…an agent menu (#4726)

## Fixes

- [#4697](#4697) — Grok minimal mode
could report a send as successful while a mock Grok still held the
message in its queue and had not drawn the queue count. A known active
turn now needs a new matching echo or other existing confirmation;
ambiguity is reported as “Not confirmed,” without an extra Enter. Codex
reviewed original head `f8ee09ecf` once and reported no reproduced HIGH
or MEDIUM findings.

  Closes #3977

- [#4700](#4700) — A recorded-screen
test switched to an agent menu immediately after the fallback pasted
text, following an `agent.prompt` refusal. The fallback now checks again
before pressing Enter and reports partial delivery if it cannot rule out
a menu. A confirmed withheld Enter allows a later explicit retry; a lost
response does not. Codex reviewed `14da0c383` once; its two reproduced
MEDIUM findings were fixed together in `bc3e9613d` without a second
review.

  Closes #3764

Supersedes #4697 #4700

CodeRabbit was rate-limited on both source PRs and did not review them.
Both fixes reuse the existing Chat composer and its notices; no new
composer control or layout was added.

## Before and after

### #4697 — Grok confirmation

Korean light-theme isolated demo: [desktop
before](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3977-1280-before.png)
/ [desktop
after](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3977-1280-after.png)
· [phone
before](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3977-390-before.png)
/ [phone
after](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3977-390-after.png).

### #4700 — Fallback Enter

Korean light-theme isolated demo: [desktop
before](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3764-1280-before.png)
/ [desktop
after](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3764-1280-after.png)
· [phone
before](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3764-390-before.png)
/ [phone
after](https://github.com/devswha/ovis/blob/d1038884c66983ab7dedd6be820ff63e8a7bbef5/3764-390-after.png).

## Validation

- Focused unit tests for both source PRs: 310 passed across 9 files
(Grok send and queue, pending-agent-only, compose, input-line send,
prompt guard, agent input send, fallback answer, and composer draft).
- `bun run typecheck` and `git diff --check` passed.
- `UNIT_TEST_WORKERS=4 bun run check fast`: workflow syntax, generated
files, typecheck, and build passed; unit step exited 1 (27,966 passed, 2
failed, 247 skipped). Both failures (`server/ssh-account-add.test.ts`
and `scripts/plugin-tui.test.ts`) reproduced on unchanged main
`b0f20e7bc` with the same long `TMPDIR`. Both files passed with a short
`TMPDIR` on the combined branch and on main (136 passed, 0 failed each).
The full command was not rerun with the short path.
- CI runner image: `unconfirmed-input-demo-regression`,
`composer-send-demo-regression`, and `composer-draft-demo-regression`
passed.
- Full integration and native Windows checks were not run locally. The
captures above are the original isolated-demo evidence, not newly taken
screenshots.

---------

Co-authored-by: sisyphus-dev-ai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Not merged until the owner says so

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chat: check for an agent menu once more before the fallback send presses Enter

1 participant