feat: prompt review gate, ComfyUI error surfacing, saved scene setups (1.3.0)

Issues #27/#33/#28. Generate now resolves the prompt first (saved draft
or H3 rewrite) and opens an editable review modal before enqueueing;
job history drawer shows each render's exact payload with copy-to-form.
ComfyUI 400s surface error.type + per-node messages; audio uploads go
flat and VHS audio: widgets are patched. Per-scene video settings
persist via scenes.video_settings_json (additive migration) and batch
generate honors them. Version bumped to 1.3.0.
This commit is contained in:
Benjiyaya
2026-08-31 03:20:25 +08:00
parent 792e9c57b1
commit 9c8ea8f28f
22 changed files with 1697 additions and 56 deletions
+23 -2
View File
@@ -104,8 +104,15 @@ export interface Settings {
dry_run: boolean;
}
import type { Job, Scene, Workflow, ComfyDynamicInput, ComfyDynamicOutput } from './comfy/types';
export type { Job, Scene, Workflow, ComfyDynamicInput, ComfyDynamicOutput };
import type {
Job,
Scene,
SceneVideoSettings,
Workflow,
ComfyDynamicInput,
ComfyDynamicOutput,
} from './comfy/types';
export type { Job, Scene, SceneVideoSettings, Workflow, ComfyDynamicInput, ComfyDynamicOutput };
async function api<T>(path: string, init?: RequestInit): Promise<T> {
const res = await fetch(`${API_BASE}${path}`, {
@@ -274,12 +281,26 @@ export const jobsApi = {
scene_ids?: number[];
workflow_id?: number;
input_values?: Record<string, unknown>;
prompts?: Record<string, string>;
} = {},
) =>
api<{ ok: boolean; jobs: Job[] }>(`/api/jobs/projects/${projectId}/generate-videos`, {
method: 'POST',
body: JSON.stringify(payload),
}),
previewPrompt: (
projectId: number,
payload: { scene_id: number; workflow_id?: number },
) =>
api<{
prompt: string;
profile: string;
from_draft: boolean;
based_on: string;
}>(`/api/jobs/projects/${projectId}/preview-prompt`, {
method: 'POST',
body: JSON.stringify(payload),
}),
exportFilm: (projectId: number) =>
api<{ ok: boolean; job: Job }>(`/api/jobs/projects/${projectId}/export`, { method: 'POST' }),
};