fix(calendar): skip malformed ical events - #1870
Open
keilogic wants to merge 2 commits into
Open
Conversation
castaway
requested changes
Jun 15, 2026
| dav_events['test/broken'] = { | ||
| calendar: 'test', | ||
| id: 'test/broken', | ||
| ical: 'BEGIN:VCALENDAR\nBEGIN:VEVENT\nDESCRIPTION;ALTREP\nDTSTART:20210425T090000\nDTEND:20210425T100000\nSUMMARY:Broken\nEND:VEVENT\nEND:VCALENDAR\n' |
Contributor
There was a problem hiding this comment.
Could you put the "broken" ical value not all on one long line (newlines are fine), and document what exactly is "broken" in the test data?
Contributor
There was a problem hiding this comment.
hi @keilogic could you respond to the requested changes?
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.
Summary
Closes #1484.
This makes calendar event loading tolerant of malformed iCalendar data. If one stored event fails while parsing or generating display occurrences, the service now reports that event through the existing
errorLogpath and keeps loading the remaining valid events.The first commit adds the regression test by itself so it can be cherry-picked separately. The second commit contains the implementation.
Tests
npx ng test --watch=false --browsers=FirefoxHeadless --include=src/app/calendar-app/calendar.service.spec.ts- 10 SUCCESSnpx tsc -p tsconfig.json --noEmitgit diff --checknode src/build/pre-build.jsnpx ng build runbox7 --configuration production --base-href /app/node src/build/post-build.jsnpx ng test --watch=false --browsers=FirefoxHeadless- 246 SUCCESS, 2 skippednpm run lint- exits 0 with the repository's existing warning baselinenpm run policy- exits 0; it still prints existing historical commit-message warnings outside this branchNote: the build pre-step regenerated
src/app/changelog/changes.ts, but I did not include that generated file so this PR stays scoped to the calendar fix.AI Disclosure
I used OpenAI Codex while working on this PR. Codex assisted with editing
src/app/calendar-app/calendar.service.tsandsrc/app/calendar-app/calendar.service.spec.ts; I reviewed the diff and ran the validation commands above locally.