sadpandajoe commented on code in PR #43340:
URL: https://github.com/apache/superset/pull/43340#discussion_r3867511990


##########
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx:
##########
@@ -83,9 +92,27 @@ export const useDownloadMenuItems = (
     canExportImage,
   } = props;
 
-  const { addDangerToast, addSuccessToast } = useToasts();
+  const { addDangerToast, addSuccessToast, addInfoToast } = useToasts();
   const dataMask = useSelector((state: RootState) => state.dataMask);
-  const SCREENSHOT_NODE_SELECTOR = ".dashboard";
+  const user = useSelector((state: RootState) => state.user);
+  // Guests and anonymous sessions have no userId; sessions the backend
+  // cannot email get neutral copy and a poll window outliving the task budget.
+  const isGuestSession = !user?.userId;
+  const canReceiveEmail = Boolean(user?.userId && user?.email);

Review Comment:
   Having an email address does not guarantee delivery: SMTP is optional and 
send failures are swallowed, while this path stops polling after five minutes 
even though the task can run longer. Could the browser keep polling through the 
task budget (or otherwise retain a fallback) so a successful export is not lost 
when email is unavailable?



-- 
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