feat: direct-execute pipeline follow-up actions
Some checks failed
StoryForge CI / Baseline checks (push) Has been cancelled
StoryForge CI / Backend tests (push) Has been cancelled
StoryForge CI / Web tests (push) Has been cancelled

This commit is contained in:
kris
2026-04-05 07:45:45 +08:00
parent 10b3c0cf42
commit 696f90b3fe
3 changed files with 24 additions and 2 deletions

View File

@@ -205,13 +205,13 @@ const PIPELINE_GUARDS = {
aiVideo: {
label: "AI 视频",
openAction: "open-ai-video",
jobAction: "job-to-ai-video",
jobAction: "direct-create-ai-video",
dependencies: ["n8n", "huobao"]
},
realCut: {
label: "实拍剪辑",
openAction: "open-real-cut",
jobAction: "job-to-real-cut",
jobAction: "direct-create-real-cut",
dependencies: ["n8n", "cutvideo"]
}
};
@@ -12397,6 +12397,9 @@ document.addEventListener("click", async (event) => {
return;
}
if (name === "direct-create-ai-video") {
if (action.dataset.jobId) {
closeActionModal();
}
await runDirectWorkbenchAction("create-ai-video", {
busyLabel: "正在创建 AI 视频任务...",
errorTitle: "创建 AI 视频任务失败",
@@ -12409,6 +12412,9 @@ document.addEventListener("click", async (event) => {
return;
}
if (name === "direct-create-real-cut") {
if (action.dataset.jobId) {
closeActionModal();
}
await runDirectWorkbenchAction("create-real-cut", {
busyLabel: "正在创建实拍剪辑任务...",
errorTitle: "创建实拍剪辑任务失败",

View File

@@ -394,6 +394,16 @@ test("job detail and follow-up flows use direct generate-copy execution and pers
assert.match(clickActions, /name === "job-to-generate-copy"[\s\S]*runDirectWorkbenchAction\("generate-copy"/);
});
test("pipeline follow-up tags route source-job actions through direct execute handlers", () => {
const pipelineGuards = extractBetween(APP, "const PIPELINE_GUARDS = {", "const ONELINER_INTENT_LABELS = {");
const clickActions = extractBetween(APP, "document.addEventListener(\"click\", async (event) => {", "document.addEventListener(\"submit\", async (event) => {");
assert.match(pipelineGuards, /jobAction:\s*"direct-create-ai-video"/);
assert.match(pipelineGuards, /jobAction:\s*"direct-create-real-cut"/);
assert.match(clickActions, /name === "direct-create-ai-video"[\s\S]*if \(action\.dataset\.jobId\) \{[\s\S]*closeActionModal\(\);/);
assert.match(clickActions, /name === "direct-create-real-cut"[\s\S]*if \(action\.dataset\.jobId\) \{[\s\S]*closeActionModal\(\);/);
});
test("discovery and production screens expose compact mobile flow summaries", () => {
const discovery = extractBetween(APP, "function renderDiscoveryScreen()", "function renderTrackingScreen()");
const production = extractBetween(APP, "function renderProductionScreen()", "function renderReviewScreen()");