-
-
Notifications
You must be signed in to change notification settings - Fork 959
fix(webapp): cancel button in API key regeneration modal #2878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…the modal The Cancel button was missing an onClick handler to close the modal dialog. This caused confusing behavior where clicking Cancel would not dismiss the dialog. Also added type="button" to prevent form submission since the button is inside a form. Slack thread: https://triggerdotdev.slack.com/archives/C04CR1HUWBV/p1768323370953509
|
WalkthroughThe Cancel button in RegenerateApiKeyModalContent was updated to explicitly prevent form submission. The button now includes the Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 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
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (7)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{packages/core,apps/webapp}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/app/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
apps/webapp/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
**/*.{js,ts,jsx,tsx,json,md,css,scss}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (1)apps/webapp/app/components/environments/RegenerateApiKeyModal.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
🔇 Additional comments (1)
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 |
PR Review: fix(webapp): cancel button in API key regeneration modalSummaryThis PR fixes the Cancel button in the API key regeneration modal by adding the missing Code Quality ✅The fix is correct and functional. Adding Style Suggestion (Optional)Looking at similar patterns in the codebase, many cancel buttons inside dialogs use // Current approach (functional)
<Button variant={"tertiary/medium"} type="button" onClick={closeModal}>
Cancel
</Button>
// Alternative pattern used elsewhere in the codebase
import { DialogClose } from "@radix-ui/react-dialog";
<DialogClose asChild>
<Button variant={"tertiary/medium"}>Cancel</Button>
</DialogClose>Examples using
Using Potential Issues ❓None identified. The fix is straightforward and low-risk. Security Concerns 🔒None. This is a UI-only change with no security implications. Test CoverageThis is a small UI fix to a modal component. Manual testing should be sufficient - no additional automated tests are needed. VerdictApprove ✅ - The fix is correct, addresses the reported issue, and follows patterns used elsewhere in the codebase. |
0ski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The Cancel button was missing an onClick handler to close the modal dialog. This caused confusing behavior where clicking Cancel would not dismiss the dialog. Also added type="button" to prevent form submission since the button is inside a form.