Skip to content

fix(sessions): start New Task outside projects and let chats move freely - #2466

Merged
vastsa merged 2 commits into
mainfrom
fix/new-task-project-scope
Nov 20, 2026
Merged

vastsa merged 2 commits into
mainfrom
fix/new-task-project-scope

Conversation

@vastsa

@vastsa vastsa commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Fixes #2455

The maintainer decided to redesign this interaction, superseding the earlier "New Task uses the current project" spec rule.

Behavior

Entry point Before After
Sidebar "New task", titlebar, Cmd/Ctrl+N, palette, search Inherits the active project Temporary group (no project)
Project row +, project index, worktree That project Unchanged
Empty home in a project Underlined project switcher Same, with No project listed first
Empty home, temporary / no session No way to pick a project Choose project chip opens the same switcher
Existing conversation Drag only, into a project Topbar project crumb (or No project crumb) moves an idle conversation into any open project or out of all projects

An active remote session still creates in its remote project. Running, remote, native, and isolated-worktree conversations keep a static crumb. The sidebar session context menu still has no project list.

Contract

session.moveProject accepts an explicit projectPath: null (host-core sets project_id = NULL). A missing key or blank path is still INVALID_PARAMS; older hosts reject null the same way. No schema change.

Tests

  • New session-project-scope.test.mjs: global New Task is path-less (fails on old code), explicit target still attaches, move out and back keeps the transcript and the workspace follows, running/unopened targets are refused.
  • host-core move_session_project_reassigns_only_the_project_and_rejects_running_turns extended for None.
  • Updated topbar rendering, home switcher, and move-contract tests.
  • apps/desktop typecheck passes. Desktop node --test gives 5277 pass and 4 fail. All 4 failures also happen without this change or are flaky (file-manager-git-timeout passes on rerun; image-model-disclosure, market-browse, and settings-inline-import also fail on a baseline worktree).
  • cargo test -p host-core: everything passes except 2 tests that also fail on main locally (plugins legacy id, review_rpc external write). cargo fmt --check and clippy (no new warnings) pass.
  • i18n: 5 keys in all 9 locales; i18n and shared vitest pass.

Every global New Task inherited the project the user happened to be
viewing, so a plain conversation could not be started without a
project, and an existing conversation could only move between projects
by drag and never out of one.

Global New Task now starts in the temporary group; project + buttons
and the empty-home switcher still target a project. The empty home
lists "No project" first and gains a Choose project chip for temporary
homes. The topbar project crumb moves an idle conversation into another
open project or out of any, backed by session.moveProject accepting an
explicit null projectPath.

fixes #2455
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1eecc35
Status: ✅  Deploy successful!
Preview URL: https://5bdb4b61.pi-desktop.pages.dev
Branch Preview URL: https://fix-new-task-project-scope.pi-desktop.pages.dev

View logs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 新建任务被必须挂到一个项目上

1 participant