feat(ui): Show subagent logs in bounded vertical view#4280
feat(ui): Show subagent logs in bounded vertical view#4280TheodoreSpeaks merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@BugBot review |
PR SummaryMedium Risk Overview Subagent While streaming, the viewport auto-sticks to bottom unless the user scrolls upward, using Reviewed by Cursor Bugbot for commit b472ae9. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b472ae9. Configure here.
Greptile SummaryThis PR introduces a bounded scrollable viewport ( Confidence Score: 5/5Safe to merge — changes are UI-only with no data-integrity risk and a correct abort-handler fix. All three files contain well-scoped, internally consistent changes. The RAF loop is correctly cleaned up via useLayoutEffect's return value, the stickToBottom guard prevents infinite scroll races, and the overflow state update is guarded against spurious re-renders. The lane: 'subagent' addition is consistent with the existing pattern at line 712 and matches the stop-route schema. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Stream Event Arrives] --> B{Block type?}
B --> |subagent_text OR\nsubagent_thinking| C[Flatten to text item\nin AgentGroup]
B --> |subagent_tool_call| D[ToolCallItem\nin AgentGroup]
B --> |thinking| E[ThinkingBlock\nin main message]
B --> |text| F[Plain text\nin main message]
C --> G[AgentGroup renders\nBoundedViewport]
D --> G
G --> H{Content overflows\n110px?}
H --> |Yes| I[Show top/bottom\ngradient fades]
H --> |No| J[Render without fades]
I --> K{isStreaming?}
J --> K
K --> |Yes + stickToBottom| L[RAF loop scrolls\nto bottom smoothly]
K --> |No| M[Static view]
subgraph Stop handler
N[User stops stream] --> O[Map ContentBlock to\nstop API format]
O --> P{block.subagent\ntruthy?}
P --> |Yes| Q[Add lane: subagent]
P --> |No| R[No lane field]
end
Reviews (1): Last reviewed commit: "fix lint" | Re-trigger Greptile |

Summary
Subagent output can get pretty in the weeds and the user doesn't need to see all that. Like thinking, we should only display the last few lines to reduce visual noise. Note subagent thinking now renders as plaintext to avoid nested boxes in boxes.
Type of Change
Testing
Checklist
Screenshots/Videos
Screen.Recording.2026-04-23.at.2.38.29.PM.mov