2.5 KiB
2.5 KiB
Task: Fix video intent rendering as image confirmation
Identity
- Task ID: 20260818-video-confirm-media-9b7c
- Mode: Feature
- Branch: codex/20260818-video-confirm-media-9b7c-video-confirm-media
- Worktree: D:\Datas\OthersProjects\makelore-video-confirm-media-9b7c
- Base commit:
11b19832a3 - Owner: codex
- Status: Ready for Integration
Scope
- Normalize the server's public generation-option payload for the Electron/Main-to-Renderer shared design contract.
- Support both canonical client options (
value/disabled) and the current server configuration shape (idorseconds/enabled) without changing the Renderer API. - Add a regression proving a video Quote retains its medium and exposes selectable 2/6 second durations.
Intent And Constraints
- The raw trace proves this run reached
medium=videoandbailian_video_direct_v1; the UI failure was caused by option-shape loss, not by a server image decision. - Preserve existing image and legacy conversation compatibility.
- Do not expose provider credentials or change the HTTP API; normalization belongs at the Electron adapter boundary.
Outcome
- Added a typed adapter normalizer that maps
value/id/secondsto the sharedvaluefield and mapsenabled=falsetodisabled=true(while retaining canonical payloads). - The Renderer now receives video durations as numeric selectable options, so the duration control and video confirmation validation can work with the live server response.
- Added a regression test using the server-shaped video options and asserting the mapped video medium, model, and durations.
Verification
pnpm exec vitest run tests/unit/works-square-design-workspace.test.ts— 32 passed.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 electron/image-workspace/works-square-workspace.ts tests/unit/works-square-design-workspace.test.ts— passed.pnpm run build:vite— passed (existing chunk-size and dynamic-import warnings only).git diff --check— passed (only the repository's CRLF conversion warnings).
Follow-ups
- Ship this client commit with the server intent-guard commit; run the packaged desktop smoke test against a live video Quote.
- A future API contract cleanup may make the server publish canonical option names directly, but the adapter normalizer is the compatibility boundary for now.
Promotion Candidates
- None recorded.