Skip to content

[WIP] 增加对话创作与画布创作 - #380

Open
congw729 wants to merge 18 commits into
ThinkFlowLab:mainfrom
congw729:codex/issue-373-workspace-modes-rfc
Open

congw729 wants to merge 18 commits into
ThinkFlowLab:mainfrom
congw729:codex/issue-373-workspace-modes-rfc

Conversation

@congw729

@congw729 congw729 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

按 #386 实现两种创作方式,并在合入 main(8a227d61)后接入 #428 的首次使用引导。欢迎页使用「对话创作 / 画布创作」(Create with chat / Create on canvas),顶栏简写为「对话 / 画布」(Chat / Canvas)。

首次打开时,欢迎页默认选中「画布创作」。选好后可点「进入工作区」直接打开项目,也可点「开始设置」继续配置助手和选择创作任务。两个入口都会保存本次选择。完成过引导的用户直接进入项目,随时可以从顶栏切换。窄屏选择「画布创作」后会显示画布。浏览器拒绝保存偏好时,页面会提示,当前选择仍然生效。

  • 对话创作在宽屏显示项目会话侧栏,消息与底部输入框对齐,语言切换位于设置中。
  • 画布创作默认左侧聊天、右侧画布,按 1:2 分栏。聊天可以调整宽度、收起,或拖动标题浮在画布上再停靠。窄窗口一次显示一个区域。
  • 画布左侧集中提供「添加节点」「资产库」「上传」。“添加节点”展开六类节点,空画布中央可浏览示例。
  • 两种布局共用项目和聊天组件,切换保留会话、草稿、引用、画布视角和选中对象。运行中的回复和生成任务继续执行,切换本身不提交业务命令。
  • 修正左侧分栏下的节点聚焦、菜单坐标、素材和历史面板位置;隐藏画布时隔离画布按键和滚轮。中英文文案与使用说明一起更新。

聊天默认展开后,异步加载曾抢走项目菜单和名称输入的焦点,待引用预览也会拦截菜单 Escape。现已修复这两处交互,并加入受控延迟和键盘优先级回归;画布测试按实际可见区域定位,保留原有业务断言。

PR 继续保持 WIP。首次创作方式选择已完成。对话创作现在会在对应回复下展示已写入项目的素材和生成结果,支持预览原文件、继续引用固定版本和「在画布中查看」。查看候选或历史版本会定位原素材,保留生成节点当前采用的结果。从卡片直接打开编辑器和导出仍待实现。聊天中的项目级素材选择仍待补齐。已复现两处切换限制:鼠标点击顶栏后需要重新聚焦聊天输入框,打开的时间线编辑器会遮住模式按钮。

Linked issue

Labels

  • 已有 area:canvas、area:agent、area:docs。
  • 原文档阶段的 type:docs 需改为 type:feat;当前连接无标签写入权限,需维护者调整。

Test plan

对话结果卡片(bf16c178)

  • 本地通过 967 项前端单测、57 项相关后端测试、TypeScript、生产构建、双语词条与浏览器测试清单检查。
  • 中英文 Chrome 在开发版和生产版验证了任务晚于回复完成、预览下载的 SHA-256、下一轮实际发送的固定引用,以及在画布上恢复隐藏节点和定位屏幕外节点。另验证了直接发布文本的原文预览,以及删除后重开历史会话时的文件名与不可用提示。模型回复和生成供应商使用测试替身,资产与会话通过实际项目服务写入。

当前界面更新(3475c117)

  • 957 个前端单元测试通过。TypeScript 类型检查、独立目录生产构建、双语词条、浏览器文案和测试清单检查通过。
  • 在同一份生产构建上使用 Chrome 和隔离测试服务,通过 workspace_modes(中英文)、example_canvas_picker 和 first_run。

合入 main 与改名后的本地验证

  • 05d32e1b 上的 956 个前端单测全部通过。生产构建、check:i18n、check:browser-locale 和 check:browser-manifest 通过。
  • 改名后在 Chrome 中重跑 first_run、bilingual_defaults 和 workspace_modes,三组全部通过。覆盖了中英文欢迎页全称、顶栏简称和无障碍名称,也验证了首次设置、直接进入、偏好恢复和写入失败后的提示。
  • 合并提交 23c07d77 上另有 example_canvas_picker、assistant_auxiliary_panels 和 default_entry 三组 Chrome 回归通过。桌面宿主单测通过 7 项,另 1 项需要打包运行时,本地跳过。

合入 main 前的验证记录

  • Local:npm test 836/836;npm run build、npm run check:i18n、npm run check:browser-locale、npm run check:browser-manifest 通过。当时整个 PR 差异的 pre-commit run --from-ref origin/main --to-ref HEAD 通过。
  • 本地浏览器 17 组通过:workspace_modes、assistant_auxiliary_panels、assistant_sessions、assistant_run_navigation、double_shift_chat、canvas_wheel、created_node_focus、provider_settings、default_entry、jiuwenswarm_picker、kling_video、canvas_crop、canvas_text_markdown、verify_creation_browser、context_menu_dismissal、canvas_switch、timeline_workflow --full-creation。
  • 新用例覆盖中英、1720/2560px 分栏、390/600px 窄窗口、同一输入 DOM、草稿/引用/会话、视口/选择、节点拖动和菜单坐标,以及运行中 turn/job 的 ID、调用次数和最终结果。辅助面板和窄屏修正后已复跑。
  • 已安装 ffmpeg/ffprobe 8.1,kling_video 中英文完整重跑通过,覆盖文生视频、首帧、首尾帧、图片参考、实际 fixture 视频与结果采用;原断言保留。
  • timeline_workflow --full-creation 完整通过,包含真实 MP4 尺寸、2 秒时长、画面顺序、混音及服务重启后再导出。双模式完整用例也在 3cfed8ff 上再次通过。
  • 提交 3cfed8ff 的 Release checks #430 和 CodeQL #45 全部通过。isolated 浏览器回归 22/22,之前的六项失败均已通过。
  • 额外尝试的非 gate 扩展脚本 multi_selection_references 在 macOS 未通过,原因待定位,未计入上述结果,详见验证记录。上传途中切换、未保存的模态编辑器草稿和 MP4 渲染中切换尚未验证。

Evidence that it works

以下 1440 × 900 截图来自同一示例项目的浏览器界面。剧照取自仓库内的短片,聊天内容由测试替身提供。

对话创作

宽屏会话列表、消息和底部输入框

画布创作

默认分栏与展开的添加节点菜单

浮动聊天

同一会话拖到画布右侧

工作区 RFC 与验收条件 · 先前的英文与窄屏验证记录。

Provider verification

  • 使用隔离 creation server 和模型 fixture,没有真实供应商调用。验证了实际存储的 Agent turn 与图片 Job 在切换后继续完成,以及 fixture 素材的本地视频输出;未验证真实模型质量。

Bilingual UI

  • 新增文案同时提供 zh-CN 和 en-US,中英用户指南已更新,浏览器中实际切换两种语言检查布局。

## summary

- Add a Chinese RFC for an Agent-focused view and a 1:2 chat/canvas
  layout, with the two agreed UI sketches.
- Describe switching behavior, shared component state, output limits,
  implementation steps, and acceptance scenarios.
- Link the proposal from the documentation index.

Refs: ThinkFlowLab#373
Signed-off-by: congw729 <115451386+congw729@users.noreply.github.com>
@github-actions github-actions Bot added area:docs Documentation / 文档 type:docs Documentation only labels Nov 17, 2026
@github-actions
github-actions Bot requested a review from wuzhf9 November 17, 2026 03:12
@congw729 congw729 changed the title [RFC] 增加纯净模式与左聊右画的画布模式 [WIP] 增加纯净模式与左聊右画的画布模式 Nov 17, 2026
@congw729 congw729 changed the title [WIP] 增加纯净模式与左聊右画的画布模式 [WIP] 增加纯净模式与画布模式 Nov 17, 2026
## summary

Add an isolated browser preference for agent and canvas modes, with canvas as the initial entry point and explicit storage failure results. Cover restoration, invalid values, storage denial and unrelated preference preservation.

Refs: ThinkFlowLab#386, ThinkFlowLab#373
Signed-off-by: congw729 <115451386+congw729@users.noreply.github.com>
Share the project, conversation and editor hosts across both modes. Default to a 1:2 chat/canvas split, remember layout preferences, and scope canvas gestures to the visible region. Update both locales and user guides.

Refs: ThinkFlowLab#386, ThinkFlowLab#373
Signed-off-by: congw729 <115451386+congw729@users.noreply.github.com>
@github-actions github-actions Bot added the area:canvas Canvas, nodes and direct manipulation label Nov 17, 2026
Verify shared drafts, references, viewport and running turn/job identity across modes. Cover bilingual and narrow layouts, keep a single narrow-screen chat entry, and adapt existing browser checks to the left chat region.

Refs: ThinkFlowLab#386, ThinkFlowLab#373
Signed-off-by: congw729 <115451386+congw729@users.noreply.github.com>
@github-actions github-actions Bot added the area:agent Agent runtime, assistant chat and tools label Nov 17, 2026
@github-actions
github-actions Bot requested a review from FayeSpica November 17, 2026 08:09
Locate crop deselection and Markdown pan-to-fit gestures within the actual canvas region after chat moves to the left. Preserve the crop, resize, editor and persistence assertions; both browser scripts pass after reproducing the old out-of-bounds clicks.

Refs: ThinkFlowLab#386, ThinkFlowLab#373
Signed-off-by: congw729 <115451386+congw729@users.noreply.github.com>
@github-actions github-actions Bot added the area:i18n Localisation and bilingual UI label Nov 17, 2026
Keep project menus and new-project renaming focused when the default-open assistant finishes loading. Let focused menus handle Escape before staged references, and use visible canvas positions in interaction regressions. Add delayed-read coverage and retain the full timeline export and existing interaction assertions.

Refs: ThinkFlowLab#386, ThinkFlowLab#373
Signed-off-by: congw729 <115451386+congw729@users.noreply.github.com>
## summary

- Use descriptive bilingual choices on the welcome screen and short
  Chat and Canvas labels in the workspace toolbar.
- Align the user guides and verify the visible and accessible labels
  in the first-run and workspace browser tests.

Refs: ThinkFlowLab#386
@congw729 congw729 changed the title [WIP] 增加纯净模式与画布模式 [WIP] 增加对话创作与画布创作 Nov 22, 2026
## summary

- Locate provider categories within the named navigation so the Chat
  workspace switch cannot match a settings action.
- Use the same scope for the bilingual Kimi preset check.
@github-actions github-actions Bot added the area:timeline Timeline, subtitles and export label Nov 22, 2026
## summary

- Add session navigation to chat creation and let users float, move,
  and dock the same conversation while working on the canvas.
- Group node types in one picker and keep created or focused content
  visible beside the floating conversation.
- Update the workspace RFC, screenshots, bilingual guides, and browser
  coverage for the revised creation and navigation flows.
## summary

- Bring in suggested replies and the pending timeline output edge fix.
- Keep the chat sidebar instructions alongside the new suggested reply
  instructions in both user guides.
## summary

- Keep both fixture nodes within reach after focusing generated video.
- Hover the source and drag from its right port so the canvas toolbar
  cannot intercept the reconnect gesture at a guessed screen position.
- Retain immediate reconnect and persisted reference identity checks.
## summary

- Drag the separator right to widen chat and left to narrow it before
  checking that the suggested reply buttons wrap onto more rows.
## summary

- Link each saved reply to its published files and completed jobs,
  including candidates, late results and deleted direct publications.
- Preview the original asset, pin it to a draft, or locate its display
  item on the canvas while preserving the adopted generation result.
- Document both languages and cover submission, recovery, downloads
  and narrow-screen canvas navigation with regression tests.
## summary

- Keep the active input, selection, and timeline editor available
  across layout changes, including when a dialog has focus.
- Import and reference project assets from chat and open the shared
  media or timeline editor by identity. Keep timeline receipts with
  their originating reply and reuse committed objects on retry.
- Verify real MP4 playback, publication retries, and project reopening.
  Clarify the default dock, movable chat, and local editing in the RFC
  and user guides.

## validation

- 972 frontend tests passed. Relevant backend suites passed 126 tests
  with one POSIX-only test skipped on Windows.
- TypeScript, Vite production build, i18n, and browser manifest passed.
- Verified both languages, mode switching, rendering, and local editing
  with an empty model catalog in Chromium.
- All eight production switch timing cases met the RFC budgets.

Refs: ThinkFlowLab#373, ThinkFlowLab#386
## summary

Set the PNG fixture page locale explicitly, matching the measured
workspace pages and the browser locale check.

## validation

The browser locale and manifest checks passed. The production mode
switch benchmark passed all eight cases with 80 recorded samples.
## summary

Keep the workspace result and timeline hooks alongside the media
model preference handler introduced in ThinkFlowLab#464.

## validation

Compared with the previous PR integration tree, all six changed
files have exactly the additions and deletions from ThinkFlowLab#464.
The preference, workspace mode, and result tests passed (22 tests).
## summary

Open chat in the navigation journey only when the workspace is ready
and the toggle is collapsed. A visible toggle can already represent
an open panel when the initial project finishes loading.

## validation

The production navigation journey passed, including the configured
video model ID in the next project turn after reload.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent runtime, assistant chat and tools area:canvas Canvas, nodes and direct manipulation area:docs Documentation / 文档 area:i18n Localisation and bilingual UI area:timeline Timeline, subtitles and export type:docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant