fix(web): suppress load-error UI during session expiry - #2738
Merged
Conversation
Session recovery already shows the signed-out toast; hide redundant Couldn't load events/calendars Retry overlays for the same 401/410. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Hide the false empty-list copy when calendars fail for 401/410, so session recovery remains the only story. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
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
When a session expires, the API interceptor already signs the user out and shows the global You've been signed out toast. Event/calendar queries still landed in
isError, so the UI also showed Couldn't load… + Retry — two conflicting CTAs.Session recovery now owns that story: contextual load-error UI only appears for non-session failures. CalendarList stays quiet on 401/410 instead of inventing an empty-list message.
Simplicity
Shared
shouldShowContextualLoadError/isSessionLevelErrorhelpers; callers stay thin. Review follow-up removed a weak presentational EventGrid test that did not exercise Day/Week wiring.Automated validation
Independent review
Fresh diff-first review: ship-with-nits. Confirmed important finding fixed — CalendarList no longer falls through to “Connect Google…” / “No calendars yet.” after session-level load failure. Residual: Day/Week session suppress is util-tested but not integration-tested; pre-existing 410 toast copy differs from 401.
Test plan
bun test:webonapi.util.test.ts,event.util.test.ts,EventGrid.test.tsx,CalendarList.test.tsx— passbun lint— pass for this change