open-design-crew[bot]
af77bd9091
feat(studio): integrate React Router Data Router, KeepAliveOutlet, useBlocker guard, and SPA route fallback ( #821 )
...
* feat(studio): integrate React Router Data Router, KeepAliveOutlet, useBlocker guard, and SPA route fallback
* fix(studio): map SPA pathnames, await router navigation commits, localize blocker error, and schedule spa-routes CI
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com >
2026-11-22 12:41:29 +08:00
open-design-crew[bot]
f6e017d8f4
feat(studio): extract workspace route registry and lazy-load all studio pages ( #811 )
...
* feat(studio): extract workspace route registry and lazy-load all studio pages
Phase 2 of the progressive Studio routing and lazy-loading refactor:
decouples route registration and page surface rendering from WorkspaceFrame
while preserving existing query URLs and KeepAlive behavior.
- Add studio/src/router/lazyPages.ts wrapping all 17 workspace pages and
overlays with lazyWithChunkReload (plus LAZY_PAGE_MODULE_PATHS and a
test preload helper)
- Add studio/src/router/routeRegistry.ts centralizing route metadata,
keepAlive policy (editor/explore/assets), tracking pages, and arrivals
- Add studio/src/router/RouteViewport.tsx and OverlayLayer.tsx with
Suspense + SettingsSurfaceBoundary isolation, and slim WorkspaceFrame.tsx
down into a pure App Shell
- Pin base: '/' in studio/vite.config.ts for nested route readiness
- Strengthen studio/src/shellBoundary.test.ts with positive traversal
controls (from #805 review follow-up), lazy-page static import guards,
and routeRegistry unit coverage
- Document routing boundaries in docs/routing.md and align AGENTS.md,
CLAUDE.md, CONTRIBUTING.md, CONTRIBUTING.zh-CN.md, and docs/README.md
Build impact (npm run build:studio):
- Entry index-*.js: 8,558.83 kB -> 7,237.40 kB (-1,321.43 kB / -15.4%)
- Entry index-*.js gzip: 2,650.91 kB -> 2,242.38 kB (-408.53 kB / -15.4%)
- Cumulative vs pre-Phase-1 main: -2,497.49 kB raw (-25.7%)
* fix(studio): eliminate lazy route transition flashes and missing shared CSS
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com >
2026-11-22 09:21:16 +08:00