Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): prevent incorrect update notifications #335

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented Jan 12, 2025

Description

This PR enhances the version check system to prevent incorrect update notifications and adds better caching prevention. Previously, users could sometimes see update notifications for older versions due to (suspected) caching issues and imprecise version comparison.

Details

  • Add isNewerVersion helper to properly compare semver versions
  • Add cache-busting query parameter and headers to version check request
  • Only show update notification when deployed version is newer than current version
  • Add detailed logging to help diagnose version comparison issues
  • Improve error handling for failed version checks

- Add cache-busting and no-cache headers to `version.json` fetch
- Add detailed logging for version mismatches
- Improve error handling in version check
- Add `isNewerVersion` helper to properly compare semver versions
- Only show update toast when deployed version is newer
- Update logging message to be more accurate
- Handle versions with or without 'v' prefix
Copy link

vercel bot commented Jan 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reti ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 12, 2025 3:40am

@drichar drichar requested a review from pbennett January 12, 2025 03:43
@drichar drichar merged commit 1e9120f into dev Jan 12, 2025
4 checks passed
@drichar drichar deleted the fix/ui-check-for-updates-caching branch January 12, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants