[feat][UX/UI] Hide mapping and preview until a test set is selected#4692
[feat][UX/UI] Hide mapping and preview until a test set is selected#4692NamHT4Devlop wants to merge 1 commit into
Conversation
…cted Steps 2–4 (DataPreviewEditor, MappingSection, PreviewSection) are now conditionally rendered: they only appear once the user has either chosen an existing test set revision (selectedRevisionId is set) or toggled the 'create new test set' flow (isNewTestset is true). Before this change the three sections were always visible, which was confusing because they showed controls that had no effect until a test set was selected. Closes Agenta-AI#4616
|
@NamHT4Devlop is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
|
✅ Thanks @NamHT4Devlop! This PR now meets the contribution requirements and has been reopened. A maintainer will review it soon. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Disabled knowledge base sources:
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesConditional rendering of drawer content steps
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes ✨ 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 |
Summary
Closes #4616
Steps 2–4 of the Add to test set drawer (
DataPreviewEditor,MappingSection,PreviewSection) are now hidden until the user either:selectedRevisionIdis truthy), orisNewTestset === true).Before this change all three sections rendered immediately on drawer open, showing mapping controls that had no effect until a test set was chosen — which was confusing.
Changes
web/oss/src/components/SharedDrawers/AddToTestsetDrawer/TestsetDrawer.tsxWrapped the three lower sections in a single conditional:
Demo
Before — Steps 2–4 (data preview, column mapping, row preview) are always visible even with no test set selected, showing empty/unusable controls:
After — Only Step 1 (test set selector) is shown initially. Steps 2–4 appear only once a test set revision is selected or a new test set is being created:
How to test
TestsetSelector(step 1) is visible initially.Type checks
pnpm run types:checkinweb/oss/— no new errors introduced (all pre-existing).