Skip to content

fix(native-chat): count a bot's image as an answer so its turn never reads "Nothing to report" - #52792

Merged
nwparker merged 1 commit into
stablyai:mainfrom
mark-l-rise:fix-52493-quiet-marker-followup
Nov 30, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
mark-l-rise:fix-52493-quiet-marker-followup

Conversation

@mark-l-rise

@mark-l-rise mark-l-rise commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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

  • 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.

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 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.

  • 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.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)

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · This PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

This PR removes trailing quiet markers from group peer answers and lets later assistant text or images replace an earlier marker-only row.

  • Group turns omit marker-only peer answers and keep readable reply text.
  • Later text or image answers replace earlier quiet markers in a turn.

Reviews (1) · Last reviewed commit: "fix(native-chat): keep marker-only answe..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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: Passed 4

Check name Status Explanation
Linked Issues check Passed 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 Passed 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 Passed 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 Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0fee3f8d-46ee-4842-acb8-9898688851f5
Commits

Reviewing files that changed from the base of the PR and between ea1d19e and 7abcdb3.

Files selected for processing: 2

  • src/shared/native-chat/transcript/turns/native-chat-acting-turns.ts
  • src/shared/native-chat/transcript/turns/native-chat-quiet-turns.test.ts

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
nwparker force-pushed the fix-52493-quiet-marker-followup branch from ea1d19e to 7abcdb3 Compare November 30, 2026 01:54
@nwparker 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
@nwparker
nwparker merged commit bb17494 into stablyai:main Nov 30, 2026
57 of 58 checks passed
@mark-l-rise
mark-l-rise deleted the fix-52493-quiet-marker-followup branch November 30, 2026 02:17
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.

2 participants