Skip to content

fix(chat): avoid confirming an undrawn Grok queue - #4697

Closed
devswha wants to merge 1 commit into
mainfrom
fix/grok-minimal-confirmation
Closed

devswha wants to merge 1 commit into
mainfrom
fix/grok-minimal-confirmation

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What broke

Grok's minimal mode can draw its queue count after the message has joined the queue. When the count had not drawn, Chat could report success while the message was still waiting.

Fix

During a known active turn, an empty count with no new matching echo is not confirmation. Use the existing unconfirmed result and translated “Not confirmed” note, and do not press another Enter. This does not claim to distinguish identical queued rows from different clients.

Validation

  • Red: the mock's queue still contained the message but the submit succeeded; the client also mislabeled the unconfirmed result as “Not sent.” Green: HERDR_TEST_MODE=unit bun test ./server/core/grok-chat-send.test.ts ./src/lib/compose.test.ts (100 passed).
  • HERDR_TEST_MODE=unit bun test ./server/core/pending-agent-only.test.ts ./server/core/grok-queue.test.ts --timeout 15000 (71 passed).
  • git diff --check.
  • Initial bun run check fast passed typecheck and build but failed in TUI parity, the old Codex prompt-frame case, and runner-launcher tests during concurrent runs. All those cases passed in the exact targeted replay on both main and the branch using the same short TMPDIR.
  • UNIT_TEST_WORKERS=4 bun run check fast wrote a successful exit-0 verification report for unchanged f8ee09ecf (27,953 unit tests passed, 0 failed). Its monitoring shell returned 134 after the report was written.

Before and after

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

Review notes

Codex reviewed pushed head f8ee09ecf once and reported no reproduced HIGH or MEDIUM findings.

Closes #3977

@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 5 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 f8ee09e.

Files selected for processing: 5

  • changelog.d/grok-minimal-confirmation.md
  • server/core/grok-chat-send.test.ts
  • server/core/grok-queue.ts
  • src/lib/compose.test.ts
  • src/lib/compose.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.

Grok Send now: two limits of reading Grok's screen, and an honest wording for 'cannot tell'

1 participant