fix: 移除配音选择时长过滤逻辑,所有配音素材完整显示 #1697

Merged
auto-approve-bot merged 3 commits from fix/remove-voice-duration-filter into develop 2026-09-04 21:08:41 +08:00
Owner

变更

  • 移除 Step5VoiceSelect 中按 totalVideoDuration ±10% 过滤配音的 useMemo 逻辑
  • 移除「已根据视频时长自动过滤时长差异过大的配音」提示文案
  • 清理 totalVideoDuration prop(Step5VoiceSelect / GenerateStepContent / GeneratePage)
  • 移除 GeneratePage 中不再使用的 calculateTotalVideoDuration/estimateTotalVideoDuration useMemo 及导入

背景

配音现在是锚点,视频适配配音,不再需要按模板时长过滤配音。过滤导致用户完全选不到配音。

验收

  • 配音选择页所有素材完整显示
  • 不再出现过滤提示
  • 空状态仍显示「暂无配音素材」+「去配音库上传」按钮
## 变更 - 移除 Step5VoiceSelect 中按 totalVideoDuration ±10% 过滤配音的 useMemo 逻辑 - 移除「已根据视频时长自动过滤时长差异过大的配音」提示文案 - 清理 totalVideoDuration prop(Step5VoiceSelect / GenerateStepContent / GeneratePage) - 移除 GeneratePage 中不再使用的 calculateTotalVideoDuration/estimateTotalVideoDuration useMemo 及导入 ## 背景 配音现在是锚点,视频适配配音,不再需要按模板时长过滤配音。过滤导致用户完全选不到配音。 ## 验收 - 配音选择页所有素材完整显示 - 不再出现过滤提示 - 空状态仍显示「暂无配音素材」+「去配音库上传」按钮
xiaoxia added 1 commit 2026-09-04 20:23:05 +08:00
fix: 移除配音选择时长过滤逻辑,所有配音素材完整显示
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
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 / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 1m16s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m20s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m27s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m39s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 2m6s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 2m24s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 3m24s
AI Code Review / AI Code Review (pull_request) Successful in 3m46s
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 2m48s
9635343548
xiaoxia added 1 commit 2026-09-04 20:27:34 +08:00
fix: 移除 GeneratePage.tsx 不再需要的 eslint-disable 指令
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
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 / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 1m6s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m42s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m45s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m49s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 1m56s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 2m12s
AI Code Review / AI Code Review (pull_request) Successful in 3m42s
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
13eecf422b
xiaoxia added 1 commit 2026-09-04 20:31:39 +08:00
fix: 移除残留的过滤提示文案(totalVideoDuration/filteredMaterials)
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
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 / PR Build API 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) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Frontend Unit Tests (pull_request) Successful in 1m37s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m55s
AI Code Review / AI Code Review (pull_request) Successful in 2m0s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m57s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m7s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 2m20s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m36s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 4m28s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m33s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 23m11s
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 / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 4s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 8s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 1m37s
b139463e53
Collaborator

【阻塞级判定】

  • 是否存在阻塞级问题:否
  • 阻塞级问题数量:0 个

📊 审查概览

  • 整体评价:通过
  • 建议级问题数量:1 个

🔴 阻塞级问题(必须修复)

💡 改进建议(不阻塞合并)

  1. [apps/web/src/pages/generate/components/Step5VoiceSelect.tsx] 清理未使用的代码
    • 具体内容:移除了基于 totalVideoDuration 的过滤逻辑后,函数 isAiVoicegetDuration(如果它们仅在过滤逻辑中使用)可能不再被使用。建议检查这两个函数/导入是否在文件其他位置仍有引用,若无,请一并删除以保持代码整洁。

良好实践

  • 彻底的功能移除:代码变更从父组件 GeneratePage 到子组件 Step5VoiceSelect 彻底移除了 totalVideoDuration 相关的计算、传递和过滤逻辑,没有留下无用的 prop 传递,避免了潜在的冗余代码。
  • 依赖项清理:在 GeneratePage.tsx 中移除了 eslint-disable-next-line 注释,这意味着 useEffect 的依赖项数组现在应该是完整的,符合 React Hooks 最佳实践。
  • 类型安全:同步移除了 TypeScript 接口中的 totalVideoDuration 定义,保持了类型系统的一致性。

格式检查通过 | 逻辑审查通过 | 性能无明显问题


🤖 由 AI 代码审查机器人自动生成 | 2026-09-04 12:33:40 | 模型:

### 【阻塞级判定】 - 是否存在阻塞级问题:否 - 阻塞级问题数量:0 个 ### 📊 审查概览 - 整体评价:通过 - 建议级问题数量:1 个 ### 🔴 阻塞级问题(必须修复) 无 ### 💡 改进建议(不阻塞合并) 1. **[apps/web/src/pages/generate/components/Step5VoiceSelect.tsx] 清理未使用的代码** - 具体内容:移除了基于 `totalVideoDuration` 的过滤逻辑后,函数 `isAiVoice` 和 `getDuration`(如果它们仅在过滤逻辑中使用)可能不再被使用。建议检查这两个函数/导入是否在文件其他位置仍有引用,若无,请一并删除以保持代码整洁。 ### ✅ 良好实践 - **彻底的功能移除**:代码变更从父组件 `GeneratePage` 到子组件 `Step5VoiceSelect` 彻底移除了 `totalVideoDuration` 相关的计算、传递和过滤逻辑,没有留下无用的 prop 传递,避免了潜在的冗余代码。 - **依赖项清理**:在 `GeneratePage.tsx` 中移除了 `eslint-disable-next-line` 注释,这意味着 `useEffect` 的依赖项数组现在应该是完整的,符合 React Hooks 最佳实践。 - **类型安全**:同步移除了 TypeScript 接口中的 `totalVideoDuration` 定义,保持了类型系统的一致性。 --- ✅ 格式检查通过 | ✅ 逻辑审查通过 | ✅ 性能无明显问题 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-09-04 12:33:40 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->
auto-approve-bot approved these changes 2026-09-04 20:33:47 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

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

CI全绿,自动审批通过。

CI全绿,自动审批通过。

🚀 预览环境已部署

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

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

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

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

🚀 **预览环境已部署** | 项目 | 详情 | |------|------| | PR号 | #1697 | | 预览链接 | [https://pr-1697.preview.xiaoxiajianji.com](https://pr-1697.preview.xiaoxiajianji.com) | | API环境 | staging | > 💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。 > > 🔄 每次提交新代码后预览环境会自动更新。 > > 🗑️ PR 关闭或合并后,预览环境会自动清理。
auto-approve-bot merged commit 121820caa9 into develop 2026-09-04 21:08:41 +08:00
auto-approve-bot deleted branch fix/remove-voice-duration-filter 2026-09-04 21:08:41 +08:00

🗑️ 预览环境已清理

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

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

🗑️ **预览环境已清理** PR #1697 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.