Skip to content

fix(desktop): exit WorkHub for project new task - #5195

Open
me2seeks wants to merge 1 commit into
mainfrom
fix/5193-workhub-project-new-task
Open

fix(desktop): exit WorkHub for project new task#5195
me2seeks wants to merge 1 commit into
mainfrom
fix/5193-workhub-project-new-task

Conversation

@me2seeks

Copy link
Copy Markdown
Contributor

Project row actions used a separate callback path from the sidebar's top-level New task action. While WorkHub was active, the project callback selected the new-task state but never dismissed the WorkHub dock, so the user continued to see WorkHub and the action appeared inert.

Route the Project New task callback through onExitWorkHub() before delegating to AppShell. Add an Electron regression covering the native WorkHub WebContentsView lifecycle and the selected project's new-task composer.

Fixes #5193

Verification

  • xvfb-run -a npm exec playwright test -- --config e2e/playwright.config.ts e2e/workhub-layout.spec.ts --grep "project menu exits" --reporter=line
  • npm --workspace @maka/desktop run typecheck
  • npm --workspace @maka/desktop run check:e2e-budget
  • npm exec biome lint -- apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsx apps/desktop/e2e/workhub-layout.spec.ts
  • git diff --check

The Electron regression failed before the fix because .workHubDock remained visible for the full assertion timeout, and passes after the fix.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex assisted with diagnosis, implementation, and regression-test authoring.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — Project New task now leaves WorkHub and presents the selected project's blank composer.
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 11, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at e8576c07701d673be4f32f942b3bd4f63af45c14.

I found no merge-blocking issue. The defect follows directly from the production state path: WorkHub visibility is controlled by workHubActive; the top-level New task action exits WorkHub, but the Project-row action previously delegated straight to createSessionInProject, which selects the Project and opens the blank task state without changing WorkHub visibility. This patch adds the missing existing onExitWorkHub() transition before that same Project callback. It introduces no new state or ownership.

The regression drives the Project menu through the Electron surface and requires the WorkHub dock to disappear, the blank composer to receive focus, and no prior Turn rows to remain. The exact-head hosted test is terminal green, including all 38 Desktop E2E tests. Local workspace and Desktop builds, Desktop typecheck, E2E budget, renderer architecture, Biome, and whitespace checks passed. The synthetic merge with current main is clean.


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

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

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): project New task action does not exit WorkHub

2 participants