mikebridge commented on code in PR #45649:
URL: https://github.com/apache/superset/pull/45649#discussion_r4383646096


##########
superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx:
##########
@@ -271,6 +304,8 @@ export default function SemanticLayerModal({
 
   useEffect(
     () => () => {
+      typeRequestRef.current += 1;

Review Comment:
   Thanks. Closing the mounted dialog now explicitly invalidates the pending 
type and schema requests, so a late failure can't show a toast with no dialog 
open.
   
   I added the tests you described: close while each request is pending, let it 
fail before any reopen, and assert no danger toast. The existing effect cleanup 
already covered this path, so they passed on the old head; removing that 
protection as a mutation check makes both fail. All 69 modal tests pass.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to