- Updated `generateUUID` function for improved readability and performance. - Deleted `logger.ts`, `other.ts`, `request.ts`, `storage.ts`, `tansParams.ts`, and `validate.ts` as they were no longer needed. - Simplified TypeScript configuration by removing unnecessary paths and aliases. - Enhanced Vite configuration for better project structure and maintainability.
3.7 KiB
3.7 KiB
React Migration Status - 2026-04-17
Current Verdict
- The active renderer bootstrap is React-only.
- The legacy Vue bootstrap, page tree, component tree, store tree, request/api layer, and the final leftover
src/**tree have been removed. - The repository source/runtime is now effectively React-only.
What Changed In This Pass
index.html -> src/main.tsxis now the only active renderer startup path.- The temporary compatibility shims
renderer-main.ts,ui-framework.ts,src/main.ts, andsrc/framework.tshave been removed. - The dead Vue bootstrap chain was removed:
src/main-vue.tssrc/router/index.tssrc/permission.tssrc/App.vue
- The dead Vue runtime tree was removed:
src/pages/**src/components/**src/stores/**src/api/**src/utils/request.tssrc/auto-imports.d.ts- legacy Vue-only composables and i18n bootstrap files
- the remaining
src/main.ts,src/framework.ts, assets, constants, locales, shared helpers, and utility files
global.d.tsno longer declares Vue-era modules or the deleted@assets/images/*alias.tsconfig.app.json,tsconfig.json, andvite.config.tsno longer keep the stalesrc/**alias surface.openapi-ts-request.config.tsnow points atsrc/api, andsrc/api/request.tsprovides the React-side generated request bridge.package.jsonno longer lists Vue-era runtime/UI dependencies.
Validation On 2026-04-17
pnpm typecheckpasses.pnpm build:vitepasses.- The renderer build, Electron main build, and preload build all complete successfully in the current workspace.
- The current build still emits a warning and skips bytenode bytecode compilation when the local Electron binary is unavailable in
node_modules/electron.
Remaining Non-Blocking Notes
package-lock.jsonstill contains historical Vue-era entries; the active workspace lockfile ispnpm-lock.yaml.pnpm-lock.yamlstill includes@vue/compiler-sfctransitively throughopenapi-ts-request, not through the application runtime.
Remaining Follow-Up
- Clean up stale historical docs that still mention
src/**as a live runtime path. - Decide whether to keep or remove
package-lock.jsonin apnpm-managed repo. - Keep build and typecheck green while the React/runtime-shared structure continues to evolve.
Build Chain Notes
vite.config.tsnow scopes Electronbuild.watchto development mode sopnpm build:viteexits cleanly in production mode.- The main-process Vite build now uses the same alias map as renderer/preload, so Electron imports like
@lib/constantsresolve correctly. vite-plugin-electron-encryptnow degrades gracefully when the local Electron executable is missing, logging a warning instead of failing the build.- React router now guards workspace routes and redirects authenticated users away from
/login.
Practical Boundary After This Pass
- Safe now:
- Treat React as the only supported renderer startup path.
- Treat the old Vue tree as fully retired code.
- Remove
src/**from migration planning, because it is no longer part of the repo.
- Not safe yet:
- Assume every transitive
vuestring in lockfiles is a runtime blocker; some now come only from tooling. - Remove
@runtime/*without replacing the shared Electron/runtime contract.
- Assume every transitive
Recommended Next Gate
Only consider the final Vue exit once:
- No source file imports any Vue-era runtime package.
package.jsonstays free of the Vue-era dependencies andpnpm-lock.yamlstays refreshed.- Build and typecheck keep passing after future runtime-shared and React-side changes.
- The remaining historical references are treated as documentation cleanup, not runtime migration blockers.