fix: show correct input/output in experiment results#13165
fix: show correct input/output in experiment results#13165greglobinski merged 4 commits intomainfrom
Conversation
- Fix detail panel displaying output data under 'Input' label - Add missing Output section to detail panel - Add Input column to experiment results list table Co-Authored-By: Mastra Code <noreply@mastra.ai>
Co-Authored-By: Mastra Code <noreply@mastra.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 9faa949 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis PR fixes incorrect input/output labeling in the experiment results UI. The Input section was previously displaying output data; this change properly distinguishes input and output in the detail panel and adds an Input column to the results table, visible when no featured result is selected. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/playground-ui/src/domains/experiments/components/experiment-results-list-and-details.tsx (1)
86-87: Consider consolidating the two!featuredResultIdspreadsBoth lines evaluate the same condition. They can be merged into a single spread for clarity.
♻️ Proposed refactor
- ...(!featuredResultId ? [{ name: 'input', label: 'Input', size: '1fr' }] : []), - ...(!featuredResultId ? [{ name: 'output', label: 'Output', size: '1fr' }] : []), + ...(!featuredResultId + ? [ + { name: 'input', label: 'Input', size: '1fr' }, + { name: 'output', label: 'Output', size: '1fr' }, + ] + : []),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/playground-ui/src/domains/experiments/components/experiment-results-list-and-details.tsx` around lines 86 - 87, In experiment-results-list-and-details.tsx the two array spreads that both check !featuredResultId (the lines spreading [{ name: 'input', ... }] and [{ name: 'output', ... }]) should be consolidated into a single spread guarded by !featuredResultId; replace the two separate spreads with one spread that inserts both objects (input and output) when featuredResultId is falsy to improve clarity and avoid duplicated condition checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.changeset/fix-experiment-result-input-output.md:
- Line 5: Update the changeset description to use the past-tense allowed verb
"Fixed" instead of the imperative "Fix" in the summary text ("Fix experiment
result detail panel showing output data under \"Input\" label..."); edit the
changeset content so the first word is "Fixed" and keep the rest of the message
unchanged to comply with the allowed verbs guideline.
---
Nitpick comments:
In
`@packages/playground-ui/src/domains/experiments/components/experiment-results-list-and-details.tsx`:
- Around line 86-87: In experiment-results-list-and-details.tsx the two array
spreads that both check !featuredResultId (the lines spreading [{ name: 'input',
... }] and [{ name: 'output', ... }]) should be consolidated into a single
spread guarded by !featuredResultId; replace the two separate spreads with one
spread that inserts both objects (input and output) when featuredResultId is
falsy to improve clarity and avoid duplicated condition checks.
| "@mastra/playground-ui": patch | ||
| --- | ||
|
|
||
| Fix experiment result detail panel showing output data under "Input" label, add missing Output section, and add Input column to experiment results list table. |
There was a problem hiding this comment.
Use "Fixed" instead of "Fix" (guideline violation — potential_issue)
The changeset description must use a past-tense action verb from the allowed list (Added, Fixed, Improved, Deprecated, Removed). Fix is imperative and not in the list.
✏️ Proposed fix
-Fix experiment result detail panel showing output data under "Input" label, add missing Output section, and add Input column to experiment results list table.
+Fixed experiment result detail panel incorrectly displaying output data under the "Input" label. Now correctly shows input and output data in separate labelled sections, and added an Input column to the results list table.As per coding guidelines: "Use action-oriented verbs (Added, Fixed, Improved, Deprecated, Removed)".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.changeset/fix-experiment-result-input-output.md at line 5, Update the
changeset description to use the past-tense allowed verb "Fixed" instead of the
imperative "Fix" in the summary text ("Fix experiment result detail panel
showing output data under \"Input\" label..."); edit the changeset content so
the first word is "Fixed" and keep the rest of the message unchanged to comply
with the allowed verbs guideline.
The experiment result detail panel was showing
result.outputunder the "Input" label, and the actual output wasn't shown at all. The results list table was also missing an Input column.Before: detail panel shows output as input, no output section, list table has no input column.
After: detail panel correctly shows
result.inputas Input andresult.outputas Output, list table includes both Input and Output columns.before: incorrect input shown
before: missing input field

after


Summary by CodeRabbit
Bug Fixes
New Features