fix(ui): stop browsers running the previous release's app.js after an upgrade - #367
Conversation
The dashboard's stylesheet and scripts were referenced by bare path and served with an ETag but no Cache-Control, so browsers applied heuristic freshness and reused a day-old app.js for hours after an upgrade. After v1.36.8 a tab that had loaded the dashboard the day before still ran the old script, and the bug that release fixed looked unfixed until a hard refresh. Each of our own assets now carries ?v=<release> in its URL, so every release is a new URL and the old cache entry is never consulted.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: GeiserX/CashPilot/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe base template now appends the running application version to its CSS and JavaScript asset URLs. New tests verify versioned references and reject unversioned asset paths. ChangesStatic asset cache versioning
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #367 +/- ##
==========================================
+ Coverage 95.74% 95.76% +0.01%
==========================================
Files 51 51
Lines 7337 7337
==========================================
+ Hits 7025 7026 +1
+ Misses 312 311 -1 🚀 New features to boost your workflow:
|
After the v1.36.8 upgrade, a tab that had loaded the dashboard the day before kept running the old app.js, so the Logs button looked as broken as ever until a hard refresh. Our own scripts and stylesheet are referenced by bare path and served with no Cache-Control, so the browser reuses them under heuristic freshness for hours.
Each of our own assets now carries
?v=<release>in its URL. A new release is a new URL, and the stale cache entry is never consulted.Summary by CodeRabbit
Bug Fixes
Tests