Skip to content

[WIP] 增加纯净模式与画布模式 - #380

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

congw729 wants to merge 6 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 先把模式切换和布局做起来。顶栏可以切换纯净模式与画布模式;没有保存偏好时进入画布模式,之后记住当前浏览器的选择。

  • 纯净模式使用居中的宽对话区,语言切换留在设置里。
  • 画布模式默认左边聊天占 1/3、右边画布占 2/3,可以拖动分隔线、双击恢复宽度、收起聊天。窄窗口一次显示一个区域。
  • 两种布局共用项目和聊天组件,切换保留会话、草稿、引用、画布视角和选中对象。运行中的回复和生成任务继续执行,切换本身不提交业务命令。
  • 修正左侧分栏下的节点聚焦、菜单坐标、素材和历史面板位置;隐藏画布时隔离画布按键和滚轮。中英文文案与使用说明一起更新。

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

PR 继续保持 WIP。首次模式选择页、纯净模式的结果卡片和完整预览/编辑/导出留到后续;当前需要直接编辑节点或时间线时,切到画布模式。

Linked issue

Labels

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

Test plan

  • 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

  • 以下为实际浏览器截图。紫色图片和聊天回复来自隔离测试替身。

左聊右画:

画布模式:左侧聊天、右侧画布

纯净模式:

纯净模式:居中对话

英文与窄屏截图、测试命令和验证边界。

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>
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 type:docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant