EDM-5267: Mitigate errors when UI service restarts - #770
Conversation
Made-with: Cursor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe standalone router now recreates lazy route components and remounts route error boundaries when the location changes. The error alert also provides a translated action that reloads the browser page. ChangesNavigation Error Recovery
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds recovery behavior for stale UI assets and navigation after a service restart; no actionable merge-blocking risk remains based on the supplied evidence. Suggested labels: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Ocassionally, the UI could show a "failed to load chunk" error instead of the selected page.
This seemed to happen when the UI service is restarted, as the loaded UI does not have the correct bundled assets.
Fixes:
location.keyso that when navigating to another tab after the UI has fully restarted (or back to the same tab), the page is shown instead of the stale error.Affected areas
apps/standalone/: Re-imports route components when the route changes. KeysErrorBoundarywithlocation.keyto clear stale errors after navigation or a UI service restart.libs/ui-components/: AddslazyResetterand a “Reload page” action for chunk-loading errors.Impact
libs/types/,libs/i18n/,libs/cypress/,apps/ocp-plugin/,proxy/,packaging/, or CI configuration.