codeant-ai-for-open-source[bot] commented on code in PR #44154: URL: https://github.com/apache/superset/pull/44154#discussion_r3984864442
########## superset-frontend/src/utils/downloadAsPdf.ts: ########## @@ -43,22 +42,27 @@ const generateFileStem = (description: string, date = new Date()) => * @param description name or a short description of what is being printed. * Value will be normalized, and a date as well as a file extension will be added. * @param isExactSelector if false, searches for the closest ancestor that matches selector. + * @param addWarningToast bound via `useToasts()`/`bindActionCreators`, not the raw + * action creator from `actions.ts`: this module has no dispatch of its own, so an + * unbound creator would only build a Redux action object and never render a toast. * @returns event handler */ export default function downloadAsPdf( selector: string, description: string, isExactSelector = false, + addWarningToast?: (message: string) => void, Review Comment: **Suggestion:** The new callback is never used when `domToPdf` rejects; PDF capture failures are only logged, so callers still receive no warning toast. [incomplete implementation] **Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` [](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=ef302d03b19b4e988d31a6a34e33d823&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=ef302d03b19b4e988d31a6a34e33d823&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) <details> <summary><b>Prompt for AI Agent ๐ค </b></summary> ```mdx This is a comment left during a code review. **Path:** superset-frontend/src/utils/downloadAsPdf.ts **Line:** 54:54 **Comment:** *Incomplete Implementation: The new callback is never used when `domToPdf` rejects; PDF capture failures are only logged, so callers still receive no warning toast. Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise. Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix ``` </details> <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44154&comment_hash=0379679b360a94676f1aaea3d12dcbc1a99c1c4894cb9b3658a3466540430632&reaction=like'>๐</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44154&comment_hash=0379679b360a94676f1aaea3d12dcbc1a99c1c4894cb9b3658a3466540430632&reaction=dislike'>๐</a> -- 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]
