合并 AI 设计多会话客户端
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

整合 Enter 发送与多会话交互,保留服务端持久 Conversation Session,并补齐迁移、回归、Electron E2E 与 canonical 文档。
This commit is contained in:
2026-08-11 16:18:52 +08:00
32 changed files with 2417 additions and 804 deletions

View File

@@ -9,17 +9,21 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
- `1a19ad9` / `f02e99e`:项目真机预览、待审 Release Owner preview 及集成提交。
- `493b31c`:客户端三类 `ProjectType`、小游戏/小程序受控发布模板与自定义项目发布隔离。
- `4df0477` / `8dd99c1`:客户端静态发布唯一链路、旧 Compose 协调链退役及安全边界补强。
- `4980894` / `03dae62`AI 绘画 Enter 发送及同一 Workspace 下的多 Conversation 客户端模型。
## Current Focus
客户端面向非专业用户提供“创建小游戏或小程序 → 项目配置中一键提交 → Main 安全打包上传 → 轮询云端构建 → 运营审核”的唯一创建者链路,并以项目级真机预览完成待审版本扫码验收;自定义和缺少类型字段的旧项目不提供该入口。已发布作品优先使用安全投影后的 `play_url``runtime_url` 仅保留一个客户端版本的兼容回退。
AI 绘画的一个 Workspace 可包含多条 Conversation。消息、Brief、Quote 和 `turnRevision` 随 Conversation 隔离;生成任务和资产保持 Workspace 级共享。每条 Conversation 使用服务端持久 Agent Gateway Session切换会话只重连对应事件流。
## Recently Completed
- 2026-08-08合并登录续期、一键发布和真机预览发布成功后保存精确 app/version/review 映射Renderer 不接触 Token、ZIP 或本地路径。
- 2026-08-08补齐跨平台 Electron E2E fixture、Windows ZIP 预检和异常成功响应安全投影。
- 2026-08-09新建项目支持小游戏、小程序和自定义三类不可变产品类型前两类生成固定 Vite 发布模板,自定义及缺少类型字段的旧项目不显示一键提交入口。
- 2026-08-10删除客户端旧 Compose deploy-check、watcher/arm/upload 协调和手工 ZIP 路由submission binding v2 保留旧 `submitted` 绑定并把旧中间态归一为 `legacy_retired`,同时补齐 Renderer capability、`play_url` 安全投影和本机绑定失败告警。
- 2026-08-11AI 绘画支持在同一设计项目内创建和切换多条独立 Conversation保留项目级任务/资产,并使用 Workspace + Conversation 身份保护异步与流式更新。退出时关闭本地流并清除本地 Session-id 缓存,不删除服务端持久 Conversation Session。
## In Progress
@@ -44,7 +48,9 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
- `works-cloud-deploy.json` 仅是已安装数据的兼容文件名,不代表客户端仍拥有自动部署协调器;旧中间态不得恢复为后台任务。
- 刷新凭据、发布 Token、ZIP、幂等键和重试只能由 Electron Main 持有。
- 本地 `projectType` 只决定产品分流和模板选择,不得作为授权依据或替代 Main/服务端的包体校验。
- AI 绘画消息、Brief、Quote 和 `turnRevision` 必须按 Workspace + Conversation 隔离;任务事件仍按 Workspace 归并,迟到的异步结果不得污染已切换的会话。
- 服务端持久 Conversation Session 不由客户端在注销或退出时删除Main 只关闭本地流、清除本机缓存并撤销本地凭据。
## Last Updated
2026-08-10
2026-08-11

View File

@@ -0,0 +1,67 @@
# Task: Merge all completed code into main
## Identity
- Task ID: 20260811-merge-all-code-a7c91e
- Mode: Integration
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit: 70e0f4054cf88029e3f2f4848e3d17ee3be70b7f
- Owner: codex
- Status: Completed
## Scope
- Integrate every completed local branch whose commits are not already contained by `main`.
- Merge `codex/20260806-design-multisession-ui-4e7d-design-multisession-ui`, which already contains the completed Enter-to-send commit from `codex/design-enter-send-b83f`.
- Preserve all behavior already integrated on `main`, resolve overlapping image-workspace changes semantically, and avoid merging stale or already-contained branches a second time.
- Promote the accepted multi-conversation client-state model into canonical project memory and verify the integrated result.
## Intent And Constraints
- Treat Git ancestry as the source of truth for merge scope: only two local branch tips are not contained by `main`, and the multi-session branch is a strict descendant of the Enter-to-send branch.
- Preserve Main/Host API ownership boundaries, project-scoped generation tasks, Conversation-scoped messages and streams, and the existing release/login behavior already on `main`.
- Do not resolve meaningful conflicts with blanket `ours`/`theirs`; combine both sides according to their domain ownership.
- Use the exact pnpm version pinned by `packageManager` and run focused tests before repository-level verification.
- Keep unrelated historical encoding damage and stale worktrees out of this integration.
## Plan
1. Inspect branch ancestry, overlapping paths, and merge-conflict semantics.
2. Merge the multi-session branch once; resolve conflicts while preserving both feature and integrated-main behavior.
3. Update task-scoped and canonical integration records.
4. Run focused AI Design tests, typecheck, lint, production build, and the full unit suite.
5. Obtain an independent read-only Sol review, finish drift checks, and commit the integration.
## Outcome
- Verified that `03dae62` is a descendant of `4980894`; merging the multi-session branch once integrates both completed branch tips without duplicating Enter-to-send.
- Resolved the only two textual conflicts in the Works Square AI Design adapter and its focused test. Human confirmation selected the persistent Conversation Session model: logout and shutdown close local streams and clear the local Session-id cache without deleting the server-owned Session.
- Integrated Conversation create/read/list routing, Conversation-scoped messages and streams, Workspace-scoped generation tasks, local schema v2-to-v3 migration, and the Canvas/sidebar create-and-switch interactions.
- Added focused API, route, adapter, migration, store, page, and sidebar regressions plus an Electron E2E that creates and switches Conversations while preserving project tasks and isolating messages.
- Updated README and canonical project memory, including ADR-001, architecture/data-flow/domain ownership, the production migration commitment, and stale production-verification state.
- Kept the two source-task records read-only in source commit history instead of copying them into the integration tree, as required by the current project-doc ownership gate.
## Verification
- Branch ancestry: `03dae62` contains `4980894`; no other local branch tip contains commits absent from the integrated merge scope.
- Focused AI Design regressions: 8 files / 116 tests passed.
- `pnpm run typecheck`: passed.
- Scoped ESLint over all changed TypeScript and TSX files: passed.
- `pnpm run build:vite`: passed; Renderer, Main, and Preload production compilation completed.
- New multi-conversation Electron E2E: 1 passed.
- `pnpm test`: 140/142 files and 1506/1508 tests passed. One failure is the pre-existing missing `.opencode/agent` fixture; the OpenCode port-release test timed out only in the parallel full run and passed alone.
- `pnpm run lint:check`: repository baseline remains red on the pre-existing `MainLayout.tsx` state-in-effect rule and unused `rerender` in `chat-command-dialogs.test.tsx`; changed-file ESLint is green.
- `pnpm run test:e2e`: 11 passed / 11 failed. The new multi-conversation spec passes; stale legacy selectors and a missing provider test IPC handler account for the remaining existing suite failures.
- `check_project_docs.py`, task-aware `check_doc_drift.py`, and `git diff --check`: passed.
- Independent final read-only Sol review: PASS with no blocking findings.
## Follow-ups
- Deploy and verify server migration `0033`, persistent Conversation Session creation, and multi-conversation APIs before releasing this client behavior to production.
- Repair the unrelated repository lint, missing youth-skill fixture, timing-sensitive OpenCode unit test, and stale legacy Electron E2E baseline in separate maintenance tasks.
- Tighten the global `creatingConversation` guard with a request generation/token if concurrent Workspace switching during Conversation creation becomes observable; the current edge case can briefly re-enable duplicate creation but does not overwrite data.
## Promotion Candidates
- None recorded.