fix(thread): surface agent messages + plans, per-group spinner, trim noise#2729
Conversation
44bee79 to
7d98178
Compare
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Pure UI rendering fix in @posthog/ui — no business logic, data models, API contracts, or security surface touched. The core change (flushing agent messages and plans instead of peeling from buffer tail) is a sound simplification, well-documented, and display-only.
7d98178 to
f34dda7
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
f34dda7 to
2f2bcc0
Compare
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/sessions/components/new-thread/ToolCallGroupChip.tsx:40
The string `"Worked"` is the sentinel return value of `buildDoneLabel` when there are no countable actions. Comparing against it here creates silent coupling — if the default label ever changes in `conversationThreadConfig.ts`, the chip will always show both labels (or never show them) with no compiler/lint signal. The intent is better expressed as a field on `GroupSummary` that `summarize` computes once, close to the data.
```suggestion
const hasDone = summary.hasCountableWork;
```
Reviews (1): Last reviewed commit: "fix(thread): surface agent messages + pl..." | Re-trigger Greptile |
There was a problem hiding this comment.
The current-head Greptile bot flagged a valid unaddressed concern: the summary.doneLabel !== "Worked" string comparison in ToolCallGroupChip.tsx creates silent coupling to the sentinel value in buildDoneLabel. If that sentinel ever changes, the chip's label logic silently misbehaves with no compiler or lint signal. Per review policy, a bot comment with a valid concern that remains unaddressed on the current head warrants escalation.
…noise Conversation thread folded a turn's entire activity into one collapsible chip, which buried the agent's direct messages and plans, and the chip's running state was tied to the whole turn. - buildThreadGroups: agent_message_chunk and plan (switch_mode) tool calls never fold — they surface as their own chat rows wherever they occur in a turn, not just trailing. - ToolCallGroupChip: spin on the group's own in-flight tool (summary.active), not turn-level turnComplete, so a turn split across chips doesn't keep finished chips spinning. While running, show "what happened · what's happening" with a spinner. - ThoughtView: hide an empty, done-streaming "Thinking" row (pure noise). - Markdown/tool-view styling cleanup: tighter margins, selected-fill on open tool rows, drop dead variants/classes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2f2bcc0 to
96f888b
Compare
There was a problem hiding this comment.
An unresolved current-head inline comment flags a valid concern: summary.doneLabel !== "Worked" couples chip logic to a sentinel string in buildDoneLabel. If that sentinel changes, the label display silently misbehaves with no compiler or lint signal. The fix is straightforward — add a hasCountableActions boolean to GroupSummary — but it was not made in this diff.
There was a problem hiding this comment.
Pure UI rendering fix in @posthog/ui — the bot's concern about sentinel string coupling was directly addressed by adding hasCountableWork as a typed boolean on GroupSummary, and the inline comment is resolved. No business logic, data models, API contracts, or security surfaces touched.
What
The conversation thread folded a turn's entire activity into one collapsible chip. That buried the agent's direct messages and plans, and the chip's running state was tied to the whole turn so finished work kept spinning.
agent_message_chunkitems never fold; they render as their own chat row wherever they occur in a turn (not just trailing).switch_mode(ExitPlanMode) tool call never folds; renders viaPlanApprovalViewstandalone.summary.active), not turn-levelturnComplete. A turn split across chips no longer keeps finished chips spinning. While running, the chip readswhat happened · what's happeningwith a spinner.Verified
Driven live against the running app over CDP:
Worked→ "Checking." →1 tool call→ answer).⠏ Ran 1 command · Sleep 15 then echo ok(spinner + both labels).lint + typecheck clean.
🤖 Generated with Claude Code