Skip to content

fix(chat): round-1 bug-hunt fixes, minus the superseded skip-notice hunk (rebased from #576) - #578

Merged
kahme247 merged 1 commit into
mainfrom
rework-pr-576-2026-11-24
Nov 24, 2026
Merged

kahme247 merged 1 commit into
mainfrom
rework-pr-576-2026-11-24

Conversation

@kahme247

@kahme247 kahme247 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

fix(chat): round-1 bug-hunt fixes, minus the superseded skip-notice hunk (rebased from #576)

Supersedes #576 (which superseded #569, a rework of #299). Same content, rebased onto main adc4e3b so CI re-runs against the update-worker flake fix (#577).

  • MessageView: hoist updateOverflow and re-measure on image onLoad, so late-loading images growing past the 300px collapsed cap get the overflow toggle.
  • SubagentTranscriptDialog: export SubagentTranscriptRow and cap tool-call input JSON at the same 400-char budget as text rows.
  • useAgentSession / lib/assistant-response: hold thinking-only finished replies via new hasHoldableAssistantContent instead of dropping them.

Verified locally: 422 tests pass across the touched files (rpc 330, MessageView 72, SubagentTranscriptDialog 16, assistant-response 4), tsc and eslint clean. The rebased files are byte-identical to #576's head; the only intervening main change (#577, update-worker.test.mjs) is untouched by this PR.

Summary by CodeRabbit

  • Bug Fixes
    • Message bubbles now recheck their size after images load, so the “Show full input” option appears when an image causes the message to exceed its display limit.
    • Long tool-call inputs in assistant transcripts are shortened in the display to keep rows concise.
    • Thinking-only assistant replies remain visible while saved conversation history is catching up.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes remeasure user-message overflow after images load, truncate tool-call input in transcript rows, and hold finished thinking-only replies while transcript history catches up.

Changes: Image overflow measurement

Layer / File(s) Summary
Remeasure overflow on image load
components/MessageView.tsx, components/MessageView.test.mjs
UserMessageView now remeasures overflow when a bubble image loads. The test checks that the “Show full input” button appears after the image causes the bubble to grow.

Transcript tool-call input

Layer / File(s) Summary
Truncate tool-call input
components/SubagentTranscriptDialog.tsx, components/SubagentTranscriptDialog.test.mjs
Tool-call input JSON is truncated to 400 characters. SubagentTranscriptRow is exported, and a test checks that a long input does not appear in full.

Thinking-only reply retention

Layer / File(s) Summary
Define holdable assistant content
lib/assistant-response.ts, lib/assistant-response.test.mjs
hasHoldableAssistantContent accepts visible assistant content and nonempty thinking blocks. Tests cover holdable and excluded content.
Hold finished replies during catch-up
hooks/useAgentSession.ts, hooks/useAgentSession.rpc.test.mjs
The session hook uses the new predicate to hold finished replies. A regression test checks that a thinking-only reply remains in streamState.streamingMessage while catch-up history does not yet include it.

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

Change: Bug fix

Possibly related PRs

Suggested reviewers: andrebrait, gtanger

Merge Risk: Minimal · up to dd25f

This PR fixes image-driven overflow detection, caps tool-call input display in transcripts, and keeps finished thinking-only replies visible while history catches up. The changes are local to presentation and retention, with tests covering each, and no merge-blocking risk was identified.

Security architecture risk: Minimal · up to dd25f

The changes affect how chat displays content that is already available to the current session. No material change to access, data ownership, or failure containment was identified.

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 three fixes (chat fixes plus a rebase note), and the PR touches MessageView, SubagentTranscriptDialog, useAgentSession, and assistant-response. Its main point is a bug-fix bundle for c…
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 three fixes (chat fixes plus a rebase note), and the PR touches MessageView, SubagentTranscriptDialog, useAgentSession, and assistant-response. Its main point is a bug-fix bundle for chat. It is broad and includes a rebase/process detail, but it refers to real parts of the change, so it is related. It does not name the main change specifically.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 273a72af-05e0-4409-87e4-79e07516b58a
Commits

Reviewing files that changed from the base of the PR and between adc4e3b and dd25f57.

Files selected for processing: 8

  • components/MessageView.test.mjs
  • components/MessageView.tsx
  • components/SubagentTranscriptDialog.test.mjs
  • components/SubagentTranscriptDialog.tsx
  • hooks/useAgentSession.rpc.test.mjs
  • hooks/useAgentSession.ts
  • lib/assistant-response.test.mjs
  • lib/assistant-response.ts

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

@kahme247
kahme247 merged commit 4be697c into main Nov 24, 2026
5 checks passed
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