Logan.Li
|
d867c276d4
|
chore(frontend): engineering baseline per guide ch.8
- toolchain: vitest+jsdom (15 tests green: permission pure functions
exhaustive, storage migration), prettier (printWidth 120 to fit the
dense existing style + 700-line page budget), commitlint conventional
- npm scripts: typecheck / format / test / lint:fix; build fingerprint
__APP_VERSION__ (version+git hash+build time) shown in Settings > about
- git hooks via core.hooksPath=frontend/.husky: pre-commit lint-staged
(prettier + eslint --fix best-effort), commit-msg commitlint
- permission pure functions extracted to lib/permissions.ts (single
source consumed by useAuth/useLogin); AuditLogsPage filters on URL
- backend: resp package unit tests; health version constant aligned
with frontend package.json
|
2026-10-26 17:58:59 +08:00 |
|
Logan.Li
|
ac498c7ba2
|
refactor(frontend): split 7 oversized pages into feature co-location
Per guide ch.7 page split pattern (skeleton orchestrates, private
components live in features/<domain>/):
- InstancePage 1716->328, UsersPage 1309->240, TicketsPage 1076->195,
TicketDetailPage 911->287, QueriesPage 883->479, LdapConfigPage 860->393,
WorkflowPage 852->194
- new feature modules: datasource/ rbac/ ticket/ query/ system/ldap/
governance/workflow/ (components + hooks + types + utils)
- stable keys replace index keys in dynamic lists; polling intervals
and toast call sites preserved 1:1 (verified by agents)
- filter/pagination state moved to URL query via new useQueryState hook
(Instance/Users/Tickets/AuditLogs pages): refresh/share/back-button
restore state; composite updates applied atomically
- permission pure functions extracted to lib/permissions.ts (used by
useAuth + useLogin); page-size audit: 0 pages over 700-line budget
|
2026-10-26 17:54:15 +08:00 |
|