12 Commits
Author SHA1 Message Date
lxy 498688087a 改为monorepo,使用pnpm 2026-04-29 21:03:37 +08:00
narugo1992andClaude Opus 4.7 13973327da feat(dev): unify make ui (admin under /admin) and stop spurious vite reloads
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>
2026-04-27 11:24:08 +08:00
narugo1992 8088fdb98a Fix repo tree path handling 2026-04-21 15:09:58 +08:00
narugo1992 f76a8d49f2 Refine local dev reset workflow 2026-04-21 12:50:30 +08:00
narugo1992 d466fbd5a4 Add admin frontend unit test coverage 2026-04-21 11:29:16 +08:00
narugo1992 90c26815d1 Add frontend tests and fullstack CI workflow 2026-04-20 22:27:30 +08:00
narugo1992 1ab8277b46 test: expand backend coverage and tighten test entrypoint 2026-04-20 18:37:17 +08:00
narugo1992 770cfabb38 Add high-coverage backend test suite 2026-04-20 15:50:31 +08:00
narugo1992 0b9b5c8e02 Show test setup progress in pytest output 2026-04-20 12:49:14 +08:00
narugo1992 e12c5cce78 Add service-backed backend test workflow 2026-04-20 12:34:01 +08:00
narugo1992 0fac181a57 Add fast backend test harness and CI workflow 2026-04-19 22:14:32 +08:00
narugo1992 4c6dba6458 Add local development bootstrap and deterministic demo fixtures 2026-04-19 14:14:15 +08:00