fix: unify extract video voice progress text & cleanup file input #1689

Merged
auto-approve-bot merged 1 commits from fix/video-extract-modal-text-and-cleanup into develop 2026-09-04 14:59:29 +08:00
Owner

Changes

调整 1:弹窗文案统一

File: apps/web/src/pages/voices/components/VideoExtractModal.tsx

Before:

{progress === 100 ? "正在提取人声,请稍候..." : "正在上传视频..."}

After:

{"正在提取音频,请稍后..."}

整个流程统一文案,不再区分上传/提取阶段。

调整 2:关闭时清理 file input

File: apps/web/src/pages/voices/components/VideoExtractModal.tsx

onCancel 中加 inputRef.current.value = "",清空 file input,帮助浏览器更快释放文件句柄和回收缓存。

注:INetCache\IE\ 下的文件是浏览器 FormData 上传时的系统级临时缓存,前端无法直接清除。但清空 file input + 释放 File 引用后,浏览器会更快回收。

Verification

  • Prettier formatted
  • TypeScript compiles
  • ESLint passes
## Changes ### 调整 1:弹窗文案统一 **File:** `apps/web/src/pages/voices/components/VideoExtractModal.tsx` Before: ```jsx {progress === 100 ? "正在提取人声,请稍候..." : "正在上传视频..."} ``` After: ```jsx {"正在提取音频,请稍后..."} ``` 整个流程统一文案,不再区分上传/提取阶段。 ### 调整 2:关闭时清理 file input **File:** `apps/web/src/pages/voices/components/VideoExtractModal.tsx` 在 `onCancel` 中加 `inputRef.current.value = ""`,清空 file input,帮助浏览器更快释放文件句柄和回收缓存。 > 注:`INetCache\IE\` 下的文件是浏览器 FormData 上传时的系统级临时缓存,前端无法直接清除。但清空 file input + 释放 File 引用后,浏览器会更快回收。 ## Verification - ✅ Prettier formatted - ✅ TypeScript compiles - ✅ ESLint passes
xiaoxia added 1 commit 2026-09-04 14:51:28 +08:00
fix: unify extract video voice progress text & cleanup file input
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 7s
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 / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (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 / Frontend Unit Tests (pull_request) Successful in 1m24s
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 / Validate - Python (mypy + alembic) (pull_request) Successful in 2m0s
AI Code Review / AI Code Review (pull_request) Successful in 2m8s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m26s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m53s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m17s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m25s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 2m38s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 6m47s
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 / CI Gate (pull_request) Successful in 7s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 5m27s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 13s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 36s
aaf89fc245
1. Unify progress modal text to '正在提取音频,请稍后...' throughout the
   entire upload+extraction flow, instead of showing different text for
   upload vs extraction phases.

2. Clear file input value on modal close to help browser release the
   file handle sooner, reducing residual cache in browser temp storage.
Collaborator

代码审查结果 - PR #1689

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

  1. VideoExtractModal.tsx 第33行onCancel 回调逻辑顺序错误。清空输入框的操作(inputRef.current.value = "")在 isExtracting 判断之前执行。如果正在提取中用户点击取消,会导致输入框内容被清空,但弹窗因 isExtracting 为 true 而保持打开,造成用户数据丢失且无法直接修正。
  2. VideoExtractModal.tsx 第156行:移除了基于 progress 的条件判断逻辑。原代码区分了“上传视频”和“提取人声”两个阶段,修改后无论进度如何都显示“正在提取音频”,导致在上传阶段给用户反馈错误的进度信息。

💡 建议(0个可选)


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


🤖 由 AI 代码审查机器人自动生成 | 2026-09-04 06:53:38 | 模型:

## 代码审查结果 - PR #1689 ### ⚠️ 问题(2个需要修改) 1. **VideoExtractModal.tsx 第33行**:`onCancel` 回调逻辑顺序错误。清空输入框的操作(`inputRef.current.value = ""`)在 `isExtracting` 判断之前执行。如果正在提取中用户点击取消,会导致输入框内容被清空,但弹窗因 `isExtracting` 为 true 而保持打开,造成用户数据丢失且无法直接修正。 2. **VideoExtractModal.tsx 第156行**:移除了基于 `progress` 的条件判断逻辑。原代码区分了“上传视频”和“提取人声”两个阶段,修改后无论进度如何都显示“正在提取音频”,导致在上传阶段给用户反馈错误的进度信息。 ### 💡 建议(0个可选) 无 --- ✅ 格式检查通过 | ❌ 逻辑审查需修改 | ✅ 性能良好 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-09-04 06:53:38 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->

🚀 预览环境已部署

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

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

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

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

🚀 **预览环境已部署** | 项目 | 详情 | |------|------| | PR号 | #1689 | | 预览链接 | [https://pr-1689.preview.xiaoxiajianji.com](https://pr-1689.preview.xiaoxiajianji.com) | | API环境 | staging | > 💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。 > > 🔄 每次提交新代码后预览环境会自动更新。 > > 🗑️ PR 关闭或合并后,预览环境会自动清理。
auto-approve-bot approved these changes 2026-09-04 14:54:03 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

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

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot merged commit 3fcc65840e into develop 2026-09-04 14:59:29 +08:00
auto-approve-bot deleted branch fix/video-extract-modal-text-and-cleanup 2026-09-04 14:59:34 +08:00

🗑️ 预览环境已清理

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

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

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