-
Notifications
You must be signed in to change notification settings - Fork 3
Request substitution confirmation pop-up #596
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for tts-fe-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Pull request overview
This PR implements a request substitution confirmation flow that detects duplicate exchange requests and allows users to replace existing requests with new ones. When the backend returns a duplicate error, the form displays a warning message and changes the submit button to explicitly indicate that submitting will cancel the previous request.
Key Changes:
- Added duplicate request detection and handling with
hasDuplicatestate flag - Modified submission flow to include a
replaceparameter when resubmitting after duplicate detection - Updated UI to show appropriate warnings and button text when duplicates are detected
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| PreviewRequestForm.tsx | Added duplicate detection logic, state management for hasDuplicate, and conditional alert display for duplicate warnings |
| ExchangeSubmissionConfirmation.tsx | Updated submit button to show context-specific text and icon based on whether a duplicate exists, added hasDuplicate prop |
| exchangeRequestService.ts | Added replace parameter to submitExchangeRequest function and included it in FormData when true |
| .env.example | Removed placeholder character from APP_SENTRY_AUTH_TOKEN |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Closes #515. Modifies
PreviewRequestFormto, when receiving a duplicate request, allow the user to retry submitting the request by asking the server to replace the old one. The currently implemented flow is the following:replace: trueSee also this PR for the backend.
Important
When testing this branch, don't forget to also checkout the backend to the branch
feature/confirmation-popupRequest form when a duplicate is detected
Changes Made
PreviewRequestFormto show new view when receives aduplicate-requesterror from the serverreplace: true