Skip to content

Dashboard: preload module chunks - #404

Merged
smb merged 5 commits into
mainfrom
feat/issue-388
Oct 11, 2026
Merged

smb merged 5 commits into
mainfrom
feat/issue-388

Conversation

@smb

@smb smb commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Module code is preloaded, so opening a module shows no loading text (epic #389).

  • 🚀 Performance:
    • preloadModulePanel(id) memoizes the registry loader (panel, settings editor, immediate actions); triggered on sidebar hover/focus and on idle for enabled modules
    • navigate runs in startTransition, so the previous view stays until the next one is ready
    • One Suspense boundary per view with a sized fallback; the overlay element editor reserves its height
  • 🧪 Tests: preload on hover/idle, no loading text after hover, no height change when the element editor arrives (e2e repeat-each=10)

Closes #388

smb added 5 commits October 11, 2026 10:00
Dashboard loading
- Memoize module panel, settings editor, and immediate action imports.
- Preload enabled modules on idle and sidebar hover or focus.
- Keep the current module view visible while a destination chunk resolves.

Stable editor layouts
- Reserve sized skeleton slots for module views and overlay element editors.
- Cover preload and layout behavior with repeated browser specs.

Issue reference
- Implements #388.
- Recoverable module loading (#388)
  - Memoize panel, settings, action, and overlay editor imports, evict rejected promises, and recreate lazy views on retry.
  - Preload eligible chunks on sidebar hover/focus and idle using the shared visibility predicate.
- Stable module layouts (#388)
  - Keep the reserved route height outside Suspense and reserve enough space for overlay editors.
  - Keep route transitions on the previous view until the new panel is ready.
- Regression coverage (#388)
  - Verify failed imports recover and all lazy views/editors preserve their layout during delayed imports.
  - Measure responsive-hidden event cells as zero-size in the stable-layout assertion.
- Recoverable chunk loading (#388)
  - Evict rejected loader promises and recover failed lazy views from a fresh module map.
  - Keep lazy component identities stable across route Suspense retries.
- Permission-aware preloading (#388)
  - Reuse the sidebar visibility filter for hover, focus, and idle preloads.
- Stable panel layouts (#388)
  - Hold module and overlay editor reservations steady during delayed imports.
  - Cover every lazy module view and overlay editor with ten-repeat browser checks.
Dashboard error handling
- Route failed lazy module imports through the shared error and retry component.
- Reserve the error UI with the caller-selected panel-320 variant.

Issue context
- Completes #388 preloading alignment with #403 shared error handling.
Loader promise recovery
- Route synchronous throws and promise rejections through the eviction handler.
- Preserve synchronous chunk loading and verify failure then success recovery.

Navigation test stability
- Hold the idle preload callback so pre-navigation assertions stay deterministic in CI.
- Covers the #388 CI blockers.
@sonarqubecloud

Copy link
Copy Markdown

@smb
smb merged commit 117b8a3 into main Oct 11, 2026
7 checks passed
@smb
smb deleted the feat/issue-388 branch October 11, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data layer: preload module chunks

1 participant