You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by zh...@apache.org on 2026/09/11 09:34:34 UTC

(maka) branch fix/5193-workhub-project-new-task created (now e8576c0770)

This is an automated email from the ASF dual-hosted git repository.

me2seeks pushed a change to branch fix/5193-workhub-project-new-task
in repository https://gitbox.apache.org/repos/asf/maka.git


      at e8576c0770 fix(desktop): exit WorkHub for project new task

This branch includes the following new commits:

     new e8576c0770 fix(desktop): exit WorkHub for project new task

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


(maka) 01/01: fix(desktop): exit WorkHub for project new task

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

me2seeks pushed a commit to branch fix/5193-workhub-project-new-task
in repository https://gitbox.apache.org/repos/asf/maka.git

commit e8576c07701d673be4f32f942b3bd4f63af45c14
Author: me2seeks <me...@gmail.com>
AuthorDate: Fri Sep 11 17:34:24 2026 +0800

    fix(desktop): exit WorkHub for project new task
    
    Generated-by: OpenAI Codex
---
 apps/desktop/e2e-budget.json                              |  4 ++--
 apps/desktop/e2e/workhub-layout.spec.ts                   | 15 +++++++++++++++
 .../session-navigation/ui/session-navigation-provider.tsx |  5 ++++-
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/apps/desktop/e2e-budget.json b/apps/desktop/e2e-budget.json
index 8bd366b228..ec47c1ae8d 100644
--- a/apps/desktop/e2e-budget.json
+++ b/apps/desktop/e2e-budget.json
@@ -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,
diff --git a/apps/desktop/e2e/workhub-layout.spec.ts b/apps/desktop/e2e/workhub-layout.spec.ts
index 48e45c0adb..e54a93faaa 100644
--- a/apps/desktop/e2e/workhub-layout.spec.ts
+++ b/apps/desktop/e2e/workhub-layout.spec.ts
@@ -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);
+});
diff --git a/apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsx b/apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsx
index f9e0799b89..ccee20a31b 100644
--- a/apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsx
+++ b/apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsx
@@ -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),


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org