Related
Part of the Developer Experience section of the roadmap: #2727
Problem
When the state expires on the server, or the server reloads with a different state schema, there should be a better mechanism for detecting this and forcing the frontend to reload.
Currently, if the backend state schema changes (e.g. vars are added/removed/renamed, or event handler signatures change), the frontend may hold stale references that lead to confusing errors or broken UI rather than a clean reload.
Proposed Solution
Implement mismatch detection between the frontend's expected state schema and the backend's current state schema, and automatically trigger a frontend reload when a mismatch is detected.