refactor(assets): Phase 3 - extract business hooks #899
Reference in New Issue
Block a user
Delete Branch "refactor/asset-library-phase3"
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?
概述
AssetLibrary Phase 3 — 抽离业务 Hook,跟 VoiceLibrary 的三阶段套路一致。
变更内容
从
AssetLibrary.tsx中抽离出 5 个业务 Hook,主文件从 663 行精简至 307 行(减少 54%)。新增 Hooks(
apps/web/src/pages/assets/hooks/)useAssetsDatauseLibraryManagementuseAssetUploaduseAssetSelectionuseAssetOperations重构原则
Smoke Test
更新
apps/web/src/test/pages/assets/smoke.test.tsx,导入所有新 Hook,确保 vitest related 模式能匹配到依赖。验证
pnpm tsc --noEmit全通过prettier --check全通过关联
Phase 1 (PR#892): 抽 types/constants/utils,1279→1123行
Phase 2 (PR#897): 抽12个UI组件,1122→663行
Phase 3 (本PR): 抽业务Hook,663→307行
CI全绿,自动审批通过。
CI全绿,自动审批通过。
Auto merge skipped after multiple 405 errors: PR may have conflicts or unresolved checks. Please review manually. This is not a CI failure.
b77a92b6catob8e1ba2aa9🗑️ 预览环境已清理
PR #899 已关闭或合并,对应的预览环境已被清理。