Repository navigation
fix(web): stop custom domain dialog bouncing to success and stacking close timers - #2947
Merged
richiemcilroy merged 1 commit intoOct 23, 2026
Conversation
…close timers Clicking a completed step after verification re-ran the auto-advance effect and jumped back to success. The 8s auto-close had no cleanup and depended on the inline onClose, so every bounce or parent re-render scheduled another close that also survived unmount.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the custom domain dialog (org settings), once a domain is verified:
handleClose, and those timers keep firing after the dialog unmounts.Root cause
A single effect handled both auto-advance and auto-close, with deps
[isVerified, stepState.currentIndex, handleClose, handleNext]:isVerifiedtrue, any step change that wasn't the success step calledhandleNext(). A stepper click (GO_TO_STEP) changedcurrentIndex, so the effect walked the user back to success.setTimeouthad no cleanup.handleClosedepends ononClose, whichCustomDomain.tsxpasses inline, so every parent re-render re-ran the effect and added another timer.Fix
Split into two effects:
isVerifiedchanges (GO_TO_STEP2), so stepper navigation no longer re-triggers it.currentIndex, reads the latesthandleClosethrough a ref, and clears its timer on cleanup. There's one timer per visit to the success step, and it doesn't restart on parent re-renders.The new hooks sit above the
if (!currentStep) return nullearly return, which also clears Biome'suseHookAtTopLevelwarning that the old effect had.How to reproduce
Tests
Two standalone repros, each rendering the real component with its boundary imports stubbed:
{"afterClickDomain":"success","timersAfter":2}, after{"afterClickDomain":"domain","timersAfter":1}.{"afterRerenders":4,"afterUnmount":4}, after{"afterRerenders":1,"afterUnmount":0}.Checks run locally:
next buildneeds the app's environment and services)

Confidence Score: 5/5
This PR appears safe to merge.Summary
Separates verified-domain navigation from the dialog’s eight-second close timer.
Reviews (1) · Last reviewed commit: "fix(web): stop custom domain dialog boun..." · Reviewed by Greptile