Repository navigation
feat: add an authenticated preference version endpoint - #666
Merged
Merged
Conversation
Collaborator
Author
|
This requires WITCodingClub/calendar-extension#186 and WITCodingClub/calendar-extension#180 to be merged |
gonna be so real when I say I didn't do this one lol
Collaborator
Author
|
and obviously WITCodingClub/calendar-extension#187 |
Cattn
added a commit
to WITCodingClub/calendar-extension
that referenced
this pull request
Oct 7, 2026
this allows for better caching, smarter event replacing & more! A backend PR accompanies this. WITCodingClub/calendar-backend#666
jaspermayone
reviewed
Oct 8, 2026
Cattn
added a commit
to WITCodingClub/calendar-extension
that referenced
this pull request
Oct 8, 2026
this allows for better caching, smarter event replacing & more! A backend PR accompanies this. WITCodingClub/calendar-backend#666
Cattn
added a commit
to WITCodingClub/calendar-extension
that referenced
this pull request
Oct 8, 2026
* add versioning to preferences this allows for better caching, smarter event replacing & more! A backend PR accompanies this. WITCodingClub/calendar-backend#666 * Fix error handling in preferences loading Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Logan <thecrazykid2121@gmail.com> * use new field for prefs also update the tests for it --------- Signed-off-by: Logan <thecrazykid2121@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@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.
Adds GET /api/user/preferences/version so the extension can check for changes every five minutes and reuse cached preferences when the version is unchanged.
This builds on the batch preference endpoint added in calendar-backend#590 and the batching and session caching introduced in calendar-extension#136. The version endpoint supplies the freshness signal the companion extension change needs to reuse those complete batch responses when opening an event editor and reload them after preferences change.
The endpoint returns an opaque SHA-256 token covering the signed-in user's event and shared calendar preferences, default lecture/lab colors, notification suppression, and resolver defaults. It detects deletions and bulk edits without relying on timestamps. Other users' changes and display-only settings do not affect the token.
The route uses existing revocable-session authentication and private, no-store responses. It reads preference projections without rendering meeting templates or triggering imports/provider sync. Database work still grows with the user's preference rows. No schema migration is required.
Schedule/catalog changes retain their existing refresh paths.
Validation
Rollout
Merge and deploy this endpoint before the frontend's cached preference reuse becomes active. Until it is available, the frontend keeps existing per-event reads.
Related issues