fix: unify extract video voice progress text & cleanup file input #1689
Reference in New Issue
Block a user
Delete Branch "fix/video-extract-modal-text-and-cleanup"
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?
Changes
调整 1:弹窗文案统一
File:
apps/web/src/pages/voices/components/VideoExtractModal.tsxBefore:
After:
整个流程统一文案,不再区分上传/提取阶段。
调整 2:关闭时清理 file input
File:
apps/web/src/pages/voices/components/VideoExtractModal.tsx在
onCancel中加inputRef.current.value = "",清空 file input,帮助浏览器更快释放文件句柄和回收缓存。Verification
代码审查结果 - PR #1689
⚠️ 问题(2个需要修改)
onCancel回调逻辑顺序错误。清空输入框的操作(inputRef.current.value = "")在isExtracting判断之前执行。如果正在提取中用户点击取消,会导致输入框内容被清空,但弹窗因isExtracting为 true 而保持打开,造成用户数据丢失且无法直接修正。progress的条件判断逻辑。原代码区分了“上传视频”和“提取人声”两个阶段,修改后无论进度如何都显示“正在提取音频”,导致在上传阶段给用户反馈错误的进度信息。💡 建议(0个可选)
无
✅ 格式检查通过 | ❌ 逻辑审查需修改 | ✅ 性能良好
🤖 由 AI 代码审查机器人自动生成 | 2026-09-04 06:53:38 | 模型:
🚀 预览环境已部署
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #1689 已关闭或合并,对应的预览环境已被清理。