Skip to content

fix(chat): distinguish side questions in the composer - #470

Closed
andrebrait wants to merge 2 commits into
ompweb-dev:mainfrom
andrebrait:feat/btw-composer-mode
Closed

andrebrait wants to merge 2 commits into
ompweb-dev:mainfrom
andrebrait:feat/btw-composer-mode

Conversation

@andrebrait

@andrebrait andrebrait commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Change

  • Tint the composer while typing /btw.
  • Show Send rather than Queue, Steer, or Stop during a running turn.
  • Dispatch the side question before the ordinary prompt streaming guard; preserve attachment refusal and submission fencing.

Verification

  • Typecheck and lint passed.
  • Full suite: 2,537 passed, 12 skipped, 0 failed.
  • Build and production smoke passed. Build retains duplicate-locale-key and highlight-selector warnings in unchanged files.
  • Chromium: actual ChatInput in an isolated harness; light/dark, 320/768/1024/1440 widths, idle/running, /btwx boundary, immediate builtin dispatch.
  • New click regressions failed before the dispatch correction and passed afterward for Queue and Steer preferences.
  • Single condensed adversarial review: no actionable findings.
  • Commit hook refreshed the tracked graph metadata.

Summary by CodeRabbit

  • New Features
    • During an active run, entering /btw switches the composer to Send. Side questions send immediately instead of being queued or steered.
    • /btw remains available in the slash-command palette while a run is active, and works with dictation.
    • The composer uses accent styling in /btw mode.
  • Bug Fixes
    • Sending a side question clears the draft regardless of the queue or steer preference. With a pending upload, the draft is preserved and no side question is sent.

Overlaps #338 (/btw kept in the streaming slash menu, side question dispatched before the streaming guard); this PR also tints the composer, shows Send during a run and routes dictated side questions.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3eb6ca5f-5cf5-4f33-b572-1a7ed47495e3
Commits

Reviewing files that changed from the base of the PR and between e602f6d and 657d246.

Files selected for processing: 3

  • CHANGELOG.md
  • components/ChatInput.btw.test.mjs
  • components/ChatInput.tsx

No actionable comments were generated in the recent review.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54d1fe03-d0ef-46f4-a65e-76a46899c84f
Commits

Reviewing files that changed from the base of the PR and between ca8b2c1 and e602f6d.

Files selected for processing: 3

  • CHANGELOG.md
  • components/ChatInput.btw.test.mjs
  • components/ChatInput.tsx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 3

  • GitHub Check: CodeRabbit
  • GitHub Check: Verify (ubuntu-latest)
  • GitHub Check: Verify (windows-latest)
Additional context used

Code guidelines: 1

AGENTS.md — auto-discovered
Path-based instructions: 2

Source excerpt: A module under test that must see a fake builtin is imported with a fresh query (`?fresh=N`) after `mockBuiltin(t, name, overrides)` (`tests/mock-builtin.mjs`, built on `mock.module`; Bun's `mock.restore()` does not undo `mo...

CodeRabbit inference engine (AGENTS.md)

Files:

  • components/ChatInput.btw.test.mjs
Source excerpt: `components/ui/` holds the shared primitives (built on `@base-ui/react`): `primitives.tsx` (Dialog/Tooltip/Collapsible), `field.tsx` (form fields + ConfirmDialog), `toast.tsx` (`toast.success/error/info`, mounted in AppShell...

CodeRabbit inference engine (AGENTS.md)

Files:

  • components/ChatInput.btw.test.mjs
  • components/ChatInput.tsx
Additional comments: 3

components/ChatInput.tsx: 1

482-483: LGTM!

Also applies to: 1288-1288, 1291-1291, 1376-1378, 1510-1510, 1867-1867, 3188-3188, 3213-3214, 3968-3968, 3996-3997, 4006-4006, 4013-4013, 4021-4021

components/ChatInput.btw.test.mjs: 1

53-64: LGTM!

Also applies to: 80-85, 87-100

CHANGELOG.md: 1

96-96: LGTM!

Walkthrough

ChatInput now recognizes /btw drafts and routes them through the side-question handler during a run. The composer displays an accent state and a Send action for these drafts. Tests cover streaming submission, slash-palette visibility, and pending-upload behavior.

Changes: /btw side-question submission

Layer / File(s) Summary
Recognize and route side questions
components/ChatInput.tsx, components/ChatInput.btw.test.mjs
ChatInput recognizes /btw, processes it before the streaming guard, routes dictation follow-ups through the side-question handler, and retains /btw in the slash palette during streaming. Tests cover submissions with both queue and steer preferences and slash-palette visibility.
Show the /btw send state
components/ChatInput.tsx, components/ChatInput.btw.test.mjs, CHANGELOG.md
The composer uses accent styling and a Send action for /btw drafts. Pending or failed uploads do not disable the button or replace its Send label. A test verifies that a pending upload leaves the draft unchanged and invokes no callback. The changelog documents the side-question behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: kahme247, cloudwindy, gtanger

Merge Risk: Minimal · previous review e602f

This change routes /btw side questions during a run and adjusts the composer's appearance and Send action. No concrete merge-blocking risk was identified in the supplied context.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the composer now tells side questions (/btw) apart from ordinary prompts, which the changelog, ChatInput.tsx, and the tests all support. The 'fix(chat)' prefix is a …
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 names the main change: the composer now tells side questions (/btw) apart from ordinary prompts, which the changelog, ChatInput.tsx, and the tests all support. The 'fix(chat)' prefix is a conventional-commit type and the rest of the title is specific. The title does not mention the send-during-run behavior or the dispatch bypass, but it does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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

A rabbit taps /btw with care,
The composer glows with accent flair.
A question skips the waiting line,
While Send stays ready, clear, and fine.
The rabbit hops, the draft stays near.

@kilo-code-bot

kilo-code-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Code Review Roast 🔥

Verdict: No Issues Found | Recommendation: Merge

Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything.

📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are.

Files Reviewed (4 files)
  • lib/rpc-manager.ts
  • CHANGELOG.md
  • components/ChatInput.btw.test.mjs
  • components/ChatInput.tsx
Previous Review Summary (commit e602f6d)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e602f6d)

Verdict: No Issues Found | Recommendation: Merge

Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. /btw gets its own runway, the streaming guard steps aside like a polite bouncer, and even the pending-upload refusal shows up on time — suspiciously competent behavior.

📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are.

Files Reviewed (3 files)
  • CHANGELOG.md
  • components/ChatInput.btw.test.mjs
  • components/ChatInput.tsx

Reviewed by free · Input: 41.9K · Output: 12.2K · Cached: 164.8K

@andrebrait

Copy link
Copy Markdown
Collaborator Author

Replaced by #479 (same commits, branch now in this repository).

@andrebrait andrebrait closed this Nov 13, 2026
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