Files
makelore/.project-docs/30-worklog/tasks/20260818-video-duration-server-config-7b4e.md
brother7 31332f6d76
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled
fix(canvas): use server video duration options
2026-08-18 16:01:34 +08:00

2.8 KiB
Raw Permalink Blame History

Task: Load AI Design video duration options from server

Identity

  • Task ID: 20260818-video-duration-server-config-7b4e
  • Mode: Feature
  • Branch: main
  • Worktree: D:\Datas\OthersProjects\makelore
  • Base commit: 86ffeac066
  • Owner: codex
  • Status: Ready for Integration

Scope

  • Update the AI Design video confirmation card to use the active Quote's server-provided generationOptions.durations for both rendering and validation, removing the client-side 2–6 second range coupling.
  • Add a regression proving an enabled duration outside the former local range is rendered, can be selected, re-quoted, and submitted through the existing confirmation flow.
  • Do not change the API payload or provider contract; the server Quote remains the authority for available and disabled durations.

Intent And Constraints

  • Preserve disabled options and the existing “must re-quote after changing a parameter” behavior.
  • Keep legacy/invalid quotes fail-closed when no enabled server duration is selected; use a server-driven validation message rather than naming a local range.
  • Keep the local preview adapter unchanged; this change targets the cloud Makelore adapter and the shared Quote confirmation UI.

Outcome

  • ImageCanvas now renders enabled video durations directly from the active server Quote's generationOptions.durations.
  • Confirmation validation now accepts only a non-null duration that matches an enabled server option; the previous client-side 2–6 second range check was removed so future server configuration changes do not require a client release.
  • The confirmation error is server-driven and no longer names a local range.
  • Added a regression using server-provided 7 and 15 second options that verifies the options are shown, the initial invalid selection is blocked, 15 survives re-quoting, and the final confirmation receives 15.

Verification

  • Red test: the new regression initially received only ['', '2', '6'], proving the old client-side range filter was still active.
  • pnpm exec vitest run tests/unit/image-canvas-page.test.tsx tests/unit/works-square-design-workspace.test.ts — 79 passed.
  • pnpm run typecheck — passed.
  • pnpm exec eslint src/pages/ImageCanvas/index.tsx tests/unit/image-canvas-page.test.tsx — passed.
  • pnpm run build:vite — passed for Renderer, Electron Main, and Preload; only existing dynamic-import and chunk-size warnings were reported.
  • git diff --check — passed; Git reported only the repository's LF-to-CRLF checkout warnings.

Follow-ups

  • The server must continue publishing a valid enabled duration list in each video Quote; an empty or all-disabled list intentionally keeps confirmation unavailable.

Promotion Candidates

  • None recorded.