chore: 清理剪辑模板编辑器生成视频死代码 + 重命名为剪辑模板 #1472
Reference in New Issue
Block a user
Delete Branch "chore/cleanup-template-editor-generation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
任务一:清理剪辑模板编辑器的生成视频死代码
删除的文件
editing-planner/components/GenerationProgressModal.tsxediting-planner/components/GenerationHistoryModal.tsxediting-planner/components/generation-progress-modal/整个目录(6个文件)GenerationProgressModal.test.tsx、GenerationHistoryModal.test.tsx删除的 API 函数
generateEditPlan— POST /templates/{id}/editor/generategetGenerationStatus— GET /templates/{id}/editor/generation-statusgetEditPlanGenerations— GET /templates/{id}/editor/generations同时删除了 types.ts 中仅被这三个函数使用的类型:
GenerateResponseEditPlanGenerationGenerationStatusResponse清理的测试引用
EditingPlanner.test.tsx:移除 mock 和组件 mockGeneratePage.test.tsx:移除 mock 中的三个函数smoke.test.tsx:移除两个组件 importedit-plans.test.ts:移除三个函数 import 和 describe 块未动
任务二:剪辑编辑器 → 剪辑模板
只改用户可见文案,不改变量名/组件名/路由/API路径:
config/navigation.ts两处菜单 labelpages/templates/hooks/useTemplateLibrary.ts注释验证
代码审查结果 - PR #1472
⚠️ 问题(0个需要修改)
无
💡 建议(2个可选)
Dict类型在文件剩余部分是否仍被使用。虽然删除的 Schema 中使用了Dict,但如果文件中其他未展示的 Schema(如 AI 推荐、导出配置等)仍依赖typing.Dict,删除该导入会导致NameError。建议全局搜索确认或保留导入。_auto_fallback_assign_assets)和自动复制片段配置(_auto_fallback_copy_template_clips)的逻辑。请务必确认新的/generation/tasks体系已在其他位置(如 Worker 或新的 Service 层)实现了等效的自动兜底机制,否则用户在生成视频时可能因缺少素材或片段配置而遇到流程阻断或体验下降。✅ 格式检查通过 | ✅ 逻辑审查通过 | ✅ 性能无明显影响
🤖 由 AI 代码审查机器人自动生成 | 2026-08-23 14:57:56 | 模型:
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #1472 已关闭或合并,对应的预览环境已被清理。