feat: add frontend version checking for outdated clients#2727
feat: add frontend version checking for outdated clients#2727
Conversation
Introduce `FrontendVersion` middleware to backend to attach the current frontend version hash in the HTTP response headers. This allows the client to detect if the frontend version is outdated. Create a new `FrontendOutdatedDialog` Vue component that watches for changes in the frontend version and prompts users to reload if they are running an outdated version. Integrate this component into the main application layout. Update the `Api` service to set up an Axios interceptor to read the 'X-Frontend-Version' header from responses and store it in the settings store, triggering the version check logic. Enhance user experience by ensuring they always use the latest client features and bug fixes.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2727 +/- ##
=============================================
- Coverage 96.74% 96.71% -0.04%
- Complexity 1823 1825 +2
=============================================
Files 439 441 +2
Lines 12478 12509 +31
Branches 2080 2083 +3
=============================================
+ Hits 12072 12098 +26
- Misses 406 411 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PILOS
|
||||||||||||||||||||||||||||
| Project |
PILOS
|
| Branch Review |
handle-frontend-outdated
|
| Run status |
|
| Run duration | 07m 47s |
| Commit |
|
| Committer | Samuel Weirich |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
610
|
| View all changes introduced in this branch ↗︎ | |
Introduce
FrontendVersionmiddleware to backend to attach the current frontend version hash in the HTTP response headers. This allows the client to detect if the frontend version is outdated.Create a new
FrontendOutdatedDialogVue component that watches for changes in the frontend version and prompts users to reload if they are running an outdated version. Integrate this component into the main application layout.Update the
Apiservice to set up an Axios interceptor to read the 'X-Frontend-Version' header from responses and store it in the settings store, triggering the version check logic.Enhance user experience by ensuring they always use the latest client features and bug fixes.
Fixes #
Type
Checklist
Changes
Other information