-
Notifications
You must be signed in to change notification settings - Fork 185
fix:sync domain verification status after retry #2153
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
fix:sync domain verification status after retry #2153
Conversation
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 fixes the issue where domain verification status wasn't updating in the UI after a successful retry. The fix ensures that when domain verification succeeds through the retry modal, the parent page immediately refreshes its data to reflect the updated verification status.
Key Changes
- Added event dispatcher to the retry modal component to emit a 'verified' event upon successful verification
- Implemented data reload functionality in the parent page that listens for the verification event
- Used SvelteKit's
invalidateAll()
to refresh the domain data without requiring a manual page reload
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
retryDomainModal.svelte | Added event dispatcher to emit 'verified' event when domain verification succeeds |
+page.svelte | Added event handler and data reload function to refresh domain status after successful verification |
Comments suppressed due to low confidence (1)
src/routes/(console)/organization-[organization]/domains/domain-[domain]/+page.svelte:39
- [nitpick] The function name 'reloadDomainData' could be more specific. Consider renaming it to 'handleDomainVerified' or 'onDomainVerified' to better reflect that it's an event handler for domain verification.
async function reloadDomainData() {
@@ -35,6 +36,10 @@ | |||
let showImportModal = false; | |||
let selectedPreset = ''; | |||
|
|||
async function reloadDomainData() { | |||
await invalidateAll(); |
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.
whoa no. this is a very heavy and expensive operation.
await Promise.all([invalidate(Dependencies.DOMAIN), invalidate(Dependencies.DOMAINS)]); | ||
} |
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.
isn't this already done on the RetryDomainModal
? What difference does this make moving up a layer via callback?
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.
The modal does refresh data, but the parent page isn’t aware of it. Sending an event ensures the parent updates its UI instantly after verification
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.
Invalidating a dependency invalidates the data fetch from page.ts
and then to page.svelte
.
Can you instead verify and see if the domain verification variable is updated correctly?
Stale PR, Darshan fixed in anoher one, already merged. Closing |
What does this PR do?
This PR ensures the domain verification status label in the UI updates immediately after a successful verification retry.
It dispatches a custom event from the retry modal and triggers a data refresh in the parent page, keeping the UI and backend state in sync without requiring a manual page reload.
Test Plan
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
yes