[P0] 前端冗余代码清理:sticker/ tts/ pip-config/ batch/ 目录重复 #1831

Open
opened 2026-09-10 12:07:09 +08:00 by xiaoxia · 0 comments
Owner

背景

Staging 代码审计发现前端 editing-planner 存在多处完全重复的组件目录/文件。

问题清单

1. sticker/ 目录(死代码)

  • 路径:apps/web/src/pages/editing-planner/components/sticker/
  • 状态:4个文件仅内部互引,无外部引用。已被 StickerPanel/ 完全替代
  • 操作:删除整个 sticker/ 目录

2. tts/ 目录(死代码)

  • 路径:apps/web/src/pages/editing-planner/components/tts/
  • 状态:TtsSlider.tsx 零引用;VoiceSelector.tsx 与 voices 页面无关。已被 TtsPanel/ 替代
  • 操作:删除整个 tts/ 目录

3. pip-config/ 顶层文件(死代码)

  • 路径:apps/web/src/pages/editing-planner/components/pip-config/LayerConfig.tsx 和 LayerList.tsx
  • 状态:零引用,已被 PipConfigPanel/ 替代
  • 操作:删除这两个文件

4. batch/ 目录(与 batch-operations/ 完全重复)

  • 路径:apps/web/src/pages/assets/hooks/asset-operations/batch/
  • 状态:5个文件与 batch-operations/ 完全一致。生产代码引用 batch-operations/,测试引用 batch/
  • 操作:先更新 smoke.test.tsx import 路径从 batch/ 到 batch-operations/,然后删除 batch/

验收标准

  • 上述 4 个冗余目录/文件全部删除
  • 测试 import 路径已统一
  • npm run build 通过
  • CI 全绿
## 背景 Staging 代码审计发现前端 editing-planner 存在多处完全重复的组件目录/文件。 ## 问题清单 ### 1. sticker/ 目录(死代码) - 路径:apps/web/src/pages/editing-planner/components/sticker/ - 状态:4个文件仅内部互引,无外部引用。已被 StickerPanel/ 完全替代 - 操作:删除整个 sticker/ 目录 ### 2. tts/ 目录(死代码) - 路径:apps/web/src/pages/editing-planner/components/tts/ - 状态:TtsSlider.tsx 零引用;VoiceSelector.tsx 与 voices 页面无关。已被 TtsPanel/ 替代 - 操作:删除整个 tts/ 目录 ### 3. pip-config/ 顶层文件(死代码) - 路径:apps/web/src/pages/editing-planner/components/pip-config/LayerConfig.tsx 和 LayerList.tsx - 状态:零引用,已被 PipConfigPanel/ 替代 - 操作:删除这两个文件 ### 4. batch/ 目录(与 batch-operations/ 完全重复) - 路径:apps/web/src/pages/assets/hooks/asset-operations/batch/ - 状态:5个文件与 batch-operations/ 完全一致。生产代码引用 batch-operations/,测试引用 batch/ - 操作:先更新 smoke.test.tsx import 路径从 batch/ 到 batch-operations/,然后删除 batch/ ## 验收标准 - 上述 4 个冗余目录/文件全部删除 - 测试 import 路径已统一 - npm run build 通过 - CI 全绿
xiaoxia added the bugfrontendcleanup labels 2026-09-10 12:07:09 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiaoxia/xiaoxia-saas#1831