删除未使用前端设计 Token(07-16-second-stage-frontend-cleanup-wave1)
这个提交包含在:
@@ -36,6 +36,36 @@ and verification contracts. Do not copy broad aesthetic guidance from
|
||||
with `AUTH_005`.
|
||||
- Run `cd client && npm run typecheck && npm run build` for frontend changes.
|
||||
|
||||
## Convention: Frontend Design Token Sources
|
||||
|
||||
**What**: Runtime visual tokens use the sources that are actually consumed by
|
||||
the frontend build. CSS custom properties live in
|
||||
`client/src/design/theme.css`, which is imported by `client/src/index.css`;
|
||||
Tailwind theme values live in `client/tailwind.config.js`.
|
||||
|
||||
**Contracts**:
|
||||
|
||||
- Do not maintain a parallel TypeScript token object when no component, build
|
||||
plugin, generator or synchronization test consumes it.
|
||||
- Before adding, replacing or deleting a token source, search direct imports,
|
||||
type-only imports, `import.meta.glob`, generators, copy/sync scripts and
|
||||
build configuration.
|
||||
- Historical Issue CSV and archived Trellis references describe their original
|
||||
delivery state; they are not current runtime consumers and must not be
|
||||
rewritten merely because a source file is later removed.
|
||||
- If typed tokens become necessary later, introduce them with explicit runtime
|
||||
consumers or a generated single-source contract plus a drift regression
|
||||
test; do not manually duplicate CSS values.
|
||||
|
||||
**Why**: Unconsumed token mirrors drift from the CSS that actually renders the
|
||||
product, creating a misleading second fact source and unnecessary maintenance.
|
||||
|
||||
**Tests Required**:
|
||||
|
||||
- Exact consumer search for the changed token module or symbol.
|
||||
- `cd client && npm run typecheck`
|
||||
- `cd client && npm run build`
|
||||
|
||||
## Convention: Mature Enterprise Page Baseline
|
||||
|
||||
**What**: From `05-30-unified-page-design-review`, hyb-oa PC/mobile pages use
|
||||
|
||||
在新工单中引用
屏蔽一个用户