2d83b9385c
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 8s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 8s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m33s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 3m26s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 49s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m13s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m37s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m54s
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (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
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 29h56m48s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 29h59m14s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 29h58m34s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 29h58m35s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 29h58m38s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 29h58m38s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 29h58m42s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 29h55m10s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 29h55m52s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 29h58m34s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 29h55m9s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 29h55m50s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 29h56m13s
根因:
1. PR#1918清理模板API时误删了GET /templates中自动创建默认模板的兜底逻辑
2. 前端PR#1913去掉空tid拦截后,首次进入生成页templateId为空,导致URL出现双斜杠
/templates//editor/clips/from-assets → FastAPI返回404
修复:
1. 新增 routes/_default_template.py 共享 get_or_create_default_template_id()
2. GET /templates 在列表查询前调用兜底逻辑,保证新用户总能拿到默认模板
3. dependencies.py 抽出纯函数 resolve_draft_plan_id(),支持空tid自动兜底
4. 新增独立端点 POST /api/v1/clips/from-assets,template_id从body传入(可选)
空时后端自动兜底,彻底规避双斜杠URL问题
5. 保留原 /templates/{template_id}/editor/clips/from-assets 路径兼容旧调用
前端改造指引:useStep2Materials 发from-assets请求时,空tid直接调用新端点
POST /api/v1/clips/from-assets,body中可选传template_id字段。
xiaoxia-saas API
结构
app/core/:配置与基础能力app/api/:路由组织app/schemas/:请求响应模型app/dependencies.py:依赖注入入口main.py:FastAPI 启动入口
当前可用接口
GET /api/healthGET /api/projects?workspace_id=...POST /api/projects