Commit Graph

547 Commits

Author SHA1 Message Date
Deploy Bot 98b833ceb3 style: fix isort ordering in chunked_upload.py
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 209h58m45s
CI/CD Pipeline / Frontend Lint (push) Failing after 209h59m14s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 209h59m18s
2026-06-30 18:55:15 +08:00
xiaoxia 3106a56536 style: apply black formatting to ingest.py (#134)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h9m55s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h10m25s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h10m28s
2026-06-30 18:43:43 +08:00
xiaoxia 8e924dc660 fix: correct _safe_parse_fps placement and format setup.ts (#133)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h12m4s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h14m3s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h14m7s
2026-06-30 18:40:02 +08:00
xiaoxia fff644deac fix: resolve bandit security issues and fix vitest configuration (#132)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h18m25s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h18m51s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h18m54s
2026-06-30 18:35:20 +08:00
xiaoxia 560856cf22 fix: resolve all flake8 errors and apply Prettier formatting (#131)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h26m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h27m0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h27m7s
2026-06-30 18:26:53 +08:00
xiaoxia 1217d8cef0 style: apply isort formatting to pass CI validation (#129)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h35m44s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h36m11s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h36m17s
2026-06-30 18:17:44 +08:00
xiaoxia d1f3a82967 fix: resolve TypeScript type error in EditingPlanner (#130)
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 210h37m15s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h37m18s
2026-06-30 18:17:14 +08:00
xiaoxia 60c68ac586 fix: resolve all ESLint warnings for clean lint output (#128)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h47m24s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h47m48s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h47m52s
2026-06-30 18:06:41 +08:00
xiaoxia 52ff2f80ad style: apply black formatting to pass CI validation (#126)
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-30 17:23:08 +08:00
xiaoxia 1e6f78a346 fix: resolve ESLint errors to pass CI frontend-lint (#125)
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 211h32m2s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h32m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h32m46s
2026-06-30 17:21:49 +08:00
Audit Bot 16b18dc2fd test: 补充表单上传端点单元测试
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 新增 tests/unit/test_form_upload_routes.py,覆盖10个测试场景
- 修复 upload.py 表单参数处理:从 Annotated[Model, Form()] 改为独立 Form() 参数
- 测试覆盖:正常上传成功、缺少文件字段、缺少必填参数、项目/素材库不存在、OSS未配置
- 所有测试通过,与现有 upload/chunked_upload 测试风格保持一致

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-30 13:12:49 +08:00
Audit Bot 37152a0729 fix: list_by_project → find_by_project (修复上传/诊断端点 500)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
根因:upload.py、chunked_upload.py、asset_diagnosis.py 调用了
asset_library_repository.list_by_project(),但 SQLAlchemy 实现
只有 find_by_project(),导致 AttributeError → 500。

同步修复 InMemory 实现的方法名以保持一致。
2026-06-30 10:14:08 +08:00
Audit Bot 05c9137ece fix: 上传端点异常处理 + OSS 诊断能力
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
问题:PR#119 修复变量名后上传端点仍然 500,说明根因不仅是变量名错误

修复:
1. upload.py — 所有 3 个上传端点添加完整异常捕获和日志
   - prepare_direct_upload: 捕获 RuntimeError→503 + 其他异常→500+日志
   - complete_direct_upload: file_exists() 异常捕获→503(之前未捕获→500)
   - upload_asset: upload_file() 异常捕获→503/500+日志(之前未捕获→500)

2. storage.py — OSSStorageService.__init__ 添加启动诊断日志
   - 凭证缺失时记录 missing env vars
   - oss2 SDK 未安装时记录错误
   - bucket 初始化成功/失败时记录

3. health.py — /ready 端点增加 OSS 检查
   - 检查凭证是否配置
   - 检查 oss2 SDK 是否可用
   - 调用 get_bucket_info() 验证连通性

部署后请调用 GET /api/v1/ready 查看 OSS 状态
2026-06-30 09:56:20 +08:00
Audit Bot e6ecce79ee fix: rename OSS_DIRECT_UPLOAD_EXPRESS_SECRET to OSS_DIRECT_UPLOAD_EXPIRE_SECONDS
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Root cause of upload endpoint 500 errors:
- config.py defined OSS_DIRECT_UPLOAD_EXPRESS_SECRET (wrong name)
- upload.py accessed settings.OSS_DIRECT_UPLOAD_EXPIRE_SECONDS (correct name)
- AttributeError on every call to prepare_direct_upload → 500

This fixes both /api/v1/upload/prepare-direct-upload and any other
upload endpoints that reference the expire seconds config.
2026-06-30 09:24:27 +08:00
Audit Bot 304354208a fix(assets): add project_id to OSS direct upload and align size limit to 2048MB
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P1: prepareDirectUpload and completeDirectUpload now require project_id,
uploadAssetDirect calls getOrCreateDefaultProject() to obtain it automatically.
P2: MAX_FILE_SIZE changed from 2*1024^3 to 2048*1024*1024 to align with
backend OSS_DIRECT_UPLOAD_MAX_MB=2000.
2026-06-30 00:07:27 +08:00
Audit Bot b5e27a5e9e feat(assets): add 2GB file size validation and OSS direct upload for large files
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- Add MAX_FILE_SIZE (2GB) validation in handleUpload with friendly error message
- Route files >100MB through OSS presigned direct upload (uploadAssetDirect)
- Keep small file form upload (uploadAsset) for files <=100MB
- Update upload hint text to show '单文件不超过 2GB' limit
- Add directUploadMutation with proper loading state tracking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 22:13:08 +08:00
Audit Bot b98c83582b fix: 上传文件大小限制从 800MB 提升至 2000MB
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0 修复:
- config.py: OSS_DIRECT_UPLOAD_MAX_MB 默认值从 800 改为 2000
- config.py: 添加 AliasChoices 支持 MAX_UPLOAD_SIZE_MB 环境变量
  (.env.production 中 MAX_UPLOAD_SIZE_MB=2000 现在可被正确读取)

P1 修复:
- infra/nginx/xiaoxia-saas.conf: client_max_body_size 800m → 2g(3处)
- infra/docker/nginx-production.conf: client_max_body_size 800m → 2g
2026-06-29 22:11:22 +08:00
Audit Bot f9e8d6efdc fix: 修复 3 个 P0 端点 500 错误的真正根因
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Bug 1 — GET /api/v1/assets → 500:
  asset_repository 所有方法为 async def,但调用方为同步上下文,
  未 await 导致返回 coroutine 对象而非实际数据。
  修复:全部改为 def(同步),与 SQLAlchemy 同步 Session 一致。

Bug 2 — POST /api/v1/generation/tasks → 500:
  GenerationTaskModel 仍定义 edit_plan_id 列,但迁移 011 已从数据库
  删除该列,INSERT 时报 column does not exist。
  修复:从 model、repository、domain entity、application use case、
  所有路由中彻底移除 edit_plan_id 引用。

Bug 3 — GET /api/v1/dashboard/overview → 500:
  generation_task_repository._to_domain() 访问 model.edit_plan_id,
  该列已被迁移 011 删除,触发 AttributeError。
  修复:同上,移除 edit_plan_id 引用。

涉及文件:
  - packages/adapters/sqlalchemy_impl/asset_repository.py (async→sync)
  - packages/ports/asset_repository.py (async→sync 接口)
  - packages/adapters/sqlalchemy_impl/models.py (移除 edit_plan_id 列)
  - packages/adapters/sqlalchemy_impl/generation_task_repository.py
  - packages/domain/generation_task.py
  - packages/application/generation_tasks.py
  - apps/api/app/api/routes/generation_tasks.py
  - apps/api/app/api/routes/task_center.py
2026-06-29 20:10:51 +08:00
Audit Bot d2578a9093 fix: PR#112 P2 建议修复
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P2-1: list_by_user[:5] → list_recent_by_user(user_id, limit=5) SQL层LIMIT
P2-2: DashboardOverviewResponse 补充 subscription 字段(plan + is_active)

- packages/ports/generation_task_repository.py: 新增 list_recent_by_user
- packages/adapters/sqlalchemy_impl/generation_task_repository.py: 实现
- apps/api/app/schemas/dashboard.py: 新增 SubscriptionInfo + subscription 字段
- apps/api/app/api/routes/dashboard.py: 使用新接口 + 填充 subscription
2026-06-29 18:23:49 +08:00
Audit Bot e723025889 fix: 修复 projects 500 + 实现 dashboard/overview 端点
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Bug 1: GET /api/v1/projects → 500
- _to_project_response() 缺少 owner_user_id 和 shared_users 字段
- 补全 ProjectResponse schema 必填字段

Bug 2: GET /api/v1/dashboard/overview → 404
- 新建 dashboard schema + route
- 添加 count_by_user / count_by_project_ids / sum_storage_by_project_ids 仓储方法
- 注册 /api/v1/dashboard 路由
2026-06-29 18:12:39 +08:00
Audit Bot 265e49587f fix: tasks.ts 类型定义对齐后端 schema(P2 修复)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- CreateGenerationTaskResponse: task_id→id, message→error_message, 补全所有字段
- TaskItem: 补充 project_id, template_id 字段

对齐后端 GenerationTaskResponse 和 UserTaskResponse schema
2026-06-29 17:39:47 +08:00
Audit Bot c2a522babf fix: tasks.ts mock → 真实 API 迁移,对接后端方案 A(PR #109)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- createGenerationTask: 关闭 mock,调用 POST /generation/tasks
- getUserTasks: 关闭 mock,调用 GET /tasks(用户级列表)
- retryTask: 关闭 mock,调用 POST /tasks/{task_id}/retry
- 删除所有 mock 数据和 USE_MOCK 开关
2026-06-29 17:29:56 +08:00
xiaoxia 35446732ea Merge pull request 'feat: 扩展生成任务API支持模板模式(方案A)' (#109) from feat/generation-api-extension into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-29 17:29:06 +08:00
Audit Bot d2097744e4 fix: retry 端点增加归属校验 (P1 安全修复)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- generation_tasks.py: retry_generation_task 增加 created_by_user_id 校验
- task_center.py: retry_task_by_id 增加 created_by_user_id 校验
- 非任务创建者返回 403 Access denied
2026-06-29 17:19:13 +08:00
Audit Bot ea9e536740 feat: 扩展生成任务API支持模板模式
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
方案A: 后端扩展3处API改动,支持前端模板中心化模型。

1. POST /api/v1/generation/tasks — project_id改为可选,新增template_id/asset_ids/title_ids/voice_ids
2. GET /api/v1/generation/tasks + GET /api/v1/tasks — 新增用户级列表(跨project)
3. POST /api/v1/tasks/{task_id}/retry + POST /api/v1/generation/tasks/{task_id}/retry — 简化重试

改动涉及:
- Domain: GenerationTask新增6个字段,放宽create()校验
- Application: CreateGenerationTaskCommand新增字段
- Ports: GenerationTaskRepository新增list_by_user()
- Adapter: SQLAlchemy模型+仓储实现新字段和list_by_user
- Schema: 双模式校验(project模式/模板模式)
- Routes: generation_tasks + task_center双路由注册
- Migration: 015_add_generation_task_extensions

向后兼容:所有旧端点和参数不变。
2026-06-29 17:05:53 +08:00
CI Test 8c678b9cd0 fix: TypeScript类型错误修复 - warning→warnings, seg.id非空断言
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-29 16:40:06 +08:00
xiaoxia 8c4c428cdc fix(api): editingPlanner 对接后端 /templates API,删除遗留 editPlans.ts (#108)
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Squash merge PR#108
- editingPlanner.ts: mock → 真实 /templates API(7个函数)
- editPlans.ts: 已删除
- 代码审计通过
2026-06-29 16:33:23 +08:00
xiaoxia 9631272cfb Merge pull request 'feat: 剪辑计划编辑器前端实现' (#106) from feat/editing-planner-frontend into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Tests / lint (pull_request) Failing after 237h12m30s
Tests / test (pull_request) Failing after 237h13m33s
2026-06-29 15:28:45 +08:00
Audit Bot 067439a1dd fix: 修复 PR#106 代码审计问题
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0-1: TemplateMode 改为英文枚举值(pip/voice_over/one_take/voice_pip),显示层通过 MODE_LABELS 映射中文
P0-2: EditingPlanner 通过 useSearchParams 读取 ?template=xxx&generate=1,自动加载模板并打开发成弹窗
P1-3: 848行组件拆分为 5 个子组件(TemplatePanel/TimelinePanel/SettingsPanel/SaveModal/GenerateModal)
P1-4: GenerateFromTemplatePayload voiceover_id(string) → voiceover_duration(number)
P1-5: SaveModal 分类字段 Input → Select,关联后端 categories API
P1-6: SaveTemplatePayload 补充 estimated_duration 字段
P2: TimelinePanel Slider 约束 min≤max

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 15:18:33 +08:00
Audit Bot 9b6a0b8b14 fix: 修复代码审计5个问题 (P0-1,P0-2,P1-3,P1-4,P1-5)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0-1: 剪辑模式使用 EditingMode 枚举,移除硬编码字符串
  - voice_over_mix → voice_over, person_narration → voice_pip
  - use_cases.py 导入 EditingMode 枚举替代硬编码 VALID_MODES

P0-2: 补充 packages/application/template/__init__.py

P1-3: Use Cases 依赖 TemplateRepositoryPort 而非 SQLAlchemyTemplateRepository

P1-4: generate 端点重命名为 validate(只校验不生成)
  - GenerateFromTemplateUseCase → ValidateTemplateUseCase
  - POST /{id}/generate → POST /{id}/validate

P1-5: 软删除模板时级联清理关联 segments,避免孤儿数据

测试全部通过 (21/21)
2026-06-29 14:44:24 +08:00
Audit Bot fff47a7a3d feat: 剪辑计划编辑器前端实现
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 新增剪辑计划编辑器页面 (三栏布局)
  - 左侧:模板面板(搜索/筛选/加载模板)
  - 中间:预览区 + 时间线(片段拖拽排序)
  - 右侧:标题/字幕/BGM 设置面板
- 支持 4 种模式切换(画中画/人物口播/一镜到底/口播+混剪)
- 新增「我的模板」页面(卡片视图/编辑/复制/删除/生成)
- 新增 API 模块(mock 数据,后端就绪后替换)
- 更新路由和导航菜单

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 14:35:27 +08:00
Audit Bot 62c8d1cdff feat: 剪辑计划编辑器后端 — 模板 CRUD + 分类 + 生成校验
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- domain: Template, TemplateSegment, TemplateCategory 实体
- ports: TemplateRepositoryPort Protocol
- adapters: SQLAlchemyTemplateRepository + 3 个 ORM Model
- application: CRUD use cases + GenerateFromTemplateUseCase
- 业务规则: one_take=1片段, voice_over_mix=每段需material_type, 配音±30%警告
- schemas: Pydantic request/response models
- routes: /api/v1/templates CRUD + /generate + /categories
- alembic: 014_add_template_tables (templates/template_segments/template_categories)
- tests: 21 个单元测试全部通过
2026-06-29 14:14:58 +08:00
xiaoxia 2849aef47e Merge pull request 'feat: 配方复用功能后端实现' (#102) from feat/recipe-reuse-backend into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Tests / lint (pull_request) Failing after 240h12m11s
Tests / test (pull_request) Failing after 240h13m13s
2026-06-29 12:32:50 +08:00
Audit Bot f2e123a017 feat: 配方复用功能后端实现
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- domain: Recipe/RecipeItem 实体
- ports: RecipeRepository Protocol
- adapters: SQLAlchemy RecipeRepository 实现 + ORM models
- application: 6个 UseCase (CRUD + Use) + Commands
- API: 6个端点 POST/GET/PATCH/DELETE /recipes + POST /recipes/{id}/use
- feature flag: recipe_reuse 仅 basic/premium 可用
- Alembic 迁移: recipes + recipe_items 表
- 单元测试: 覆盖所有 UseCase
2026-06-29 10:59:05 +08:00
Audit Bot 53910e5f20 fix: 前端交互全面审计 — 上传422修复 + 进度反馈 + 防重复提交
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
🔴 P0 Bug:
- AssetLibrary: handleUpload 补充 project_id,调用 getOrCreateDefaultProject() 解决 422

🟡 P0 交互:
- AssetLibrary: 上传时显示 Spin + 禁用 Dragger + 文案提示「正在上传」
- client.ts: 新增 413/415/503 状态码专属提示

🔵 全面交互排查:
- GeneratePage: 生成中禁用步骤导航按钮防误操作
- Billing: 自动续费 Switch 添加 loading 状态防连点
- TemplateLibrary: 收藏按钮 mutation 进行中 disabled 防重复
- TitleLibrary: 空状态增加「新建标题」和「批量导入」引导按钮
2026-06-29 10:48:39 +08:00
Audit Bot fb935981a5 fix: P1 防止全局拦截器与组件 onError 双重 toast
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 所有 React Query onError 中的 message.error 添加 __msgShown 检查
- 所有 try/catch 中的 message.error 添加 __msgShown 检查
- 涉及 14 个页面文件:AssetLibrary, TitleLibrary, VoiceLibrary,
  DuplicationUpload, TaskHistory, GeneratePage, ProductLibrary,
  Billing, UpgradeSubscription, Login, Register, ForgotPassword,
  ResetPassword, TemplateLibrary
- 修复 TemplateLibrary 缺少 message import 的问题

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 09:42:37 +08:00
Audit Bot 4143018faa fix: 全面补充前端交互状态反馈
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- client.ts: 添加全局错误拦截器,自动提取后端 detail/message/msg 字段展示 toast
  - 处理网络异常、超时、5xx 等场景
  - 通过 __msgShown 标记避免与组件 onError 重复弹提示
- 6 个 delete mutation 补充 onError 回退提示(AssetLibrary、TitleLibrary、
  VoiceLibrary、ProductLibrary、DuplicationResults×2)
- GeneratePage: 5 个 query 增加 loading + error 状态展示
- TemplateLibrary: favMutation 增加收藏/取消收藏成功提示及失败回退
- Dashboard: 增加 isError 错误状态展示,避免静默显示全零数据
- DuplicationDetail: 增加 isError 状态,区分加载失败与记录不存在
2026-06-29 09:35:08 +08:00
xiaoxia 6190752bb3 Merge pull request 'fix: 素材库新建自动获取/创建默认项目以提供 project_id' (#94) from fix/asset-library-project-id into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Tests / lint (pull_request) Failing after 243h20m43s
Tests / test (pull_request) Failing after 243h21m45s
2026-06-29 09:11:06 +08:00
Audit Bot 5eacac3abf fix: 修正 getProjects 响应解析 — 后端返回 {items:[...]} 而非裸数组
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- BackendProjectResponse 对齐后端 ProjectResponse(仅 id/name/description)
- getProjects 改为 response.data.items 解析
- 修复代码审计 PR#94 审查发现的 P0

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 07:25:41 +08:00
Audit Bot 841b501c30 fix: 素材库新建自动获取/创建默认项目以提供 project_id
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 新增 api/projects.ts:项目 API 模块,含 getOrCreateDefaultProject
- 修改 createAssetLibrary:自动解析 project_id 再发送请求
- 后端 CreateAssetLibraryRequest 要求 project_id,前端之前未发送导致 422
- 修复 P0:新建素材库点击确定无响应

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-28 22:01:38 +08:00
API文档维护Agent 573e4485b7 fix: 同步改进CORS配置 - 始终包含生产域名
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
与main分支PR #93保持一致:无论CORS_ORIGINS_RAW环境变量是否设置,
都确保 https://saas.xiaoxiajianji.com 在allow_origins中。
2026-06-28 21:59:39 +08:00
xiaoxia 2ee3992a94 Merge pull request 'fix: 修复标题库新建/编辑功能 — 前后端字段名不匹配导致422' (#90) from fix/p0-create-titles-assets into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-28 21:39:32 +08:00
API文档维护Agent 47533e7037 fix: 修复标题/配音创建500、素材库列表500、CORS缺失
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- titles.py/voices.py: get_by_id → find_by_id(方法名错误导致AttributeError)
- project_repository.py: cast shared_users to JSONB for @> operator(JSON列不支持@>)
- main.py: CORS allow_origins 添加 https://saas.xiaoxiajianji.com
2026-06-28 21:33:07 +08:00
Audit Bot 54cbfe2adf fix: 修复标题库新建/编辑功能 — 前后端字段名不匹配导致422
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
根因:前端发送 { content, category } 但后端 CreateTitleLibraryRequest
期望 { name (必填), text (必填), category }。字段名不匹配导致
Pydantic 校验失败返回 422,modal 不关闭,数据不保存。

修复:
- api/titles.ts: 请求时将 content 映射为 text + 自动截取 name
- api/titles.ts: 响应时将后端 text 字段映射回前端 content
- api/titles.ts: updateTitle 改用 PUT(后端实际方法)
- 页面代码无需改动,映射在 API 层透明处理

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-28 21:28:55 +08:00
CI Test a0d552c91a fix: remove unused formatAmount to fix web build error
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-28 21:10:43 +08:00
CI Test c7027c07d1 feat(subscription): 对接后端订阅API,移除mock数据
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
2026-06-28 20:15:36 +08:00
API文档维护Agent 25ce4830a6 fix: 禁用 redirect_slashes 修复 307 重定向导致前端新建失败
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- FastAPI 初始化添加 redirect_slashes=False,避免反向代理后
  307 重定向 URL 丢失 HTTPS 协议
- 移除 titles.py/voices.py/generation_tasks.py 路由中的尾斜杠
  ('/' → '','/tasks/' → '/tasks','/tasks/{id}/results/' → '/tasks/{id}/results')

Fixes: 前端调用 POST /api/v1/titles 等接口时 307 重定向到 http:// 导致失败
2026-06-28 18:54:27 +08:00
xiaoxia ce25bacbac Merge pull request 'fix: 查重上传接口错误信息不再泄露内部异常(安全审计 P1)' (#82) from fix/p1-duplication-error-info-leak into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-28 18:35:41 +08:00
xiaoxia a55a30b085 Merge pull request 'feat: Phase 2 订阅管理后端 API' (#78) from feat/phase2-subscription-api into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-28 18:35:41 +08:00
API文档维护Agent 06f0b9cc46 fix: 修复订阅API的3个P0问题
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0-1: 修复错误的导入路径
  - from app.database import get_db → from app.dependencies import get_user_repository
  - 移除不存在的 Session 依赖

P0-2: 修复直接修改 dataclass 的问题
  - 使用 dataclasses.replace() 创建新实例
  - 通过 UserRepository.save() 持久化更改
  - 更新 UserRepository 以支持订阅字段的读写

P0-3: 移除不存在的 quota_registry 模块
  - 硬编码配额定义 PLAN_QUOTAS
  - free: 3项目/10GB, standard: 10项目/50GB
  - pro: 无限项目/100GB, enterprise: 无限项目/1000GB

额外:
- 添加支付验证 TODO 注释(方案C)
- 更新 UserRepository.save() 保存订阅相关字段
- 更新 UserRepository._to_entity() 读取订阅相关字段
2026-06-28 18:26:01 +08:00