Repository navigation
Make USE_NEW_DESIGN deterministic by cache-busting config.json in design switcher - #858
Conversation
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
USE_NEW_DESIGN deterministic by cache-busting config.json in design switcher
PR Summary by QodoCache-bust design config for deterministic frontend routing
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes address the caching issue and include regression coverage.
Review effort: Lite
Findings: None
What changed in this PR
This pull request makes USE_NEW_DESIGN routing deterministic by cache-busting config.json requests and adding regression coverage.
Changes:
- Adds a timestamp query parameter to configuration requests.
- Adds E2E coverage for cache busting and modern-design routing.
| File | Description |
|---|---|
tests/e2e/design-switch.spec.js |
Verifies cache-busted requests and routing behavior. |
design-switch.js |
Cache-busts config.json requests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
USE_NEW_DESIGNwas not consistently reflected inindex.htmlrouting because the client-side design switcher could reuse a stale cachedconfig.json. This caused deployments with updated env values to sometimes continue loading the previous frontend.Config fetch behavior
design-switch.jsto requestconfig.jsonwith a cache-busting query param so each page load evaluates the current server-rendered config value.?design=override first, config fallback second) while removing cache-driven nondeterminism.Regression coverage
tests/e2e/design-switch.spec.jsverifying the switcher requestsconfig.jsonwith the cache-busting parameter and routes to modern UI whenuseNewDesign: true.USE_NEW_DESIGNenvironment variable does not appear to reliably control which frontend design is used. #857