Skip to content

fix(frontend): wire testset connection into workflow drawer playground#4450

Open
ardaerzin wants to merge 1 commit into
mainfrom
fe-fix/drawer-playground-testset-connection
Open

fix(frontend): wire testset connection into workflow drawer playground#4450
ardaerzin wants to merge 1 commit into
mainfrom
fe-fix/drawer-playground-testset-connection

Conversation

@ardaerzin
Copy link
Copy Markdown
Contributor

Summary

The workflow entity create/edit drawer playground had no UI affordance to connect an existing testset — users could only edit local testcases. The full-page playground has <TestsetDropdown /> in PlaygroundHeader, and the evaluator drawer mounts it via EvaluatorPlaygroundHeader, but DrawerAppPlayground renders PlaygroundMainView directly with no surrounding header, leaving nowhere to place it.

ExecutionHeader (the "Generations" header on the right panel) already exposes a renderTestsetActions render-slot, but OSS MainLayout never forwarded it through to ExecutionItems, so the slot was dead code from the OSS side.

This change:

  • Adds renderTestsetActions?: PlaygroundGenerationsProps["renderTestsetActions"] to MainLayoutProps and forwards it to <ExecutionItems> in the single-view render path.
  • In DrawerAppPlayground, passes renderTestsetActions={() => <TestsetDropdown />} so the dropdown appears next to Clear / Run all in the drawer's Generations header.
  • Leaves the full-page Playground.tsx and DrawerEvaluatorPlayground untouched — both already mount TestsetDropdown via their own headers, so there is no duplication.

Testing

Verified locally

  • pnpm lint-fix from web/ — clean (no ESLint warnings or errors across all packages).
  • Reviewed the existing wiring of renderTestsetActions in ExecutionItems and ExecutionHeader to confirm the slot is already plumbed end-to-end on the package side; the OSS edit only adds the missing forward.

Added or updated tests

N/A — the change is a passthrough prop wire plus a one-line slot fill. No new logic to cover, and the package-level renderTestsetActions plumbing already exists.

QA follow-up

  • Open the workflow entity create drawer (e.g. from /apps "+ New app" or "+ New evaluator" → workflow type that uses the drawer playground).
  • Expand the drawer to surface the Generations panel.
  • Confirm the testset dropdown appears between Clear and Run all in the Generations header.
  • Connect an existing testset → verify rows seed from the testset and the connected-source name shows.
  • Disconnect / switch testset → verify state resets correctly.
  • Verify the full-page playground is unchanged (testset dropdown still in the top PlaygroundHeader, no duplicate in the Generations header).
  • Verify the evaluator drawer (DrawerEvaluatorPlayground) is unchanged — its testset dropdown still appears in EvaluatorPlaygroundHeader once an app is connected.

Demo

Screenshot / GIF to be added before merge — drawer Generations header now shows the testset dropdown next to Clear / Run all.

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Contributor Resources

The workflow entity create/edit drawer playground had no affordance to
connect an existing testset — only local testcases could be edited.
ExecutionHeader already exposes a renderTestsetActions slot, but OSS
MainLayout never forwarded it, so the drawer (which mounts MainLayout
directly with no surrounding header) had no place to surface it.

Forward renderTestsetActions through MainLayout → ExecutionItems →
ExecutionHeader, and fill the slot in DrawerAppPlayground with the
existing TestsetDropdown. Full-page playground is unchanged — its
TestsetDropdown still lives in PlaygroundHeader, so there is no
duplication.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment May 26, 2026 7:18pm

Request Review

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. Frontend UI labels May 26, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f9ef5cb-c4d4-44f9-b9e1-b9cbcba199a5

📥 Commits

Reviewing files that changed from the base of the PR and between 3c9b1db and 23a9a7c.

📒 Files selected for processing (2)
  • web/oss/src/components/Playground/Components/MainLayout/index.tsx
  • web/oss/src/components/WorkflowRevisionDrawerWrapper/index.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added testset management and selection controls to the playground interface. Users can now access and manage testsets directly within the workflow revision drawer, streamlining the testing workflow.

Walkthrough

PlaygroundMainView imports PlaygroundGenerationsProps type and adds an optional renderTestsetActions prop to its contract, then forwards it to ExecutionItems. WorkflowRevisionDrawerWrapper implements this callback using a client-only TestsetDropdown and wires it into PlaygroundMainView.

Changes

Testset Actions Prop Forwarding

Layer / File(s) Summary
PlaygroundMainView prop contract
web/oss/src/components/Playground/Components/MainLayout/index.tsx
Imports PlaygroundGenerationsProps type, adds optional renderTestsetActions prop to MainLayoutProps, destructures it in the component, and passes it to ExecutionItems instances.
WorkflowRevisionDrawerWrapper testset actions
web/oss/src/components/WorkflowRevisionDrawerWrapper/index.tsx
Dynamically imports TestsetDropdown with ssr: false, creates a memoized renderTestsetActions callback that renders the dropdown, and wires it into PlaygroundMainView.

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(frontend): wire testset connection into workflow drawer playground' accurately and specifically describes the main change: enabling testset connection in the drawer playground via prop forwarding.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the problem, solution, testing approach, and QA steps for wiring testset actions into the workflow drawer playground.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fe-fix/drawer-playground-testset-connection

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:S This PR changes 10-29 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant