Repository navigation
Displayed an error message when the export modal PDF or ICS download fails - #1847
Merged
david-yz-liu merged 3 commits intoDec 2, 2026
Merged
david-yz-liu merged 3 commits into
david-yz-liu merged 3 commits into
Conversation
…fails The error callbacks in getPDF and getCalendar threw inside a jQuery callback, so a failed download gave the user no feedback. They now set a download error that the export modal shows under the download links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 46304962838Coverage increased (+0.7%) to 63.047%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
david-yz-liu
approved these changes
Dec 2, 2026
david-yz-liu
left a comment
Contributor
There was a problem hiding this comment.
Nice work, @danielrafailov!
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.
Proposed Changes
Follow-up to #1841, as requested there. When the PDF or ICS download in the Export modal fails, the user gets no feedback. The
errorcallbacks ingetPDFandgetCalendaronlythrow "No pdf generated"/throw "No calendar avaiable". That throw happens inside a jQuery callback, so nothing catches it: the error only shows up in the browser console, and clicking the link appears to do nothing.Changes:
export.tsx:ExportModalnow tracks apdfErrorand acalendarErrorstate, separate from each other and from the imageerroradded in Displayed an error message when the export modal image fails to load #1841. If the/timetable-pdfor/calendarrequest fails, it sets a message ("The PDF could not be generated. Please try again." or "The calendar file could not be generated. Please try again."), and thethrowis removed. A successful download clears only that download's message, and reopening the modal clears both.getPDFandgetCalendarnow take a callback for setting their error, so the download links call them through an arrow function (onClick={() => getPDF(setPdfError)}).ImageErrorcomponent toExportError, since it now shows both kinds of error.app.scss: renamed the.export-image-errorclass to.export-errorto match. The style itself is unchanged.ExportModal.test.jschecking that:Screenshots of your changes (if applicable)
Export modal (Graph), failed PDF download, before the change:






Export modal (Graph), failed PDF download, after the change:
Export modal (Grid), failed ICS download, before the change:
Export modal (Grid), failed ICS download, after the change:
Export modal (Grid), failed PDF download, after the change:
Export modal (Grid), image and both downloads failing, after the change:
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
/timetable-pdfand/calendarrequests in Chrome DevTools (Network → right-click the request → Block request URL).GraphImageandGridImagenow render the whole contents of the export modal (header, download links, error messages, preview and the Switch Sessions button), not just the image. I left them alone to keep this PR focused, but I can rename them (e.g. toGraphExportContentandGridExportContent) in a follow-up if you'd like.