refactor: 删除剪辑模板编辑器和我的模板页面,清理相关代码和数据 #1900

Open
opened 2026-09-14 16:25:40 +08:00 by xiaoxia · 0 comments
Owner

需求背景

配合Issue"删除智能剪辑Step1选模板步骤",剪辑模板编辑器(editing-planner)和"我的模板"功能完全废弃,需要清理干净,不留技术债务。用户已保存的剪辑模板数据直接清空。

需要删除/清理的内容

前端页面和路由

  1. 删除剪辑模板编辑器页面路由:/app/editing-planner, /app/editing-planner/:id, /app/editing-planner/new 等
  2. 删除"我的模板"相关页面和组件
  3. 删除导航栏中的"剪辑模板"和"我的模板"菜单项(侧边栏+顶部Header)
  4. 检查navigation.ts配置,移除相关路由
  5. 检查router/appRoutes.tsx配置,移除相关路由

前端组件清理

删除整个目录 apps/web/src/pages/editing-planner/,包含但不限于:

  • EditingPlanner.tsx(主入口)
  • components/ 下所有子组件:
    • RightPanel.tsx, ClipPropertiesPanel.tsx
    • TitleSettingsSection.tsx(标题设置面板,确认删除后智能剪辑的标题设置不受影响)
    • TimelinePanel.tsx, TimelineHeader.tsx, TimeRuler.tsx, ClipTrack.tsx, ClipCard.tsx(时间线组件)
    • PreviewPlayer.tsx
    • 以及其他所有editing-planner相关组件
  • hooks/ 目录下所有editing-planner相关hook
  • constants/ 目录下剪辑模板相关常量
  • utils/ 目录下剪辑模板相关工具函数
  • types/ 目录下如果是editing-planner专属类型则删除
  • api/editing-planner/ 目录下所有API文件
  1. 注意:TitleSettingsSection中如果有被智能剪辑/AI数字人复用的逻辑,提取到公用模块后再删除

后端清理

  1. 删除模板编辑器相关API路由:
    • apps/api/app/api/routes/templates_editor/ 整个目录(timeline.py, clips.py等)
    • 在主路由注册中移除templates_editor相关include
  2. 删除/废弃以下数据库表(通过迁移):
    • edit_templates(剪辑模板)
    • edit_template_versions(模板版本)
    • edit_plans(编辑计划/草稿)
    • template_clip_configs(片段配置)
    • 其他editing-planner相关表
  3. 保留 templatestemplate_segments 表吗?— 需确认:
    • templates表是旧版用户自建模板,配合Step1选模板使用的,如果Step1删除了,这个表也应该清理
    • template_categories表同理
  4. 删除相关Service/UseCase/Command:
    • packages/application/template/ 目录(如果是editing-planner专用)
    • 确认无其他地方引用后删除
  5. 删除相关Repository:
    • packages/adapters/sqlalchemy_impl/template_repository.py
    • 相关ORM模型从models.py中移除

数据清理

  • 清空edit_templates、edit_plans、template_clip_configs等表的数据(TRUNCATE或DROP TABLE通过迁移)
  • 如果templates表也废弃,一并清空
  • 注意:cover_templates(封面模板)保留,这是封面功能不是剪辑模板

模板库(/app/templates)的处理

  • "模板库"页面(浏览系统预设模板和公共模板)—— 确认是否保留:
    • 如果Step1选模板删了,用户自己创建模板也删了,那"模板库"是否还有意义?
    • 本Issue只删除editing-planner(编辑器)和"我的模板",模板库页面待确认后处理
    • 导航栏上的"模板库"入口暂时保留(它展示的是预设模板/公共模板,与editing-planner不同)

约束

  • 删除代码要彻底,不能留死代码、未使用的import、空的目录
  • 删除前确认没有其他模块引用这些组件/API/Service
  • 公用的组件(如标题设置被其他页面复用)要提取到公共components目录
  • 数据库迁移要安全(Alembic迁移脚本)
  • 删除后确保智能剪辑、AI数字人、素材库、配音库、文案库等其他功能正常
## 需求背景 配合Issue"删除智能剪辑Step1选模板步骤",剪辑模板编辑器(editing-planner)和"我的模板"功能完全废弃,需要清理干净,不留技术债务。用户已保存的剪辑模板数据直接清空。 ## 需要删除/清理的内容 ### 前端页面和路由 1. 删除剪辑模板编辑器页面路由:/app/editing-planner, /app/editing-planner/:id, /app/editing-planner/new 等 2. 删除"我的模板"相关页面和组件 3. 删除导航栏中的"剪辑模板"和"我的模板"菜单项(侧边栏+顶部Header) 4. 检查navigation.ts配置,移除相关路由 5. 检查router/appRoutes.tsx配置,移除相关路由 ### 前端组件清理 删除整个目录 `apps/web/src/pages/editing-planner/`,包含但不限于: - EditingPlanner.tsx(主入口) - components/ 下所有子组件: - RightPanel.tsx, ClipPropertiesPanel.tsx - TitleSettingsSection.tsx(标题设置面板,确认删除后智能剪辑的标题设置不受影响) - TimelinePanel.tsx, TimelineHeader.tsx, TimeRuler.tsx, ClipTrack.tsx, ClipCard.tsx(时间线组件) - PreviewPlayer.tsx - 以及其他所有editing-planner相关组件 - hooks/ 目录下所有editing-planner相关hook - constants/ 目录下剪辑模板相关常量 - utils/ 目录下剪辑模板相关工具函数 - types/ 目录下如果是editing-planner专属类型则删除 - api/editing-planner/ 目录下所有API文件 6. 注意:TitleSettingsSection中如果有被智能剪辑/AI数字人复用的逻辑,提取到公用模块后再删除 ### 后端清理 1. 删除模板编辑器相关API路由: - `apps/api/app/api/routes/templates_editor/` 整个目录(timeline.py, clips.py等) - 在主路由注册中移除templates_editor相关include 2. 删除/废弃以下数据库表(通过迁移): - edit_templates(剪辑模板) - edit_template_versions(模板版本) - edit_plans(编辑计划/草稿) - template_clip_configs(片段配置) - 其他editing-planner相关表 3. 保留 `templates` 和 `template_segments` 表吗?— 需确认: - templates表是旧版用户自建模板,配合Step1选模板使用的,如果Step1删除了,这个表也应该清理 - template_categories表同理 4. 删除相关Service/UseCase/Command: - packages/application/template/ 目录(如果是editing-planner专用) - 确认无其他地方引用后删除 5. 删除相关Repository: - packages/adapters/sqlalchemy_impl/template_repository.py - 相关ORM模型从models.py中移除 ### 数据清理 - 清空edit_templates、edit_plans、template_clip_configs等表的数据(TRUNCATE或DROP TABLE通过迁移) - 如果templates表也废弃,一并清空 - 注意:cover_templates(封面模板)保留,这是封面功能不是剪辑模板 ### 模板库(/app/templates)的处理 - "模板库"页面(浏览系统预设模板和公共模板)—— 确认是否保留: - 如果Step1选模板删了,用户自己创建模板也删了,那"模板库"是否还有意义? - **本Issue只删除editing-planner(编辑器)和"我的模板",模板库页面待确认后处理** - 导航栏上的"模板库"入口暂时保留(它展示的是预设模板/公共模板,与editing-planner不同) ## 约束 - 删除代码要彻底,不能留死代码、未使用的import、空的目录 - 删除前确认没有其他模块引用这些组件/API/Service - 公用的组件(如标题设置被其他页面复用)要提取到公共components目录 - 数据库迁移要安全(Alembic迁移脚本) - 删除后确保智能剪辑、AI数字人、素材库、配音库、文案库等其他功能正常
xiaoxia added the frontendbackendrefactor labels 2026-09-14 16:25:40 +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#1900