Repository navigation
fix(calendar): recover from fetch errors promptly, track errors per calendar - #4342
Conversation
…alendar A single transient network error replaced the whole calendar with "No internet connection", and the message could linger after recovery because an unchanged events checksum skipped the redraw. - Track errors per calendar URL; clear and redraw on a successful fetch - Include url in CALENDAR_ERROR notifications - Add keepEventsOnError option (default false) to keep showing the last known events when a later fetch fails Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the PR! Speaks something against enabling this behavior permanently and omit the new opt-in option? |
|
Considered that, but it means that the error isn't visible from the screen unless all calendars have failed from the start. Some people might prefer to see an error so they can fix it. Some visual cue that the shown events are stale might be an alternative. |
|
Good point. What do you think of using a small grace period instead of a new config option - e.g. keeping existing events for the first 2 or 3 consecutive fetch failures and only showing the error if it persists? That would handle transient glitches by default while still surfacing permanent errors. |
|
@KristjanESPERANTO Are you still open to work on this? 🙂 |
|
Yes, just AFK due to travel for work and holidays. I'll take another look at this. |
Network and server errors are retried with backoff by the HTTP fetcher. Only report them to the front end once retries are used up; auth, rate-limit, client and parse errors are still reported immediately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When one calendar keeps failing, keep showing the events of the others. Events of the failing calendar get the `stale` class and a warning icon (`stale-icon`), and a `stale-note` row names the calendar and the error. The full module error is only shown when there are no events to display or the error can't be attributed to a calendar. Removes the `keepEventsOnError` option, which this makes unnecessary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…notes The malformed-url and missing-fetcher errors were sent without the module id, so the front end dropped them and the calendar stayed on "Loading…". Send the id (and the url where there is one, so the error can clear). Several unnamed calendars on the same host failing the same way (e.g. two Outlook feeds during an outage) now produce one note instead of identical duplicates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KristjanESPERANTO
left a comment
There was a problem hiding this comment.
Thanks! This looks good to me. This really makes the calendar module more robust 🚀🙂
4c03328
into
MagicMirrorOrg:develop


Sporadic "No internet connection." messages blanked the whole calendar after a single transient fetch error, even when other calendars were fine and cached events existed. The message could also linger after the connection came back.
Following the review discussion, this no longer adds an option. Instead:
staleclass and a warning icon (stale-icon), and astale-noterow names the calendar (itsname, or else the hostname) and the error, e.g.Work: No internet connection.Default styling is incalendar.cssand can be overridden incustom.css.CalendarFetcher#isTransientError, and the node_helper error notifications.No related issue.
🤖 Generated with Claude Code