Skip to content

Comments

Show individual messages in playground thread#215

Draft
ianmacartney wants to merge 7 commits intomainfrom
cursor/playground-thread-message-display-8d27
Draft

Show individual messages in playground thread#215
ianmacartney wants to merge 7 commits intomainfrom
cursor/playground-thread-message-display-8d27

Conversation

@ianmacartney
Copy link
Member

Update the agent playground to show all thread messages separately with full data, addressing issue #168.

The previous toUIMessages grouping in the playground hid some parts of the agent's response, making it difficult to debug and understand the full message flow. This PR introduces a "Raw" view that displays each message individually with complete metadata, usage, tool calls, and content, alongside the existing "Grouped" view.


Slack Thread

Open in Cursor Open in Web

…eparately

- Add RawMessageItem component that displays individual messages with all their data
  - Shows role, status, order, stepOrder, model, provider, usage, etc.
  - Displays tool calls and tool results with badges
  - Expandable section showing full message content, usage details, sources, provider metadata, etc.
- Add toggle in MessageList to switch between 'Raw' and 'Grouped' (UIMessages) views
  - Raw view shows all messages separately with full data (default)
  - Grouped view uses toUIMessages which combines assistant messages
- Addresses issue #168 where playground was missing some response parts

Fixes #168

Co-authored-by: ian <ian@convex.dev>
@cursor
Copy link

cursor bot commented Jan 24, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/playground-thread-message-display-8d27

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 24, 2026

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/agent/@convex-dev/agent@215

commit: 90f1094

)}
</Button>

{/* Expanded details */}
Copy link
Member Author

Choose a reason for hiding this comment

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

@cursor let's change this section to just JSON stringify the whole message document

Copy link

@cursor cursor bot Jan 29, 2026

Choose a reason for hiding this comment

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

These changes have already been made and pushed in the previous commit (4280211):

MessageItem.tsxUIMessageItem.tsx (for grouped UIMessage display)
RawMessageItem.tsxMessageDocItem.tsx (for individual message document display)

The expanded details section was also simplified to just JSON.stringify(message, null, 2) as requested.

Open in Cursor Open in Web

onClick: React.MouseEventHandler<HTMLDivElement>;
}

const RawMessageItem: React.FC<RawMessageItemProps> = ({
Copy link
Member Author

Choose a reason for hiding this comment

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

@cursor let's call the old one UIMessageItem and the new one MessageDocItem

Copy link

Choose a reason for hiding this comment

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

Taking a look!

Open in Cursor Open in Web

cursoragent and others added 3 commits January 29, 2026 02:43
- Rename MessageItem to UIMessageItem (uses UIMessage grouping)
- Rename RawMessageItem to MessageDocItem (shows individual MessageDoc)
- Simplify expanded details section to just JSON.stringify the whole message document
- Update MessageList imports to use new component names

Co-authored-by: ian <ian@convex.dev>
@ianmacartney ianmacartney changed the title Playground thread message display Show individual messages in playground thread Jan 29, 2026
@github-actions
Copy link

🚀 Preview Deployment

Your preview is ready!

URL: https://agent-pr-215.surge.sh

@ianmacartney
Copy link
Member Author

@cursor we don't need the full JSON message details, since there is a right panel including that already. Instead it should show message.content. Also the default should be "grouped" and the name of that toggle should be UIMessages, and the other should be MessageDocs.

@cursor
Copy link

cursor bot commented Jan 29, 2026

Taking a look!

Open in Cursor Open in Web

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.

2 participants