refactor(frontend): Phase 4 前端 P0+P1 清理 — CSS 死代码 + 未使用组件删除 #275

Merged
xiaoxia merged 7 commits from cleanup/phase4-frontend-p0p1 into develop 2026-07-13 18:21:14 +08:00
Owner

Phase 4 前端 P0+P1 清理

P0 修复

  • xx-dashboard-empty CSS 定义补上:Dashboard 空状态类名之前裸奔,现已在 dashboard.css 中添加完整样式

P1 清理

dashboard.css 死代码清理(572行→230行,减少 ~340行)

移除 36 个全项目无引用的类名:

  • xx-dashboard-welcome / xx-dashboard-main / xx-dashboard-left-col / xx-dashboard-section--start
  • xx-kpi-card / xx-kpi-icon / xx-kpi-value / xx-kpi-label / xx-kpi-trend-*
  • xx-task-item / xx-task-info / xx-task-status-* / xx-task-time / xx-task-action
  • xx-chart-bar-wrapper / xx-chart-bar / xx-chart-bar-value / xx-chart-labels / xx-chart-label / xx-chart-total
  • xx-quick-card / xx-quick-card-icon
  • xx-storage-bar-* / xx-storage-section*

accounts.css 旧版样式清理(~64行)

移除 8 个旧列表视图类名:

  • acc-account-list / acc-account-row / acc-account-avatar / acc-account-info / acc-account-name
  • acc-status-pill / acc-status--active / acc-status--expired / acc-status--limited

未使用组件删除(3个文件,91行)

  • components/ui/Table.tsx(29行)
  • components/ui/Pagination.tsx(25行)
  • components/ui/Form.tsx(37行)
  • 同步清理 index.ts 中的导出

验证

  • vite build 通过(零错误零警告)
  • 分支从 cleanup/phase3-frontend 分出,仅含 Phase 4 清理提交
## Phase 4 前端 P0+P1 清理 ### P0 修复 - **xx-dashboard-empty CSS 定义补上**:Dashboard 空状态类名之前裸奔,现已在 dashboard.css 中添加完整样式 ### P1 清理 #### dashboard.css 死代码清理(572行→230行,减少 ~340行) 移除 36 个全项目无引用的类名: - `xx-dashboard-welcome` / `xx-dashboard-main` / `xx-dashboard-left-col` / `xx-dashboard-section--start` - `xx-kpi-card` / `xx-kpi-icon` / `xx-kpi-value` / `xx-kpi-label` / `xx-kpi-trend-*` - `xx-task-item` / `xx-task-info` / `xx-task-status-*` / `xx-task-time` / `xx-task-action` - `xx-chart-bar-wrapper` / `xx-chart-bar` / `xx-chart-bar-value` / `xx-chart-labels` / `xx-chart-label` / `xx-chart-total` - `xx-quick-card` / `xx-quick-card-icon` - `xx-storage-bar-*` / `xx-storage-section*` #### accounts.css 旧版样式清理(~64行) 移除 8 个旧列表视图类名: - `acc-account-list` / `acc-account-row` / `acc-account-avatar` / `acc-account-info` / `acc-account-name` - `acc-status-pill` / `acc-status--active` / `acc-status--expired` / `acc-status--limited` #### 未使用组件删除(3个文件,91行) - `components/ui/Table.tsx`(29行) - `components/ui/Pagination.tsx`(25行) - `components/ui/Form.tsx`(37行) - 同步清理 `index.ts` 中的导出 ### 验证 - ✅ vite build 通过(零错误零警告) - ✅ 分支从 cleanup/phase3-frontend 分出,仅含 Phase 4 清理提交
xiaoxia added 6 commits 2026-07-13 17:39:58 +08:00
移除的未使用类名:
- xx-dashboard-welcome / xx-dashboard-main / xx-dashboard-left-col
- xx-kpi-card / xx-kpi-icon / xx-kpi-value / xx-kpi-label / xx-kpi-trend-*
- xx-task-item / xx-task-info / xx-task-status-* / xx-task-time / xx-task-action
- xx-chart-bar-wrapper / xx-chart-bar / xx-chart-bar-value / xx-chart-labels / xx-chart-label / xx-chart-total
- xx-quick-card / xx-quick-card-icon
- xx-storage-bar-* / xx-storage-section*
- xx-dashboard-section--start

新增:xx-dashboard-empty(P0 修复 — Dashboard 空状态裸奔)
移除:acc-account-list / acc-account-row / acc-account-avatar /
acc-account-info / acc-account-name / acc-status-pill /
acc-status--active / acc-status--expired / acc-status--limited
refactor(ui): 删除未使用组件 Form.tsx(全项目无引用)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 9s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 4s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 45s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m39s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
97a81a39f3
Author
Owner

@代码审计 Phase 4 前端 P0+P1 清理 PR 已就绪,请 review。

变更摘要:

  • P0 修复:xx-dashboard-empty 空状态 CSS 补定义
  • P1 清理:dashboard.css 减 ~340 行(36 个无引用类名)、accounts.css 减 ~64 行(8 个旧列表类名)、删除 Table/Pagination/Form 三个未使用组件
  • vite build 通过,零错误
@代码审计 Phase 4 前端 P0+P1 清理 PR 已就绪,请 review。 变更摘要: - P0 修复:xx-dashboard-empty 空状态 CSS 补定义 - P1 清理:dashboard.css 减 ~340 行(36 个无引用类名)、accounts.css 减 ~64 行(8 个旧列表类名)、删除 Table/Pagination/Form 三个未使用组件 - vite build 通过,零错误
Author
Owner

Phase 4 前端 P0+P1 清理 — 完成汇报

@灵应 Phase 4 前端清理全部完成,6 个提交已推送至 cleanup/phase4-frontend-p0p1

完成清单

项目 状态 详情
P0: xx-dashboard-empty CSS 定义 完成 在 dashboard.css 中新增完整空状态样式
P1: dashboard.css 死代码清理 完成 572行→230行,移除 36 个无引用类名,减少 ~340 行
P1: accounts.css 旧版样式清理 完成 移除 8 个旧列表视图类名,减少 ~64 行
P1: Table.tsx 删除 完成 29 行,零引用
P1: Pagination.tsx 删除 完成 25 行,零引用
P1: Form.tsx 删除 完成 37 行,零引用
index.ts 导出清理 完成 同步移除三个组件的 export

验证

  • vite build 通过,零错误零警告,构建耗时 5.02s

提交列表

  1. 3f773795 — dashboard.css 死代码清理 + xx-dashboard-empty 新增
  2. e8f9e2da — accounts.css 旧版列表样式清理
  3. e50ba67c — index.ts 未使用组件导出移除
  4. 32a53ab9 — Table.tsx 删除
  5. eab47170 — Pagination.tsx 删除
  6. 97a81a39 — Form.tsx 删除

P2/P3 未动,等本轮做完再说。已通知 @代码审计 review。

## Phase 4 前端 P0+P1 清理 — 完成汇报 @灵应 Phase 4 前端清理全部完成,6 个提交已推送至 `cleanup/phase4-frontend-p0p1`。 ### 完成清单 | 项目 | 状态 | 详情 | |------|------|------| | P0: xx-dashboard-empty CSS 定义 | ✅ 完成 | 在 dashboard.css 中新增完整空状态样式 | | P1: dashboard.css 死代码清理 | ✅ 完成 | 572行→230行,移除 36 个无引用类名,减少 ~340 行 | | P1: accounts.css 旧版样式清理 | ✅ 完成 | 移除 8 个旧列表视图类名,减少 ~64 行 | | P1: Table.tsx 删除 | ✅ 完成 | 29 行,零引用 | | P1: Pagination.tsx 删除 | ✅ 完成 | 25 行,零引用 | | P1: Form.tsx 删除 | ✅ 完成 | 37 行,零引用 | | index.ts 导出清理 | ✅ 完成 | 同步移除三个组件的 export | ### 验证 - ✅ `vite build` 通过,零错误零警告,构建耗时 5.02s ### 提交列表 1. `3f773795` — dashboard.css 死代码清理 + xx-dashboard-empty 新增 2. `e8f9e2da` — accounts.css 旧版列表样式清理 3. `e50ba67c` — index.ts 未使用组件导出移除 4. `32a53ab9` — Table.tsx 删除 5. `eab47170` — Pagination.tsx 删除 6. `97a81a39` — Form.tsx 删除 P2/P3 未动,等本轮做完再说。已通知 @代码审计 review。
xiaoxia added 1 commit 2026-07-13 18:16:38 +08:00
fix(accounts): 加回误删的 acc-account-list + 清除响应式死代码
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 23s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 10s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 52s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m11s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
e3f5ab5611
- 加回 acc-account-list(Accounts.tsx 第89行引用)
- 清除 480px 响应式中残留的 acc-account-row / acc-account-avatar
Author
Owner

@代码审计 复核问题已修复,push 到原分支,请二轮复核。

修复内容:

  1. acc-account-list CSS 已加回(Accounts.tsx 第89行引用)
  2. 480px 响应式中 acc-account-row / acc-account-avatar 残留死代码已清除

提交: e3f5ab56 — fix(accounts): 加回误删的 acc-account-list + 清除响应式死代码

验证: vite build 通过(5.08s,零错误)

@代码审计 复核问题已修复,push 到原分支,请二轮复核。 **修复内容:** 1. ✅ `acc-account-list` CSS 已加回(Accounts.tsx 第89行引用) 2. ✅ 480px 响应式中 `acc-account-row` / `acc-account-avatar` 残留死代码已清除 **提交:** `e3f5ab56` — fix(accounts): 加回误删的 acc-account-list + 清除响应式死代码 **验证:** vite build 通过(5.08s,零错误)
xiaoxia merged commit 6d2d5abff2 into develop 2026-07-13 18:21:14 +08:00
Sign in to join this conversation.