docs(design): record video preparation integration
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

This commit is contained in:
2026-09-16 16:07:21 +08:00
parent 1acca836fe
commit c878ba940c
4 changed files with 79 additions and 5 deletions

View File

@@ -2,16 +2,19 @@
## Status
Accepted / implemented, amended 2026-09-07
Accepted / implemented, amended 2026-09-16
Amended on 2026-09-07 to define operation-scoped public activity as transient
presentation state beneath the matching optimistic user message.
Amended on 2026-09-16 to prepare a coherent video draft before quotation and expose
an explicit starting-image binding with capability-driven controls.
## Date
2026-08-30
Last amended: 2026-09-07
Last amended: 2026-09-16
## Context
@@ -48,6 +51,15 @@ are expressed through public Prompt aliases bound to canonical Assets.
plan, warnings, expiry, and Token Point amount and confirms only the Quote ID.
Provider prompts, models, routing, storage, safety evidence, and billing atoms stay
server-private.
- Before requesting a Quote, the client applies `prepare_generation` through the
same Main-owned input contract and uses the returned current revision. Preparation
never fabricates a chat Turn or confirms paid generation. A definitive preparation
failure stops quotation even when a live blocker event was missed; transport-unknown
recovery keeps the original operation identity.
- Media availability, ratios, duration and output limits come from the server's
per-medium `generation_options`, not invented client defaults. The selected
supported duration must be saved, not merely displayed. Semantic video motion is
arranged by the server Reasoner and the returned creator prompt becomes visible.
- Electron Main is the only Canvas network authority. Development and packaged
builds use the Works Square V2 contract; there is no V1 DTO adapter, local semantic
adapter, mutable Quote PATCH, editable provider Prompt, or cloud-failure fallback.
@@ -59,8 +71,11 @@ are expressed through public Prompt aliases bound to canonical Assets.
- The public `content.concept` projection is the directly editable final Prompt.
References retain stable reference IDs and typed Workspace Asset bindings while
appearing in that Prompt as continuous `@图片N` aliases. The Prompt is the only
visible expression of how a reference affects generation; the adjacent row manages
binding/file state only. An unbound referenced alias blocks Quote availability and
visible expression of creative reference intent; the adjacent row manages
binding/file state and explicitly selects the video starting image. That selection
binds both `first_frame` role and Asset identity, independently of an alias token.
Unsupported retained references remain visible until the user explicitly changes
or unbinds them; their Assets are never silently deleted. An unbound referenced alias blocks Quote availability and
exposes a targeted upload slot.
- Prompt, reference binding, type, aspect-ratio, duration, or output-count changes
enter the existing typed reducer and create a new Specification revision. An offered
@@ -94,6 +109,10 @@ and uncertain retries auditable without exposing provider internals.
## Related
- Video preparation source `1acca836fe035dd462110cdc7683645c1e031f54`, task
`20260916-design-media-client-a7d3e9c1`, integrated by
`20260916-merge-design-video-client-4f6d28a1` with matching server
`1a3df8df08033adb2bec8d268ca2c18e7b785e1e`.
- Client source `b0b5a602b501308a23eb27e2f51a5169b9e46b1e`
- Server source `b5351d54f595ce8eb873593e462e4a556bea0b05`
- Server ADR `ADR-2026-08-28-001`

View File

@@ -4,6 +4,16 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
## Integrated Through
- 2026-09-16任务 `20260916-merge-design-video-client-4f6d28a1` 将 Design 视频准备源
`1acca836fe035dd462110cdc7683645c1e031f54`(源任务
`20260916-design-media-client-a7d3e9c1`)从 `b723c722` 无冲突快进合入本地 `main`
视频开始画面有明确绑定入口真实分媒体能力驱动参数prepare 成功后才按最新 revision
请求 Quote明确失败阻断报价用户确认仍是唯一生成授权。历史视频支持原生 controls、
放大预览和下载,历史图片可明确用作视频开始画面。主目录 76 项相关单测、2 项跨仓流程、
类型检查和 Vite Renderer/Main/Preload/utility 构建通过;产品文件与源一致,源记录原样导入,
三份原有未跟踪任务文档保持不变。未推送、打包或部署;跨仓测试使用模型/报价等夹具,
真实短视频生成和播放字节仍待成对发布后单独验收。
- 2026-09-15任务 `20260915-merge-image-preview-56ab481e` 将图片预览源 `41664b2ae3b1139f7f00401e2aeb5b483319d29e` 无冲突合入本地 `main`,合并提交 `9b64dd9b3917999fd1f10683ee78ac1746de6f81`。AI 设计任务图片新增放大查看,支持完整适配窗口、原始尺寸滚动、关闭/Esc 和焦点返回桌面与紧凑布局共用且不触发下载Main-owned Asset 契约保持。合并后的类型检查、31 项相关单测、Vite 全目标构建和 Windows Electron 交互验收通过;产品及源任务记录与已验证源一致,三份原有未跟踪文档原样保留。用户授权的旧 Agent-tabs 残留目录已改名 `.retained` 保留,并用 bundled scripts 恢复登记。未推送、打包或安装;详见[集成记录](tasks/20260915-merge-image-preview-56ab481e.md)。
- 2026-09-15任务 `20260915-merge-agent-tabs-2fd41184` 经用户确认登记移交,将源 `868ab54be6575ea6bd170d2ece7b7c8d4f6c0007` 无冲突快进合入本地 `main`。智能体编辑区改为“我的要求”与“高级设置”双 Tab选中态与方向键切换明确高级分类记忆、切换回顶、未保存输入及试用状态保留。产品树与已验证源一致沿用 47 项相关单测、类型检查、scoped lint、Vite 全目标构建及 Electron 交互验收,详见[源任务](tasks/20260915-agent-editor-tabs-8c46f6f5.md)。源记录原样导入,三份原有未跟踪文档保留;未推送、打包或安装客户端。

View File

@@ -0,0 +1,44 @@
# Task: Integrate Design video preparation into main
## Identity
- Task ID: 20260916-merge-design-video-client-4f6d28a1
- Mode: Integration
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit: b723c7220bfbc4922f5b25265ac7e64306cb6347
- Owner: codex
- Status: Ready for Integration
## Scope
- Integrate the completed Design video preparation source 1acca836fe035dd462110cdc7683645c1e031f54 into local main and reconcile its accepted Design contracts. Own only this integration record and relevant canonical Design memory; imported source records remain unchanged.
## Intent And Constraints
- User explicitly authorized releasing old task 20260915-merge-image-preview-56ab481e, adopting this root while preserving its 3 known foreign documents, and releasing this integration ownership after completion. No push, deployment, paid generation or worktree deletion is authorized.
- Concurrent and Planning Gates passed: exclusive integration ownership matches this root/branch/base; entry, source outcomes, Design ADR, domain, architecture and relevant evidence/commitment context were loaded. Historical peer records remain read-only; placeholder scopes are unknown and are not integration sources.
- Preserve Current Specification authority, immutable revision-bound Quote and explicit confirmation. Preparation does not create chat Turns or paid media Tasks. Source and client/server counterparts must be released together.
- Preserved foreign paths: .project-docs/30-worklog/tasks/20260901-package-122-c5e8.md, .project-docs/30-worklog/tasks/20260901-package-123-d7f3.md, .project-docs/30-worklog/tasks/20260902-client-hang-diagnosis-a47c9e2b.md. Their original bytes and index state are retained; never stage them.
## Outcome
- Fast-forwarded local main from b723c7220bfbc4922f5b25265ac7e64306cb6347 to exact source 1acca836fe035dd462110cdc7683645c1e031f54; no merge conflict or product rewrite. Source task record imported unchanged from its retained branch.
- Promoted the user-approved preparation/capability/binding contract to the accepted Design ADR and domain rules and recorded source provenance in current-state. This clarifies the explicit video starting-image selection; it does not introduce another semantic authority or bypass confirmation.
- The 3 known foreign dirty documents remain outside staging and are retained. User-authorized integration ownership release is performed only after final documentation/commit checks.
## Verification
- Root verification after fast-forward: five related unit files, 76 tests passed in 4.48s. pnpm run typecheck and pnpm run build:vite passed; Renderer/Main/Preload/utility targets built successfully. Existing Browserslist, mixed-import and chunk-size warnings remain. No installer packaging or Electron E2E run in this integration.
- Paired main-branch verification: DESIGN_DIAGNOSTIC_SERVER points to the actual server master root; the client diagnostic passed 2 tests in 13.31s. Actual React/store preparation commands reach the real Python Workspace/compiler bridge, with zero blockers before quotation; the test then explicitly confirms. Separate backend lifecycle coverage proves persisted Task execution and ready Asset projection with provider/storage/ledger fixtures.
- Tests do not establish real model quality, installed-app WebSocket transport, production staging/storage or MP4 decoding. No live model/provider, paid generation, push or deployment was performed.
- check_project_docs, task-aware check_doc_drift and git diff --check passed. Product/index comparison against the exact source is empty; all 3 preserved foreign files match their pre-adoption bytes and none are staged. Source worktree is clean and its latest HEAD is now included in the local main branch.
## Follow-ups
- After paired deployment, separately authorize a real short-video acceptance covering image staging, model output, ingestion and actual playback. Local fixture-backed tests do not prove production availability.
- Source worktree cleanup offered with its full path/branch; awaiting confirmation. Retain its checkout, branch and commits unless separately approved. This does not hold up the completed merge.
## Promotion Candidates
- Applied the completed source's accepted Design preparation proposal without changing unrelated product direction. Source task files remain read-only.

View File

@@ -156,12 +156,13 @@
- Main 只向 Renderer 投影已知错误码的固定中文提示未知上游错误文本必须脱敏为通用提示Works Token、stream ticket、provider internals 留在 Main/服务端。
- AI 绘画 Workspace JSON 请求与 shared Works token refresh 必须覆盖取凭据、发请求和读取响应 body 的完整 30 秒 deadline即使底层 transport 忽略 abort调用方也必须确定性结束为 `504 DESIGN_WORKSPACE_REQUEST_TIMEOUT` 并释放共同等待者。Electron-to-Node 透明 fallback 仅允许 `GET`/`HEAD`/`OPTIONS`mutation 不得因 transport failure 被隐式重放,任何重试必须由上层显式幂等合同授权。
- `design.quote.request` 必须绑定 exact current Specification revision 并返回 immutable Quote任何 production-meaning edit 都需要新 revision 与新 Quote。对话或 Current Specification 就绪态可以引导用户请求并查看 Quote桌面端可定位到报价区、移动端可打开报价面板但该动作不得创建 Task。
- Quote 前先通过同一 Main-owned 输入协议执行 `prepare_generation`,并使用返回的最新 revision明确失败必须停止报价不能因未收到实时 blocker 事件而使用旧方案。准备不生成聊天消息或付费任务;视频运动由服务端模型整理,返回的创作提示词必须同步展示。类型、画幅、时长和数量只使用服务端分媒体 `generation_options`,不能只显示却不保存时长或自行假定可用能力。
- `design.generation.confirm` 只提交用户明确确认的 Quote identity。客户端不编辑 provider Prompt/model/route/storage不计算 Token Points也不把聊天就绪文案、Quote 展示、重复点击或 Task recovery 当作生成授权。
- 图片/视频 source 必须是当前 Workspace 的 canonical Asset并通过 typed binding 进入 Specificationmedium/role 决定用途,不得从 quick-reply 文案、V1 Brief 或本地路径推断。
- Task/Asset reconciliation 只能更新 Workspace resources已经落库但事件迟到的 Task 可通过 refresh 恢复,不能覆盖 Living Form、local drafts 或 pending Design input。
- 删除 Canvas 项目必须要求用户完整输入项目名并通过 Main-owned Workspace DELETE。成功后被删 Workspace 的会话、任务和资产不得继续留在 Renderer 可访问状态;服务端决定软删除、任务取消、预留积分释放和运行中任务结算。
- Canvas 桌面布局把 conversation 与唯一 active 制作方案放在中央,把 Workspace 选择/创建/删除放在 320340 px 全高右侧 Works rail紧凑布局使用同一个右侧 Sheet。Canvas 路由不挂载全局左栏,也不得恢复“获取灵感”入口。
- Active 制作方案的 `content.concept` 是用户可直接编辑的最终 Prompt。Reference 通过稳定 reference ID、真实 Workspace Asset binding 和连续 `@图片N` alias 关联Prompt 是“图片如何影响生成”的唯一可见表达binding row 只能管理缩略图、alias、文件与替换/删除状态,不得重复 purpose/preserve/style/strength 编辑器。
- Active 制作方案的 `content.concept` 是用户可直接编辑的最终 Prompt。Reference 通过稳定 reference ID、真实 Workspace Asset binding 和连续 `@图片N` alias 关联Prompt 表达创意用途binding row 管理缩略图、alias、文件与替换/解绑状态,并允许明确选择“视频开始画面”。开始画面必须同时绑定 `first_frame` role 与 Asset identity“已选用”不能根据文本 alias 推断。不支持的引用保留并提示用户明确调整/解绑,不删除 Asset不得重复 purpose/preserve/style/strength 编辑器。
- 引用了未绑定 alias 时必须显示对应上传位并阻止 Quote 请求/确认。添加、替换、删除 reference 必须通过既有 typed operations 形成新 Specification revision删除同时清理 binding 并重排后续 alias已有 alias 不重复插入。Reference 数量/媒体上限只能来自服务端能力,不得复制外部参考产品的硬编码限制。
- Prompt Museum 已退出当前产品面Canvas 不显示入口App 不挂载或打包其 Renderer 页面,历史 `/image-prompts` 路由只返回 `/image-canvas`。未经新的明确产品决策,不得恢复入口或页面。
- Dormant Prompt Museum Main API/auth/media validation 和共享 DTO 可为兼容/安全保留,但 Works Token、内部路径或用户隐私仍不得进入 Renderer保留代码不代表服务端内容、授权或产品入口已启用。