refactor: 统一渲染链路,预览即所得(-3370行) (#1479)
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 55s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m13s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 2m43s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 2m46s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 2m51s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 3m6s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m59s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m14s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 30s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m53s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 3m6s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 7m6s
CI/CD Pipeline / Build Staging API Image (push) Successful in 7m12s
AI Code Review / AI Code Review (pull_request) Failing after 6m19s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 39s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 8m57s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 1m2s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 8m55s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m9s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m16s
CI/CD Pipeline / Integration Tests (push) Successful in 3m12s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m13s
CI/CD Pipeline / Unit Tests (push) Successful in 14m24s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 12m30s
CI/CD Pipeline / CI Gate (pull_request) Successful in 8s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 552h54m45s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 552h54m47s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 552h54m46s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 552h54m48s
CI/CD Pipeline / Production Browser E2E (push) Failing after 552h55m35s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 552h54m48s
CI/CD Pipeline / Build Production Web Image (push) Failing after 552h55m37s
CI/CD Pipeline / Canary Release to Production (push) Failing after 552h55m36s
CI/CD Pipeline / Build Production API Image (push) Failing after 552h55m37s
CI/CD Pipeline / Deploy Production (push) Failing after 552h55m36s
CI/CD Pipeline / CI Gate (push) Failing after 552h55m37s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 553h3m51s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 553h3m53s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 553h3m55s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 553h3m57s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 553h7m15s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 553h7m17s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 553h7m21s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 553h8m45s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 553h8m47s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 553h9m58s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 553h8m49s
CI/CD Pipeline / PR Build API Image (push) Failing after 553h10m2s
CI/CD Pipeline / Frontend Lint (push) Failing after 553h10m2s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 553h10m4s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 553h28m38s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 553h29m29s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 553h38m21s
CI/CD Pipeline / PR Build Web Image (push) Failing after 553h43m52s

Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #1479.
This commit is contained in:
2026-08-24 14:16:00 +08:00
committed by auto-approve-bot
parent 73665f0d60
commit c873bb635f
22 changed files with 19 additions and 3500 deletions
+1 -14
View File
@@ -5,7 +5,6 @@
from __future__ import annotations
import json
import logging
from app.auth import AuthenticatedUser, get_current_user
@@ -268,19 +267,7 @@ def create_preview_generation_task(
# 从模板读取 editing_mode / mode 作为 strategy_id(渲染 pipeline 的 mode 参数)
strategy_id = _resolve_strategy_id_from_template(request.template_id, db, user_id)
# 处理标题配置:如果有标题文本,序列化到 custom_title 字段传递给 worker
title_config = request.title_config or {}
title_text = (title_config.get("text") or "").strip()
custom_title_value = ""
if title_text:
# 将标题文本和样式配置序列化为 JSON 存入 custom_title
# Worker 端会解析 JSON 获取完整标题配置
custom_title_value = json.dumps(title_config, ensure_ascii=False)
logger.info(
"[预览生成] 标题配置: text=%s, config_keys=%s",
title_text[:30],
list(title_config.keys()),
)
use_case = CreateGenerationTaskUseCase(generation_task_repository)
@@ -305,7 +292,7 @@ def create_preview_generation_task(
auto_retry_enabled=False,
auto_retry_max=0,
is_preview=True,
custom_title=custom_title_value,
title_config=title_config,
)
)
except ValueError as e: