Two coupled dev-experience improvements:
1. `make ui` co-launches the main UI on :5173 and the admin Vite on :5174,
reverse-proxying /admin from :5173 (with bare `/admin` 302→`/admin/` so
users never see Vite's base-URL hint page). `make ui-only` and `make
admin` keep single-app launch available. SIGINT to the make process
group cleanly tears down both vites.
2. Stop the dev server from full-reloading the browser when the user has
not changed any source code. The trigger was Vite's lazy dep optimizer
discovering a new specifier (e.g. an Element Plus per-component CSS or
a codemirror language) on first navigation and emitting "optimized
dependencies changed. reloading", which dumps in-memory state (admin
token, form input, etc).
Fix is three-pronged in both UIs:
- `optimizeDeps.include` lists every third-party specifier actually
imported, with `noDiscovery: true` to disable runtime discovery.
- `ElementPlusResolver({ importStyle: false })` removes the per-
component CSS injections that fed the optimizer; main.js already
pulls in the global element-plus stylesheet.
- All Pinia stores (admin/auth/theme) end with `acceptHMRUpdate` so
editing a store hot-replaces instead of full-reloading.
Real code edits still trigger normal HMR / file-watcher reloads.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>