Conversation
|
🎉 This PR is included in version 1.25.1-fix-cache-busting-http-calls.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The cache-busting interceptor must also cover the separate Axios client used by useInitialize.ts.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Adds cache-busting query parameters to processor HTTP requests to prevent stale responses.
Changes:
- Adds unique timestamp/random query parameters to the middleware’s Axios requests.
- Leaves WebSocket connections unchanged.
| File | Summary |
|---|---|
src/lib/store/middleware/websocketMiddleware.ts |
Adds cache busting to this Axios client, but the separate /version client remains uncovered. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Add a random query parameter to every request to bust processor/browser caches | ||
| httpClient.interceptors.request.use((config) => { | ||
| config.params = { | ||
| ...config.params, | ||
| _: Date.now().toString(36) + Math.random().toString(36).slice(2), | ||
| }; | ||
| return config; | ||
| }); |
Only append the unique query param when the app URL carries the 'cb' param that Essentials adds for ForceAppRefresh touchpanels (DGE/CH5). Navigators and normal browsers see no 'cb' param, so the interceptor is a no-op and their request/caching behavior is unchanged.
|
🎉 This PR is included in version 1.25.1-fix-cache-busting-http-calls.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
A /system/roomCombinationChanged broadcast triggered window.location.reload(), which reloaded the panel's current deep route (e.g. /mc/app/tech). On DGE panels with forceAppRefresh this strands the app showing a blank screen until the program is restarted. Reload to the app base URL instead so routing re-runs cleanly like a fresh app push. The current query string (token / cache buster) is preserved.
|
🎉 This PR is included in version 1.25.1-fix-cache-busting-http-calls.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |

Brings the cache-busting fix (
58c2244, released as prereleasev1.24.1-cache-busting.1) ontomain(currentlyv1.25.0).Why
Newer Crestron CH5 runtimes (1.3.0.x, pulled onto DGE panels via auto-update) enabled an aggressive caching mode that serves stale responses for the app's HTTP calls to the processor — including the
joinroomrequest — leaving panels stuck in a 1008 reconnect loop / half-loaded UI. Root-caused with A. Welker at KPMG and validated in the NYC lab; confirmed working live at The New Yorker.What
Adds an axios request interceptor on the library's
httpClientthat appends a unique query param (_=<base36 timestamp><base36 random>) to every request, so each URL is unique and bypasses the aggressive cache. The extra param is ignored by the MC server. The WebSocket connection is untouched (not HTTP-cached).Cherry-picked cleanly from
58c2244; builds clean (ES + UMD + type declarations).Companion to the Essentials-side fix (PRs #1484 / #1485 there): Essentials
cb=on the app URL forces the panel to re-download the app; this interceptor keeps the subsequent join/status calls fresh. Both halves are needed to defeat the CH5 cache.