fix: validate dataset name and columns before submission#122
fix: validate dataset name and columns before submission#122balasiddarthan22 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds pre-flight validation to the dataset creation flow. When a user clicks "Confirm" to create a dataset, the 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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 |
simantak-dabhade
left a comment
There was a problem hiding this comment.
Thanks for the PR. The client-side validation is a good UX improvement and these checks make sense.
One small extra thing you could fix while you’re here: the validation uses datasetName.trim(), but the mutation still sends the original datasetName, so a name with leading/trailing whitespace would be saved as-is. It would be cleaner to compute a trimmed name once and send that through.
Also, GitHub is showing this PR has a merge conflict / is dirty against main. Could you rebase or otherwise resolve that conflict?
Submitting with an empty name or zero columns reached the backend and returned a cryptic 'Invalid request' error. Now caught on the client with a clear message before the API call is made.
a82709d to
e135f7b
Compare
|
Thanks for the feedback! I've updated the PR to compute trimmedDatasetName = datasetName.trim() once at the top and send that through to the mutation instead of the raw value. I've also rebased onto main to clear the merge conflict. |
Submitting with an empty name or zero columns reached the backend and returned a cryptic 'Invalid request' error. Now caught on the client with a clear message before the API call is made.