refactor(editing-planner): 拆分 types.ts 为目录结构,按功能模块分文件 #992

Closed
xiaoxia wants to merge 3 commits from refactor/editing-planner-types-split into develop
Owner

变更内容

原 types.ts 单文件 550 行,按功能模块拆分为目录结构:

新增模块

  • transition.ts - 转场特效(14种转场类型 + 配置 + 默认值)
  • speed.ts - 片段调速
  • tts.ts - TTS 配音配置
  • trim.ts - 片段裁剪配置
  • watermark.ts - 水印配置(图片/文字/滚动)
  • intro-outro.ts - 片头片尾配置
  • pip.ts - 混剪 PiP 配置(图层/动画/九宫格)
  • filter.ts - 滤镜调色(10种预设 + 参数)
  • chroma-key.ts - 绿幕抠像(5种颜色预设)
  • sticker.ts - 贴纸配置(emoji/图片/文字花字)
  • cover.ts - 封面配置
  • clip.ts - 片段数据 ClipData
  • title.ts - 标题设置

兼容处理

  • index.ts 统一 re-export 所有类型和常量
  • 保持 @/pages/editing-planner/types 导入路径不变
  • 原有 subtitle.ts / clipProperties.ts 保留

验证

  • 纯重构,无逻辑变更

自动生成 PR

## 变更内容 原 types.ts 单文件 550 行,按功能模块拆分为目录结构: ### 新增模块 - **transition.ts** - 转场特效(14种转场类型 + 配置 + 默认值) - **speed.ts** - 片段调速 - **tts.ts** - TTS 配音配置 - **trim.ts** - 片段裁剪配置 - **watermark.ts** - 水印配置(图片/文字/滚动) - **intro-outro.ts** - 片头片尾配置 - **pip.ts** - 混剪 PiP 配置(图层/动画/九宫格) - **filter.ts** - 滤镜调色(10种预设 + 参数) - **chroma-key.ts** - 绿幕抠像(5种颜色预设) - **sticker.ts** - 贴纸配置(emoji/图片/文字花字) - **cover.ts** - 封面配置 - **clip.ts** - 片段数据 ClipData - **title.ts** - 标题设置 ### 兼容处理 - index.ts 统一 re-export 所有类型和常量 - 保持 `@/pages/editing-planner/types` 导入路径不变 - 原有 subtitle.ts / clipProperties.ts 保留 ### 验证 - 纯重构,无逻辑变更 --- _自动生成 PR_
xiaoxia added 1 commit 2026-07-27 00:41:17 +08:00
refactor(editing-planner): 拆分 types.ts 为目录结构,按功能模块分文件
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 24s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m14s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m14s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 45s
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 1m47s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 39s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m5s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m12s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 56s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m55s
AI Code Review / AI Code Review (pull_request) Successful in 3m55s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 6m21s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 27s
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
014b42fe47
原 types.ts 单文件 550 行,按功能拆分为 14 个模块文件:
- transition: 转场特效
- speed: 片段调速
- tts: TTS 配音
- trim: 片段裁剪
- watermark: 水印配置
- intro-outro: 片头片尾
- pip: 混剪 PiP
- filter: 滤镜调色
- chroma-key: 绿幕抠像
- sticker: 贴纸配置
- cover: 封面配置
- clip: 片段数据
- title: 标题设置
- subtitle: 字幕样式(原有)
- clipProperties: ClipPropertiesPanel 专属类型(原有)

index.ts 统一 re-export,保持 @/pages/editing-planner/types 导入路径向后兼容

🚀 预览环境已部署

项目 详情
PR号 #992
预览链接 https://pr-992.preview.xiaoxiajianji.com
API环境 staging

💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。

🔄 每次提交新代码后预览环境会自动更新。

🗑️ PR 关闭或合并后,预览环境会自动清理。

🚀 **预览环境已部署** | 项目 | 详情 | |------|------| | PR号 | #992 | | 预览链接 | [https://pr-992.preview.xiaoxiajianji.com](https://pr-992.preview.xiaoxiajianji.com) | | API环境 | staging | > 💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。 > > 🔄 每次提交新代码后预览环境会自动更新。 > > 🗑️ PR 关闭或合并后,预览环境会自动清理。
xiaoxia added 1 commit 2026-07-27 08:39:49 +08:00
style: prettier format fix
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 23s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m11s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m6s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 45s
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 1m53s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 39s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m11s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m57s
AI Code Review / AI Code Review (pull_request) Successful in 1m52s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 44s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 5m32s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 15m23s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 46s
CI/CD Pipeline / Deploy Production (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
539911b73d
auto-approve-bot approved these changes 2026-07-27 08:57:03 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot approved these changes 2026-07-27 08:57:04 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
Collaborator

代码审查结果 - PR #992

⚠️ 问题(1个需要修改)

  1. apps/web/src/pages/editing-planner/types/index.ts 第83行:引用了不存在的模块 ./subtitle,导出了未定义的 SubtitleStyleConfigDEFAULT_SUBTITLE_STYLE。这会导致 TypeScript 编译失败(Module not found),因为 subtitle.ts 文件既未在本次 PR 中创建,也未存在于旧代码中。

💡 建议(0个可选)


格式检查通过 | 逻辑审查需修改 | 性能良好


🤖 由 AI 代码审查机器人自动生成 | 2026-07-27 00:57:43 | 模型:

## 代码审查结果 - PR #992 ### ⚠️ 问题(1个需要修改) 1. **apps/web/src/pages/editing-planner/types/index.ts 第83行**:引用了不存在的模块 `./subtitle`,导出了未定义的 `SubtitleStyleConfig` 和 `DEFAULT_SUBTITLE_STYLE`。这会导致 TypeScript 编译失败(Module not found),因为 `subtitle.ts` 文件既未在本次 PR 中创建,也未存在于旧代码中。 ### 💡 建议(0个可选) 无 --- ✅ 格式检查通过 | ❌ 逻辑审查需修改 | ✅ 性能良好 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-07-27 00:57:43 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->
Collaborator

Auto merge skipped after multiple 405 errors: PR may have conflicts or unresolved checks. Please review manually. This is not a CI failure.

Auto merge skipped after multiple 405 errors: PR may have conflicts or unresolved checks. Please review manually. This is not a CI failure.
xiaoxia added 1 commit 2026-07-27 12:34:20 +08:00
Merge branch 'develop' into refactor/editing-planner-types-split
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 29s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 46s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m12s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m15s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 26s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 46s
AI Code Review / AI Code Review (pull_request) Successful in 41s
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 2m40s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m0s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 59s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 4m13s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m49s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 13s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Successful in 9m25s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m41s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 33s
CI/CD Pipeline / Deploy Production (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
c1cb2c0bdb
xiaoxia closed this pull request 2026-07-27 15:26:18 +08:00

🗑️ 预览环境已清理

PR #992 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #992 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Some checks are pending
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 29s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 46s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m12s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m15s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 26s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 46s
AI Code Review / AI Code Review (pull_request) Successful in 41s
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 2m40s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m0s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 59s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 4m13s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m49s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 13s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Successful in 9m25s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m41s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 33s
CI/CD Pipeline / Deploy Production (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.