Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions apps/desktop/e2e-budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"electron": "the perf budget is measured from CDP wheel input and the browser's own render skipping"
},
"workhub-layout.spec.ts": {
"tests": 2,
"electron": "WorkHub model configuration and attachment sending cross the Host boundary; native floating preserves macOS Dock visibility and pointer dragging verifies model-wheel scrolling and release snapping; a held-open Host Turn verifies immediate prompt visibility, durable transcript handoff and persistence after renderer reload"
"tests": 3,
"electron": "WorkHub model configuration and attachment sending cross the Host boundary; the Project New task action must dismiss the native dock owned by a separate WebContentsView; native floating preserves macOS Dock visibility and pointer dragging verifies model-wheel scrolling and release snapping; a held-open Host Turn verifies immediate prompt visibility, durable transcript handoff and persistence after renderer reload"
},
"workhub-reconstruction.spec.ts": {
"tests": 1,
Expand Down
15 changes: 15 additions & 0 deletions apps/desktop/e2e/workhub-layout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,18 @@ test('WorkHub keeps the submitted prompt visible while its agent is still runnin
await workhub.getByRole('button', { name: /发送|Send/, exact: true }).click();
await expect(workhub.getByText('Fake backend received: Reply after renderer recovery')).toBeVisible();
});

test('project menu exits WorkHub before starting a new task', async ({ projectSidebarWindow: page }) => {
await page.keyboard.press('Escape');
await page.evaluate(() => window.maka.settings.updateClient({ workHub: { enabled: true } }));
await expect(page.locator('.workHubDock')).toBeVisible();

const sidebar = page.getByRole('navigation', { name: '任务列表' });
await sidebar.getByRole('radio', { name: '按项目', exact: true }).click();
await page.getByRole('button', { name: '示例项目 项目操作', exact: true }).click();
await page.getByRole('menuitem', { name: '新建任务', exact: true }).click();

await expect(page.locator('.workHubDock')).toBeHidden();
await expect(page.locator(COMPOSER_INPUT)).toBeFocused();
await expect(page.locator('[data-turn-id]')).toHaveCount(0);
});
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ export function SessionNavigationProvider(props: SessionNavigationProviderProps)
() =>
hasProjectActions
? {
onNew: (projectId) => chromeRef.current.projectActions?.onNew(projectId),
onNew: (projectId) => {
chromeRef.current.onExitWorkHub();
return chromeRef.current.projectActions?.onNew(projectId);
},
onRename: (projectId, name) =>
chromeRef.current.projectActions?.onRename(projectId, name),
onArchive: (projectId) => chromeRef.current.projectActions?.onArchive(projectId),
Expand Down