Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
830714c
[docs] web: propose Agent and canvas workspace modes
congw729 Nov 17, 2026
af82227
[feat] workspace: persist the selected workspace mode
congw729 Nov 17, 2026
f3349c1
[feat] workspace: add Agent mode and a left-chat canvas layout
congw729 Nov 17, 2026
b30f15a
[test] workspace: cover mode switching and canvas interactions
congw729 Nov 17, 2026
cdadcfb
[test] canvas: use canvas bounds for interaction coordinates
congw729 Nov 17, 2026
3cfed8f
[fix] assistant: preserve active controls when chat loads
congw729 Nov 17, 2026
23c07d7
Merge remote-tracking branch 'origin/main' into codex/issue-373-works…
congw729 Nov 22, 2026
05d32e1
[feat] web: rename chat and canvas creation modes
congw729 Nov 22, 2026
b6a4c62
[test] web: scope model category choices to settings navigation
congw729 Nov 22, 2026
3475c11
[feat] web: add movable chat and simplify canvas creation tools
congw729 Nov 22, 2026
016148a
[chore] Merge main into the workspace modes branch
congw729 Nov 22, 2026
30ce51e
[test] canvas: reconnect through the source node's visible port
congw729 Nov 22, 2026
18e168c
[test] assistant: resize suggested replies from the left dock
congw729 Nov 22, 2026
bf16c17
[feat] assistant: show project results in chat creation
congw729 Nov 22, 2026
ff1b8e7
[feat] workspace: edit project media and timelines from chat
congw729 Nov 23, 2026
c401082
[test] workspace: pin the performance fixture locale
congw729 Nov 23, 2026
829feec
[chore] workspace: merge media model defaults from main
congw729 Nov 23, 2026
1ccb478
[test] assistant: wait for chat readiness after workspace reload
congw729 Nov 23, 2026
9a96419
[feat] web: guide first canvas setup and simplify chat docking
congw729 Nov 23, 2026
30085b7
Merge remote-tracking branch 'origin/main' into codex/issue-373-works…
congw729 Nov 23, 2026
cc06b1d
[bugfix] workspace: keep chat edits private and route model setup
congw729 Nov 25, 2026
fae0d67
[bugfix] workspace: preserve editing roles across chat and canvas
congw729 Nov 25, 2026
7d34aa8
[bugfix] agent: preserve result ownership across queued turns
congw729 Nov 25, 2026
b2b3577
Merge remote-tracking branch 'origin/main' into codex/issue-373-works…
congw729 Nov 26, 2026
74bb805
Merge remote-tracking branch 'origin/main' into codex/issue-373-works…
congw729 Nov 29, 2026
97f16a8
[test] assistant: import fixed project data for result and media tests
congw729 Nov 29, 2026
0999b2f
[test] canvas: wait for the assistant draft after reloading a project
congw729 Nov 29, 2026
4cffb28
Merge remote-tracking branch 'origin/main' into codex/issue-373-works…
congw729 Nov 29, 2026
faffe6e
[bugfix] canvas: keep active editors usable across workspace modes
congw729 Nov 29, 2026
46d8259
Merge remote-tracking branch 'origin/main' into codex/issue-373-works…
congw729 Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 69 additions & 24 deletions apps/api/src/opendirector_api/agent.py

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions apps/desktop/scripts/smoke-window.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,20 @@ async function smokeTraceWindows(window, projectId) {
.then(response => response.json()).then(({projects}) => projects.find(project => project.id === '${projectId}').path)`);
const folder = join(projectPath, 'agent-runs');
mkdirSync(folder, { recursive: true });
await evaluate("document.querySelector('.cw-chat-button').click()");
const openedChat = await evaluate(`(() => {
const toggle = document.querySelector('.cw-chat-button');
if (toggle.getAttribute('aria-expanded') === 'true') return false;
toggle.click();
return true;
})()`);
const editor = ".cw-assistant-composer [contenteditable=true]";
await waitFor(() => evaluate(`!!document.querySelector(${JSON.stringify(editor)})`), 'Assistant composer did not open');
await waitFor(() => evaluate(`document.querySelector(${JSON.stringify(editor)})?.checkVisibility()`), 'Assistant composer did not open');
await waitFor(() => evaluate(`(() => {
const chat = document.querySelector('#canvas-assistant').getBoundingClientRect();
const canvas = document.querySelector('.cw-canvas-region').getBoundingClientRect();
const sidebar = document.querySelector('.cw-workspace[data-desktop-sidebar=open] .od-project-sidebar');
return chat.left >= (sidebar?.getBoundingClientRect().right ?? 0) && chat.right <= canvas.left;
})()`), 'The project sidebar, conversation and canvas overlap');
await evaluate(`document.querySelector(${JSON.stringify(editor)}).focus()`);
await window.webContents.insertText('Draft before opening trace');
const draft = () => evaluate(`document.querySelector(${JSON.stringify(editor)})?.textContent`);
Expand Down Expand Up @@ -433,7 +444,7 @@ async function smokeTraceWindows(window, projectId) {
await evaluate(`document.querySelector(${JSON.stringify(editor)}).focus()`);
await window.webContents.insertText(' and continued afterward');
await waitFor(async () => (await draft())?.includes('continued afterward'), 'Assistant composer stopped accepting input');
await evaluate("document.querySelector('.cw-chat-button').click()");
if (openedChat) await evaluate("document.querySelector('.cw-chat-button').click()");
}

async function waitFor(check, message, attempts = 150) {
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This directory is the entry point for the repository's shared documentation. The
| [Development guidance](../AGENTS.md) | Product direction and enduring principles | Architecture principles or product boundaries change |
| [Contributing](../CONTRIBUTING.md) | Label taxonomy, how to pick labels, and what a PR must satisfy | Process, labels, or submission requirements change |
| [Unified project architecture](architecture/unified-project.md) | Business objects, shared entry points, and interaction rules | Object responsibilities, commands, persistence, or interaction rules change |
| [Workspace modes RFC (中文)](architecture/workspace-modes-rfc.zh-CN.md) | Chat and canvas creation, first-run selection, docked and floating chat, result editing, and acceptance criteria | The mode design or its acceptance criteria change |
| [Desktop architecture](architecture/desktop.md) ([中文](architecture/desktop.zh-CN.md)) | Electron, the Python Host, project storage, and shutdown behavior | Process, request, storage, or lifecycle boundaries change |
| [Test contracts](architecture/test-contracts.md) | Test/production boundaries, how to avoid stale assertions and environment-dependent red runs | Test infrastructure, capability gates, or contract ownership change |
| [Capability mapping contract](architecture/capability-contract.md) | Evidenced upstream vocabulary, the `(operation, profile) → capability` table, the untranslatable declarations, and how it feeds discovery | Upstream vocabulary, capability ids, or discovery matching change |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
255 changes: 255 additions & 0 deletions docs/architecture/workspace-modes-rfc.zh-CN.md

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions docs/development/i18n.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# 中英双语界面

界面语言在 `zh-CN` 与 `en-US` 之间切换。中文是默认语言,也是词条键的基准;英文必须覆盖同一组键。
界面语言在 `zh-CN` 与 `en-US` 之间切换。中文是词条键的基准;英文必须覆盖同一组键。

## 语言选择

- 用户可以在画布左上角的「中文 | EN」开关直接切换,也可以使用「设置 → 界面语言」。
- 用户在「设置 → 界面语言」保存的选择优先。
- 两种创作方式都可以在「设置 → 通用 → 语言」切换语言。对话创作的设置入口在顶栏,画布创作的设置入口在左下角。宽窗口下,画布创作也保留左上角的「中文 | EN」开关。
- 用户保存的语言选择优先,两种创作方式共用这一偏好。
- 没有保存值时,浏览器语言以 `zh` 开头使用 `zh-CN`,以 `en` 开头使用 `en-US`,其他语言使用英文 `en-US`。
- 选择保存在 `localStorage` 的 `opendirector.locale.v1`,并同步到 `<html lang>` 与 `data-locale`。
- 界面语言不影响 Agent 回复语言。Agent 始终跟随用户最新提问的语言,不参考当前界面语言。
Expand Down Expand Up @@ -92,16 +92,17 @@ npm run check:i18n
| --- | --- | --- |
| 通用、错误 | [common.ts](../../src/i18n/messages/zh-CN/common.ts) | [common.ts](../../src/i18n/messages/en-US/common.ts) |
| 设置、主题 | [settings.ts](../../src/i18n/messages/zh-CN/settings.ts) | [settings.ts](../../src/i18n/messages/en-US/settings.ts) |
| 首次设置 | [firstRun.ts](../../src/i18n/messages/zh-CN/firstRun.ts) | [firstRun.ts](../../src/i18n/messages/en-US/firstRun.ts) |
| 首次设置(助手连接、创作经验提示与任务选择) | [firstRun.ts](../../src/i18n/messages/zh-CN/firstRun.ts) | [firstRun.ts](../../src/i18n/messages/en-US/firstRun.ts) |
| 画布与项目 | [canvas.ts](../../src/i18n/messages/zh-CN/canvas.ts) | [canvas.ts](../../src/i18n/messages/en-US/canvas.ts) |
| 模型与服务 | [models.ts](../../src/i18n/messages/zh-CN/models.ts) | [models.ts](../../src/i18n/messages/en-US/models.ts) |
| 画布外壳 | [canvasShell.ts](../../src/i18n/messages/zh-CN/canvasShell.ts) | [canvasShell.ts](../../src/i18n/messages/en-US/canvasShell.ts) |
| 画布工作区 | [canvasWorkspace.ts](../../src/i18n/messages/zh-CN/canvasWorkspace.ts) | [canvasWorkspace.ts](../../src/i18n/messages/en-US/canvasWorkspace.ts) |
| 创作方式(引导中的直接入口、顶栏切换与浮窗入口) | [workspaceModes.ts](../../src/i18n/messages/zh-CN/workspaceModes.ts) | [workspaceModes.ts](../../src/i18n/messages/en-US/workspaceModes.ts) |
| 生成器 | [generation.ts](../../src/i18n/messages/zh-CN/generation.ts) | [generation.ts](../../src/i18n/messages/en-US/generation.ts) |
| 音色库 | [voiceLibrary.ts](../../src/i18n/messages/zh-CN/voiceLibrary.ts) | [voiceLibrary.ts](../../src/i18n/messages/en-US/voiceLibrary.ts) |
| 时间线 | [timeline.ts](../../src/i18n/messages/zh-CN/timeline.ts) | [timeline.ts](../../src/i18n/messages/en-US/timeline.ts) |
| 素材库 | [library.ts](../../src/i18n/messages/zh-CN/library.ts) | [library.ts](../../src/i18n/messages/en-US/library.ts) |
| 助手 | [assistant.ts](../../src/i18n/messages/zh-CN/assistant.ts) | [assistant.ts](../../src/i18n/messages/en-US/assistant.ts) |
| 助手(顶部会话切换、浮动与左右停靠、结果卡片与操作) | [assistant.ts](../../src/i18n/messages/zh-CN/assistant.ts) | [assistant.ts](../../src/i18n/messages/en-US/assistant.ts) |
| 图片、图层、导演台 | [editors.ts](../../src/i18n/messages/zh-CN/editors.ts) | [editors.ts](../../src/i18n/messages/en-US/editors.ts) |
| 节点、资产 | [canvasNodes.ts](../../src/i18n/messages/zh-CN/canvasNodes.ts) | [canvasNodes.ts](../../src/i18n/messages/en-US/canvasNodes.ts) |
| 错误、状态与后端回执 | [errors.ts](../../src/i18n/messages/zh-CN/errors.ts) | [errors.ts](../../src/i18n/messages/en-US/errors.ts) |
Expand Down
8 changes: 8 additions & 0 deletions docs/development/lessons.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ When work exposes a consequential risk or a recurring problem, add a lesson or u

- **Windows CLI follow-up:** In PR #323 validation, the Agent saved Unicode successfully, but PowerShell 5.1 shell readback failed when Python used the Windows code page. A saved-object comparison bypasses CLI stdout. Test write and readback in the actual Agent shell with Python UTF-8 mode disabled in the parent environment, and cover BOM-prefixed JSON files produced by PowerShell 5.1. / **Windows CLI 补充:** PR #323 验收中,Agent 正确保存了 Unicode,但 Python 使用 Windows 代码页时,PowerShell 5.1 中的读回失败。应在父进程关闭 Python UTF-8 模式,用真实 Agent Shell 验证写入和读回,并覆盖 PowerShell 5.1 生成的带 BOM JSON 文件。

## Asynchronous readiness must preserve newer focus

- **Trigger:** Opening chat by default or retaining it while changing projects, when its data finishes loading after the user has focused another control.
- **Evidence:** [PR #380](https://github.com/ThinkFlowLab/OpenDirector/pull/380) reproduced delayed assistant reads closing the project picker and ending new-project renaming. Project creation and opening succeeded; the chat's readiness effect moved focus and triggered the other controls' dismissal handlers.
- **Check:** Hold the assistant read until the project picker or name editor is active, then release it and verify that both the control and its focus remain. Preserve focus requested by explicitly opening chat or changing conversations, while respecting a later user focus change. Distinguish a controlled reproduction from proof of the original CI event order.
- In a narrow chat, dismissing the pending canvas references on pointer-down moved a result button before pointer-up. The click landed on the card and never reached the button. Exercise a real pointer click after returning from a selected canvas node and verify that the node becomes visible again. / 窄屏聊天曾在按下鼠标时收起待引用面板,使结果按钮在松开鼠标前移位。回归应从已有选区的画布返回对话,实际点击结果按钮,并检查对应节点是否重新进入视口。

## Baseline failures still need tracking

- **Trigger:** A relevant test fails and comparison shows that it also fails on the baseline.
Expand Down Expand Up @@ -130,6 +137,7 @@ When work exposes a consequential risk or a recurring problem, add a lesson or u
- **Evidence:** Media and assistant requests returned storage-lock timeouts on a Windows project with over 800 commits. All the referenced files were present, and reading the committed head resolved the failing media requests.
- **Check:** Read current media from the committed head and replay immutable history outside the catalog lock. Before publishing, recheck the head and rerun command validation if it changed. The asset and storage tests cover original bytes and a concurrent head change during replay.
- **Rename follow-up:** [PR #544](https://github.com/ThinkFlowLab/OpenDirector/pull/544) reproduced receipt and change-feed reads reporting corruption when a concurrent rename moved a valid commit directory. Resolve the project again after a failed replay and retry when its location or manifest changed. Keep the integrity error when the basis stayed the same.
- In [PR #380](https://github.com/ThinkFlowLab/OpenDirector/pull/380), reading the active conversation during timeline publication returned `409 storage_busy` because the read checked the write lock. Pause a canvas commit after its bundle is written. The active conversation and conversation list must remain readable, and a concurrent draft write must still return `storage_busy`.

## An upstream response and a consumer finishing it are separate facts

Expand Down
Loading
Loading