Skip to content

fix(bots): don't print the NO_REPLY marker in group chat turns - #48496

Merged
nwparker merged 1 commit into
mainfrom
bugbash/issue-48444
Nov 24, 2026
Merged

nwparker merged 1 commit into
mainfrom
bugbash/issue-48444

Conversation

@nwparker

@nwparker nwparker commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When a bot in a group chat decides it has nothing to say, it answers with a secret word, NO_REPLY. Its own chat already hides that word. The group chat did not, so people saw a bare NO_REPLY message. Now the group chat hides it the same way.

Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​200 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​200
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​32 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​27

What Changed

  • Before: in a group room, a member bot's quiet turn drew NO_REPLY as a normal message. The marker also showed briefly while the answer streamed in, and a short note ending in the marker (Moved ITEM-1 to done.\n\nNO_REPLY) kept it. On mobile, group turns had the same problem. Desktop remote-ask answers showed the raw marker too.
  • After: group member turns follow the same rule as a bot's own chat. The marker never draws. A note keeps its words without the marker. A turn that said and did nothing reads "Nothing to report". The marker is held back while it streams in.
  • How it works:
    • Desktop: NativeChatAssistantMessageRow applied quietBotAnswer only when a bot owned the row's workspace. Member turns run in the room's home workspace, which no bot owns. A new NativeChatBotAnswerContext (default false) lets BotGroupTurn mark its rows as bot answers. The row checks this context as well as the existing workspace check.
    • Mobile: MobileNativeChatAnswerProse required bot?.botId, but group member identities have no botId. Any bot identity now counts.
    • BotGroupRemoteAsk now runs a remote bot's answer through quietBotAnswer, so desktop matches the phone.

Why

The bot-answer rule (quietBotAnswer) already exists. It just never ran for group turns because the group transcript is not "owned" by a bot. We considered treating the room's home workspace as bot-owned, but that would affect non-bot rows and other room surfaces. A scoped context marks only the member-turn rows and reuses the existing rule as it is.

This is a partial fix. Quiet "read an update to its items" wakeups still show in the room, as they do on main. Whether to hide them completely is a separate UX decision.

Linked Issue

Refs #48444

Visual Proof

N/A. No before/after capture was made: GUI/Electron runs are not allowed on the machine that prepared this PR. The change is covered by render tests that check what text the desktop group turn, the desktop remote-ask card and the mobile answer prose actually draw.

Testing

  • Repro: render a group member turn whose final assistant message is NO_REPLY, or <words>\n\nNO_REPLY, settled or streaming. On main the marker appears in the rendered text.

  • New tests: src/renderer/src/components/bots/BotGroupTurn.quiet.test.tsx, src/renderer/src/components/bots/BotGroupRemoteAsk.test.tsx, mobile/src/session/native-chat/transcript/message-content/MobileNativeChatAnswerProse.test.tsx. They pass with the fix. With the source changes reverted they fail (verified: 3 of 3 fail). The existing BotGroupTurn.outfit.test.tsx still passes.

  • Static gates on the touched files: anti-slop oxlint, code-quality native plugins oxlint, ast-grep, the changed-code quality gate and oxfmt are all clean.

  • Platforms: unit/render tests on macOS (happy-dom and react-test-renderer). The logic is platform-independent.

  • 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

Small cost, well within budget. Group-turn assistant rows (renderer, once per row render, including streaming re-renders) now run the existing quietBotAnswer text check that bot chats already run. Before, it returned early. The context provider gets a constant true, so it causes no extra re-renders. I timed quietBotAnswer per call, old path (early return) vs new path:

input settled old / new streaming old / new
typical note + marker 0.12 us / 0.14 us 0.07 us / 0.20 us
plain 360-char answer 0.07 us / 0.13 us 0.07 us / 0.40 us
100 KB answer + marker 0.08 us / 15 us 0.07 us / 62 us
100 KB of whitespace 0.08 us / 7 us 0.23 us / 60 us
50 KB of * + partial marker 0.10 us / 102 us 0.08 us / 71 us
5,000 repeated markers 0.08 us / 106 us 0.08 us / 26 us

Max single call was 0.13 ms, far under a 16 ms frame. There is no new I/O, subprocess, polling or IPC.

Risk

Level: Low

The riskiest part: group member turn rows now apply the bot-answer rule. An assistant message in a group turn that really ends with the bare word NO_REPLY will show without it, which is the intended bot behavior. Mobile: any bot identity in context (not only one with a botId) now applies the rule. That context is only provided for bot chats and group rooms. Nothing is saved, and there is no protocol or paired-phone/SSH compatibility impact. Back it out with a plain revert.

Review

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

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

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)

Reported by @Dovlan1990

A group room's member turns read their workspace as the room's home, which no
bot owns, so desktop rows never applied the bot-answer rule: NO_REPLY drew as a
message, streamed in visibly, and a quiet note kept its marker. Group turns now
mark their rows as a bot's answers. Mobile group turns had the same gap (their
identity carries no botId), so any bot identity now counts there.

Mobile remote-ask answers draw under a bot identity too, so desktop remote-ask
answers apply the same rule and both platforms read a quiet answer alike.

Quiet wakeups still show in the room as on main; hiding them is a separate UX
decision.

Refs #48444

Co-authored-by: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Group-member assistant answers now use quiet-result handling in desktop transcript rows, remote-ask responses, and mobile prose. Added tests cover NO_REPLY alongside ordinary text, standalone NO_REPLY, and ordinary answers.

Merge Risk: Minimal · up to 43352

The change hides the internal NO_REPLY marker in group-chat turns and remote-ask answers, and shows "Nothing to report" when nothing else remains. No functional or performance risk was found. The one remaining comment is a test-policy cleanup that does not block merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(bots): don't print the NO_REPLY marker in group chat turns" names the main change: group chat bot turns no longer display the NO_REPLY marker. The changeset matches this, covering deskt…
Description check Passed The description follows the repository template. It covers ELI5, What Changed (before and after, plus mechanism), Why (alternatives considered), Linked Issue (Refs #48444), Visual Proof (N/A with reas…
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(bots): don't print the NO_REPLY marker in group chat turns" names the main change: group chat bot turns no longer display the NO_REPLY marker. The changeset matches this, covering desktop group-turn rows, mobile answer prose, and the desktop remote-ask card. The title is specific and follows a conventional commit style. It omits the remote-ask and mobile parts, which is acceptable.

Full details: Description check

Explanation

The description follows the repository template. It covers ELI5, What Changed (before and after, plus mechanism), Why (alternatives considered), Linked Issue (Refs #48444), Visual Proof (N/A with reason), Testing with named test files, Performance with a measured table, Risk with level and rollback, and the AI Disclosure section is left blank, which the template allows for internal contributors. The Linked Issue uses 'Refs' rather than 'Fixes', and the template says Refs alone is not sufficient for outside contributors. The author is not identified as a stablyai team member, so the AI Disclosure section should be filled in. The final lint/typecheck/test/build checklist item is unchecked, and the 'I manually tested' box is unchecked with no manual GUI testing described.

Resolution

Confirm whether the author is a stablyai team member. If not, complete the AI Disclosure section. Also link a real issue for outside contributors, since 'Refs #48444' is not a sufficient link under the template. Finally, run or confirm pnpm lint, typecheck, test, and build.

  • 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick comments: 1

mobile/src/session/native-chat/transcript/message-content/MobileNativeChatAnswerProse.test.tsx: 1

66-74: Trivial · Maintainability & Code Quality · Quick win

Remove this render-only test under the repository test rule.

This test checks rendered copy and context wiring through four mocked modules. It does not exercise a permitted parser, persistence, security, or state-machine invariant. Remove this file and use the repository's permitted change-validation workflow. This avoids maintaining mock rendering contracts for this UI change.

Based on learnings, the repository rule says: “Never test UI behavior,” “wiring/IPC glue,” or “copy,” and “Delete low-value tests you touch instead of updating them.”

Source: Learnings

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: cdc6d4f2-17ae-467e-bf67-a8a4a0fbe0d2
Commits

Reviewing files that changed from the base of the PR and between 0cd805f and 4335222.

Files selected for processing: 8

  • mobile/src/session/native-chat/transcript/message-content/MobileNativeChatAnswerProse.test.tsx
  • mobile/src/session/native-chat/transcript/message-content/MobileNativeChatAnswerProse.tsx
  • src/renderer/src/components/bots/BotGroupRemoteAsk.test.tsx
  • src/renderer/src/components/bots/BotGroupRemoteAsk.tsx
  • src/renderer/src/components/bots/BotGroupTurn.quiet.test.tsx
  • src/renderer/src/components/bots/BotGroupTurn.tsx
  • src/renderer/src/components/native-chat/messages/rows/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/messages/rows/native-chat-bot-answer-context.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.

@nwparker
nwparker merged commit ff4d9ac into main Nov 24, 2026
57 checks passed
@nwparker
nwparker deleted the bugbash/issue-48444 branch November 24, 2026 22:44
Jinwoo-H pushed a commit that referenced this pull request Nov 24, 2026
A group room's member turns read their workspace as the room's home, which no
bot owns, so desktop rows never applied the bot-answer rule: NO_REPLY drew as a
message, streamed in visibly, and a quiet note kept its marker. Group turns now
mark their rows as a bot's answers. Mobile group turns had the same gap (their
identity carries no botId), so any bot identity now counts there.

Mobile remote-ask answers draw under a bot identity too, so desktop remote-ask
answers apply the same rule and both platforms read a quiet answer alike.

Quiet wakeups still show in the room as on main; hiding them is a separate UX
decision.

Refs #48444

Co-authored-by: Claude <[email protected]>
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