You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): count a bot's image as an answer so its turn never reads "Nothing to report" - #52792
Sometimes a bot ends its turn by showing a picture and then sending its "I have nothing to say" code word (NO_REPLY). The app only looked for words when deciding whether the bot had answered, so it put a "Nothing to report" label right next to the picture the bot had just shown. Now a picture from the bot counts as an answer, and the wrong label goes away.
What Changed
Before: in a bot chat, a settled turn that drew an image and also contained the NO_REPLY marker showed a "Nothing to report" row beside the image. This happened whether the marker came before the image, after it, or in the same row.
After: the image is the turn's answer, so the marker row is not drawn and no "Nothing to report" label appears.
Mechanism:rowSays in src/shared/native-chat/transcript/turns/native-chat-acting-turns.ts now also counts an assistant image-ref block as the bot answering, not just non-marker text. A turn that drew an image therefore lands in actingTurns, and nativeChatUndrawnQuietAnswers / quietBotAnswer already skip "Nothing to report" for acting turns. Desktop (transcript slots, BotGroupTurn) and mobile (use-mobile-native-chat-quiet-answers, MobileBotGroupTurns) share this rule.
Tests in native-chat-quiet-turns.test.ts cover marker-then-image, image-then-marker, image and marker in one row, and two turns (a later turn's image does not clear an earlier turn's "Nothing to report").
Why
The root cause was that the "did the bot answer?" check counted words only. Image-only assistant rows come from ACP image chunks, the OpenCode, OMP and Grok decoders, and Claude URL images, so they fell through. The original version of this PR made a settled turn's last drawn answer its close (lastByTurn in native-chat-quiet-turns.ts). Review showed that this depended on row order: [ask, image, NO_REPLY] and a single [image, NO_REPLY] row still read "Nothing to report". Fixing the predicate at its source covers every order and adds no new pass.
Scope: this is a partial fix for #52493. Scene 1 (a group peer answer that is only NO_REPLY, in bot-group-schema.ts) is left out on purpose, because open #48523 takes the opposite direction for silent member turns and should decide it.
N/A for screenshots: this changes how transcript rows are computed, and getting a GUI capture would mean running Electron. Instead, here is the before/after of the rows drawn by the real desktop builder buildNativeChatTranscriptSlots in an expanded bot chat (wait = the "Nothing to report" marker row, shot = the image row, both = one row with the image and the marker):
Scene
main
this PR
[ask, NO_REPLY, image]
ask, wait, shot
ask, shot
[ask, image, NO_REPLY]
ask, shot, wait
ask, shot
[ask, image+NO_REPLY row]
ask, both (labelled "Nothing to report")
ask, both (no label)
user attached image, bot says only NO_REPLY
ask, wait
ask, wait (unchanged, correct)
plain quiet turn [ask, NO_REPLY]
ask, wait
ask, wait (unchanged)
two turns, image only in the second
a1, w1, a2, w2, shot
a1, w1, a2, shot
non-bot chat
ask, wait, shot
ask, wait, shot (unchanged)
Testing
Reproduced on main with a scratch probe through buildNativeChatTranscriptSlots (table above). The probe was not committed.
The new assertions fail with main's native-chat-acting-turns.ts (undrawn gives [] where [0]/[1] is expected) and pass with this change.
vitest (config/vitest.config.ts): src/shared/native-chat/transcript/turns/ and src/shared/bots: 33 files, 131 tests passed. Earlier review rounds also ran native-chat conversation/slots, components/bots/ and bot-quiet-result (393 passed).
Mobile vitest: use-mobile-native-chat-quiet-answers passed (the full turn-state/ and bots/ folders passed in review: 76 tests).
oxlint, oxfmt --check, the anti-slop and native-plugin oxlint configs, ast-grep, and the changed-code quality gate are clean.
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None that matters. This runs in the renderer only on a full transcript slot rebuild, not on streamed text frames. The only added work is one block.type comparison per block, and the image check returns before the marker regex runs. Measured nativeChatActingTurnKeys (warm, median), main vs this PR: N=200 rows 0.043 ms vs 0.035 ms, N=2000 0.353 ms vs 0.265 ms, adversarial N=2000 4.60 ms vs 2.32 ms. There are no new caches, memo inputs, I/O, timers or polling. One tab's update still rebuilds only its own transcript, so at N=200 tabs the calls per update are the same as on main.
Risk
Level: Low
The riskiest part is that more turns now count as "acting". That flag only controls whether "Nothing to report" shows. In a non-bot chat it has no visible effect, because quietBotAnswer returns early there. An older paired phone keeps its own copy of the rule and may still show the label until it updates (cosmetic). To back it out, do a plain revert.
Review
Reviewed in several rounds (correctness, breakage hunt, perf). Findings were fixed: the order-dependent lastByTurn scan was replaced by this predicate fix, and the unreachable Orca-card check was dropped. Known gap, not a regression and left as a follow-up: nativeChatQuietTurns still hides a whole settled turn that nobody asked and that is shaped [NO_REPLY, image], image included. That overlaps #48523.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Original fix by @mark-l-rise in #52792. The landing commit credits them with a Co-authored-by trailer.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
Native-chat acting-turn detection now treats assistant messages with an image-reference block as shown content, in addition to nonempty text. The quiet-turn comment now describes content the bot “said or showed.” Tests add image cases around NO_REPLY markers and verify that an image in a later turn does not change the marker result for the first turn.
Merge Risk: Minimal · up to 7abcd
This change makes the native chat count assistant image references as shown content when it decides whether a turn is quiet. No concrete defect or performance regression was identified, so it looks safe to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
The only directly linked issue, #52493, is closed and completed. Per the assessment rules, it supplies historical background only, so no active linked-issue coding requirements apply. The incremental …
Out of Scope Changes check
The incremental change since ea1d19e adds a third source file, src/shared/native-chat/transcript/turns/native-chat-acting-turns.ts. The PR description still lists two source files, so the descripti…
Title check
The title names the main change: image-only bot answers now count as answers, so a turn with an image no longer shows "Nothing to report". It is specific, scoped to native-chat, and matches the raw su…
Description check
The description follows the repository template closely. It covers ELI5, What Changed (before and after plus mechanism), Why (root cause and rejected approach), Linked Issue (partial refs to #52493), …
Full details: Linked Issues check
Explanation
The only directly linked issue, #52493, is closed and completed. Per the assessment rules, it supplies historical background only, so no active linked-issue coding requirements apply. The incremental change since ea1d19e (head 7abcdb3) does not alter this result. The new hunk in native-chat-acting-turns.ts is consistent with the NO_REPLY rendering scope of this PR, not with a new requirement.
Full details: Out of Scope Changes check
Explanation
The incremental change since ea1d19e adds a third source file, src/shared/native-chat/transcript/turns/native-chat-acting-turns.ts. The PR description still lists two source files, so the description is stale for this file. The diff changes rowSays to treat assistant image-ref blocks as shown content, in addition to non-empty text. It also updates a doc comment. This matches the image-answer objective of the PR: a turn that shows an image is not treated as 'nothing to report'. The change is connected to NO_REPLY quiet-turn rendering and is not out of scope. The earlier whole-PR file list (two source files, three test files) is incomplete. This assessment did not read the updated test files at head. Their coverage of the rowSays change is not verified here.
Full details: Title check
Explanation
The title names the main change: image-only bot answers now count as answers, so a turn with an image no longer shows "Nothing to report". It is specific, scoped to native-chat, and matches the raw summary and PR description, which both describe the rowSays change and the tests.
Full details: Description check
Explanation
The description follows the repository template closely. It covers ELI5, What Changed (before and after plus mechanism), Why (root cause and rejected approach), Linked Issue (partial refs to #52493), Visual Proof (N/A reason plus a before/after table), Testing, Performance, Risk with level and revert plan, Review, the upstream boundary checkbox, and the checklist. Minor gaps: the AI Disclosure section is absent (it is optional for maintainers), and the Linked Issue uses 'Refs' with a partial fix rather than 'Fixes'. The final lint/typecheck/test/build checkbox is unchecked, which is acceptable given the note that CI covers it.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
…reads "Nothing to report"
A settled bot turn that drew an image and also emitted the NO_REPLY marker
showed "Nothing to report" beside the image. rowSays in
native-chat-acting-turns.ts only counted words, so the turn was not acting.
It now also counts an assistant image-ref block, so the marker stays undrawn
whether it comes before, after, or in the same row as the image. Desktop and
mobile share this rule.
Scene 1 of the issue (a group peer answer that is only NO_REPLY) is not
covered here; it overlaps stablyai#48523.
Refs stablyai#52493
Co-authored-by: mark-l-rise <[email protected]>
nwparker
changed the title
fix(native-chat): keep marker-only answers out of group turns and off settled rows
fix(native-chat): count a bot's image as an answer so its turn never reads "Nothing to report"
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Sometimes a bot ends its turn by showing a picture and then sending its "I have nothing to say" code word (
NO_REPLY). The app only looked for words when deciding whether the bot had answered, so it put a "Nothing to report" label right next to the picture the bot had just shown. Now a picture from the bot counts as an answer, and the wrong label goes away.What Changed
NO_REPLYmarker showed a "Nothing to report" row beside the image. This happened whether the marker came before the image, after it, or in the same row.rowSaysinsrc/shared/native-chat/transcript/turns/native-chat-acting-turns.tsnow also counts an assistantimage-refblock as the bot answering, not just non-marker text. A turn that drew an image therefore lands inactingTurns, andnativeChatUndrawnQuietAnswers/quietBotAnsweralready skip "Nothing to report" for acting turns. Desktop (transcript slots,BotGroupTurn) and mobile (use-mobile-native-chat-quiet-answers,MobileBotGroupTurns) share this rule.native-chat-quiet-turns.test.tscover marker-then-image, image-then-marker, image and marker in one row, and two turns (a later turn's image does not clear an earlier turn's "Nothing to report").Why
The root cause was that the "did the bot answer?" check counted words only. Image-only assistant rows come from ACP image chunks, the OpenCode, OMP and Grok decoders, and Claude URL images, so they fell through. The original version of this PR made a settled turn's last drawn answer its close (
lastByTurninnative-chat-quiet-turns.ts). Review showed that this depended on row order:[ask, image, NO_REPLY]and a single[image, NO_REPLY]row still read "Nothing to report". Fixing the predicate at its source covers every order and adds no new pass.Scope: this is a partial fix for #52493. Scene 1 (a group peer answer that is only
NO_REPLY, inbot-group-schema.ts) is left out on purpose, because open #48523 takes the opposite direction for silent member turns and should decide it.Linked Issue
Refs #52493 (partial; Scene 1 stays open)
Visual Proof
N/A for screenshots: this changes how transcript rows are computed, and getting a GUI capture would mean running Electron. Instead, here is the before/after of the rows drawn by the real desktop builder
buildNativeChatTranscriptSlotsin an expanded bot chat (wait= the "Nothing to report" marker row,shot= the image row,both= one row with the image and the marker):[ask, NO_REPLY, image][ask, image, NO_REPLY][ask, image+NO_REPLY row]NO_REPLY[ask, NO_REPLY]Testing
Reproduced on main with a scratch probe through
buildNativeChatTranscriptSlots(table above). The probe was not committed.The new assertions fail with main's
native-chat-acting-turns.ts(undrawn gives[]where[0]/[1]is expected) and pass with this change.vitest(config/vitest.config.ts):src/shared/native-chat/transcript/turns/andsrc/shared/bots: 33 files, 131 tests passed. Earlier review rounds also ran native-chat conversation/slots,components/bots/and bot-quiet-result (393 passed).Mobile vitest:
use-mobile-native-chat-quiet-answerspassed (the fullturn-state/andbots/folders passed in review: 76 tests).oxlint, oxfmt --check, the anti-slop and native-plugin oxlint configs, ast-grep, and the changed-code quality gate are clean.
Platform: macOS (shared logic, nothing platform-specific).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None that matters. This runs in the renderer only on a full transcript slot rebuild, not on streamed text frames. The only added work is one
block.typecomparison per block, and the image check returns before the marker regex runs. MeasurednativeChatActingTurnKeys(warm, median), main vs this PR: N=200 rows 0.043 ms vs 0.035 ms, N=2000 0.353 ms vs 0.265 ms, adversarial N=2000 4.60 ms vs 2.32 ms. There are no new caches, memo inputs, I/O, timers or polling. One tab's update still rebuilds only its own transcript, so at N=200 tabs the calls per update are the same as on main.Risk
Level: Low
The riskiest part is that more turns now count as "acting". That flag only controls whether "Nothing to report" shows. In a non-bot chat it has no visible effect, because
quietBotAnswerreturns early there. An older paired phone keeps its own copy of the rule and may still show the label until it updates (cosmetic). To back it out, do a plain revert.Review
Reviewed in several rounds (correctness, breakage hunt, perf). Findings were fixed: the order-dependent
lastByTurnscan was replaced by this predicate fix, and the unreachable Orca-card check was dropped. Known gap, not a regression and left as a follow-up:nativeChatQuietTurnsstill hides a whole settled turn that nobody asked and that is shaped[NO_REPLY, image], image included. That overlaps #48523.Agent skill upstream boundary
Notes
Original fix by @mark-l-rise in #52792. The landing commit credits them with a
Co-authored-bytrailer.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)