Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(sessions): start New Task outside projects and let chats move freely
vastsad7545e356db9
diff --git a/apps/desktop/electron/main/ipc/session-ipc.ts b/apps/desktop/electron/main/ipc/session-ipc.tsindex dbff216ed..62b1c237d 100644--- a/apps/desktop/electron/main/ipc/session-ipc.ts+++ b/apps/desktop/electron/main/ipc/session-ipc.ts@@ -477,17 +477,20 @@ export function registerSessionIpc({});handle(IPC.invoke.sessionMoveProject,- async (input: { sessionId?: string; projectPath?: string } = {}) => {+ async (input: { sessionId?: string; projectPath?: string | null } = {}) => {if (!host) throw new Error("host unavailable");const sessionId = String(input.sessionId ?? "").trim();rejectNativeMutation(sessionId, "project move");- const projectPath = String(input.projectPath ?? "").trim();+ // An explicit `null` moves the session out of its project into the+ // temporary group; a missing or blank path is still rejected.+ const detach = input.projectPath === null;+ const projectPath = detach ? null : String(input.projectPath ?? "").trim();if (!sessionId) {throw Object.assign(new Error("sessionId required"), {errorCode: ErrorCodes.INVALID_ARGUMENT,});}- if (!projectPath) {+ if (!detach && !projectPath) {throw Object.assign(new Error("projectPath required"), {errorCode: ErrorCodes.INVALID_ARGUMENT,});diff --git a/apps/desktop/src/components/ChatSurface.tsx b/apps/desktop/src/components/ChatSurface.tsxindex 3e99895c8..47177e1fa 100644--- a/apps/desktop/src/components/ChatSurface.tsx+++ b/apps/desktop/src/components/ChatSurface.tsx@@ -189,6 +189,7 @@ export const ChatSurface = memo(function ChatSurface({t("chat.emptyTitle"))}</h1>+ {heroProject ? null : <HomeProjectSwitcher variant="chip" />}</div></div></div>diff --git a/apps/desktop/src/components/ConversationProjectMenu.tsx b/apps/desktop/src/components/ConversationProjectMenu.tsxnew file mode 100644index 000000000..a14534566--- /dev/null+++ b/apps/desktop/src/components/ConversationProjectMenu.tsx@@ -0,0 +1,137 @@+import { useMemo, useState } from "react";+import { useTranslation } from "react-i18next";+import type { SessionSummary } from "@pi-desktop/shared";+import { listSwitcherProjects, normalizeProjectPath } from "../lib/sidebar-preferences";+import { useAppStore } from "../stores/app-store";+import { AnchoredMenu } from "./settings/AnchoredMenu";+import { IconChat, IconCheck, IconFolder } from "./icons";+import { cx } from "./ui";++type Target = { key: string; name: string; path: string | null };++const TEMPORARY_KEY = "temporary";++/**+ * The topbar's project crumb. For an idle local conversation it opens a menu+ * that moves the conversation into another open project or out of any+ * project (#2455); the transcript stays with the session. Running, remote,+ * native, and isolated-worktree sessions keep the static crumb.+ */+export function ConversationProjectMenu({+ session,+ project,+}: {+ session: SessionSummary;+ /** Display name of the session's project, or null for a temporary one. */+ project: string | null;+}) {+ const { t } = useTranslation();+ const openProjectPaths = useAppStore((state) => state.openProjectPaths);+ const openProjects = useAppStore((state) => state.openProjects);+ const workspace = useAppStore((state) => state.workspace);+ const projectMeta = useAppStore((state) => state.projectMeta);+ const projectSort = useAppStore((state) => state.projectSort);+ const running = useAppStore((state) => state.runningSessions[session.id] === true);+ const moveSessionProject = useAppStore((state) => state.moveSessionProject);+ const showToast = useAppStore((state) => state.showToast);+ const [open, setOpen] = useState(false);+ const [busy, setBusy] = useState(false);++ const currentKey = normalizeProjectPath(session.projectPath) ?? TEMPORARY_KEY;+ const targets = useMemo((): Target[] => [+ { key: TEMPORARY_KEY, name: t("project.noProject"), path: null },+ ...listSwitcherProjects({ openProjectPaths, openProjects, workspace, projectMeta, projectSort })+ .map((entry) => ({ key: entry.key, name: entry.name, path: entry.path })),+ ], [openProjectPaths, openProjects, workspace, projectMeta, projectSort, t]);++ const label = project ?? t("project.noProject");+ const separator = <span className="ct-sep" aria-hidden>/</span>;+ const movable = !running && !session.worktree && session.source !== "pi-native";+ if (!movable) {+ return project ? (+ <>+ <span className="ct-project">+ <IconFolder size={12} aria-hidden />+ <span className="ct-project-name">{project}</span>+ </span>+ {separator}+ </>+ ) : null;+ }++ const move = async (target: Target) => {+ setOpen(false);+ if (busy || target.key === currentKey) return;+ setBusy(true);+ try {+ const moved = await moveSessionProject(session.id, target.path);+ showToast(+ !moved+ ? t("nav.moveSessionUnavailable")+ : target.path === null+ ? t("nav.sessionMovedToTemporary")+ : t("nav.sessionMoved", { name: target.name }),+ { variant: moved ? "success" : "warning" },+ );+ } catch (error) {+ showToast(error instanceof Error ? error.message : String(error), { variant: "error" });+ } finally {+ setBusy(false);+ }+ };++ return (+ <>+ <AnchoredMenu+ className="ct-project-menu"+ open={open}+ onClose={() => setOpen(false)}+ menuClassName="home-project-switcher-menu"+ label={t("nav.moveToProject")}+ role="menu"+ align="start"+ side="bottom"+ trigger={(ref) => (+ <button+ ref={ref}+ type="button"+ className={cx("ct-project", "ct-project-trigger", !project && "is-temporary")}+ data-action="conversation-project"+ aria-haspopup="menu"+ aria-expanded={open}+ aria-label={`${t("nav.moveToProject")}: ${label}`}+ disabled={busy}+ onClick={() => setOpen((value) => !value)}+ >+ {project ? <IconFolder size={12} aria-hidden /> : <IconChat size={12} aria-hidden />}+ <span className="ct-project-name">{label}</span>+ </button>+ )}+ >+ <div className="home-project-switcher-list" role="none">+ {targets.map((target) => {+ const current = target.key === currentKey;+ return (+ <button+ key={target.key}+ type="button"+ role="menuitemradio"+ aria-checked={current}+ title={target.path ?? t("project.noProjectHint")}+ className={cx("home-project-switcher-item", current && "is-current")}+ data-move-target={target.key}+ disabled={busy}+ onClick={() => void move(target)}+ >+ {target.path === null ? <IconChat size={14} aria-hidden /> : <IconFolder size={14} aria-hidden />}+ <span className="home-project-switcher-item-name">{target.name}</span>+ {current ? <IconCheck size={14} className="home-project-switcher-check" aria-hidden /> : null}+ </button>+ );+ })}+ </div>+ </AnchoredMenu>+ {separator}+ </>+ );+}diff --git a/apps/desktop/src/components/ConversationTopbar.tsx b/apps/desktop/src/components/ConversationTopbar.tsxindex 11d1d5063..f63aa07eb 100644--- a/apps/desktop/src/components/ConversationTopbar.tsx+++ b/apps/desktop/src/components/ConversationTopbar.tsx@@ -27,6 +27,7 @@ import {IconSearch,} from "./icons";import { TooltipButton } from "./ui";+import { ConversationProjectMenu } from "./ConversationProjectMenu";function projectName(path?: string | null, name?: string | null) {if (name) return name;@@ -265,7 +266,9 @@ export function ConversationTopbar({className="ct-title-wrap"title={editing ? undefined : breadcrumbTitle}>- {project ? (+ {activeSession && !remoteSession ? (+ <ConversationProjectMenu session={activeSession} project={project} />+ ) : project ? (<><span className="ct-project"><IconFolder size={12} aria-hidden />diff --git a/apps/desktop/src/components/HomeProjectSwitcher.tsx b/apps/desktop/src/components/HomeProjectSwitcher.tsxindex f2f06c7c4..6fe7856a5 100644--- a/apps/desktop/src/components/HomeProjectSwitcher.tsx+++ b/apps/desktop/src/components/HomeProjectSwitcher.tsx@@ -17,7 +17,9 @@ import {import { useAppStore } from "../stores/app-store";import {IconBranch,+ IconChat,IconCheck,+ IconChevronDown,IconChevronLeft,IconFolder,IconNewProject,@@ -29,14 +31,32 @@ import { useRemoteProjects } from "../hooks/use-remote-projects";import { remoteProjectKey, type RemoteProjectEntry } from "../lib/remote-project-catalog";import { isRemoteSession } from "../lib/remote-session-safety";-type ProjectMenuEntry = { key: string; name: string; title: string; localPath?: string; remoteProject?: RemoteProjectEntry };+type ProjectMenuEntry = {+ key: string;+ name: string;+ title: string;+ localPath?: string;+ remoteProject?: RemoteProjectEntry;+ /** The temporary group: a conversation that belongs to no project. */+ temporary?: true;+};++const TEMPORARY_KEY = "temporary";+/**+ * The empty home's project picker. Inside a project it is the underlined+ * project name in the title; for a temporary conversation (or no session) it+ * is a "Choose project" chip under the title. Both list "No project" first so+ * the next task can leave or join a project from the same place (#2455).+ */export function HomeProjectSwitcher({name,path,+ variant = "inline",}: {- name: string;+ name?: string;path?: string | null;+ variant?: "inline" | "chip";}) {const { t } = useTranslation();const openProjectPaths = useAppStore((state) => state.openProjectPaths);@@ -72,8 +92,12 @@ export function HomeProjectSwitcher({}),[openProjectPaths, openProjects, workspace, projectMeta, projectSort],);+ const temporaryLabel = t("project.noProject");const visible = useMemo((): ProjectMenuEntry[] => [+ ...(temporaryLabel.toLocaleLowerCase().includes(query.trim().toLocaleLowerCase())+ ? [{ key: TEMPORARY_KEY, name: temporaryLabel, title: t("project.noProjectHint"), temporary: true as const }]+ : []),...filterSwitcherProjects(projects, query).map((project) => ({ key: project.key, name: project.name,title: openProjects.find((item) => item.path === project.path)?.remote?.path?? (workspace?.path === project.path ? workspace.remote?.path : undefined)@@ -82,11 +106,11 @@ export function HomeProjectSwitcher({.map((project) => ({ key: `remote:${project.key}`, name: `${project.label} · ${project.hostLabel}`,title: `${project.label} · ${project.hostLabel}`, remoteProject: project })),],- [projects, query, remoteCatalog.projects, openProjects, workspace],+ [projects, query, remoteCatalog.projects, openProjects, workspace, temporaryLabel, t],);const activeKey = isRemoteSession(activeSession) && activeSession?.remoteHostKey && activeSession.remoteProjectId? `remote:${remoteProjectKey(activeSession.remoteHostKey, activeSession.remoteProjectId)}`- : normalizeProjectPath(activeProjectPath ?? path);+ : normalizeProjectPath(activeProjectPath ?? path) || (variant === "chip" ? TEMPORARY_KEY : "");const cloneTarget = parseGitCloneUrl(cloneUrl, {allowInsecureHttp: allowInsecureUserEndpoints(settings),});@@ -127,7 +151,24 @@ export function HomeProjectSwitcher({[activeKey, busy, close, newSession, reportError],);+ const selectTemporary = async () => {+ if (busy || busyRef.current) return;+ close();+ if (activeKey === TEMPORARY_KEY && activeSession) return;+ busyRef.current = true;+ setBusy(true);+ try {+ await newSession({ projectPath: null });+ } catch (error) {+ reportError(error);+ } finally {+ busyRef.current = false;+ setBusy(false);+ }+ };+const selectMenuProject = async (project: ProjectMenuEntry) => {+ if (project.temporary) return selectTemporary();if (project.localPath) return selectProject(project.localPath);if (busy || busyRef.current || !project.remoteProject?.connected) return;busyRef.current = true; setBusy(true);@@ -230,31 +271,49 @@ export function HomeProjectSwitcher({side="bottom"initialFocus="input"onMenuKeyDown={onMenuKeyDown}- trigger={(ref) => (- <button- ref={ref}- type="button"- className="project-underline"- data-testid="home-project-switcher"- aria-haspopup="menu"- aria-expanded={open}- aria-label={`${t("project.switchProject")}: ${name}`}- title={(workspace?.path === path ? workspace?.remote?.path : undefined) || path || t("project.switchProject")}- disabled={busy}- onClick={() => {- if (open) {- close();- return;- }- setQuery("");- setView("list");- setCloneUrl("");- setOpen(true);- }}- >- <span className="project-underline-name">{name}</span>- </button>- )}+ trigger={(ref) => {+ const toggle = () => {+ if (open) {+ close();+ return;+ }+ setQuery("");+ setView("list");+ setCloneUrl("");+ setOpen(true);+ };+ return variant === "chip" ? (+ <button+ ref={ref}+ type="button"+ className="home-project-chip"+ data-testid="home-project-switcher"+ aria-haspopup="menu"+ aria-expanded={open}+ disabled={busy}+ onClick={toggle}+ >+ <IconFolder size={14} aria-hidden />+ <span>{t("project.chooseProject")}</span>+ <IconChevronDown size={13} aria-hidden />+ </button>+ ) : (+ <button+ ref={ref}+ type="button"+ className="project-underline"+ data-testid="home-project-switcher"+ aria-haspopup="menu"+ aria-expanded={open}+ aria-label={`${t("project.switchProject")}: ${name ?? ""}`}+ title={(workspace?.path === path ? workspace?.remote?.path : undefined) || path || t("project.switchProject")}+ disabled={busy}+ onClick={toggle}+ >+ <span className="project-underline-name">{name}</span>+ </button>+ );+ }}>{view === "clone" ? (<div className="home-project-switcher-clone">@@ -359,7 +418,7 @@ export function HomeProjectSwitcher({onMouseEnter={() => setHighlight(index)}onClick={() => void selectMenuProject(project)}>- <IconFolder size={14} aria-hidden />+ {project.temporary ? <IconChat size={14} aria-hidden /> : <IconFolder size={14} aria-hidden />}<span className="home-project-switcher-item-name">{project.name}</span>diff --git a/apps/desktop/src/lib/api.ts b/apps/desktop/src/lib/api.tsindex 0ed17188b..98a223c37 100644--- a/apps/desktop/src/lib/api.ts+++ b/apps/desktop/src/lib/api.ts@@ -868,7 +868,8 @@ export const api = {/** Ask the host for a first-prompt title; it refuses a renamed session. */deriveSessionTitle: (id: string, title: string) =>invoke<{ updated: boolean }>(IPC.invoke.sessionDeriveTitle, id, title),- moveSessionProject: (sessionId: string, projectPath: string) =>+ /** `projectPath: null` moves the session out of its project. */+ moveSessionProject: (sessionId: string, projectPath: string | null) =>invoke<{ session: SessionSummary }>(IPC.invoke.sessionMoveProject, {sessionId,projectPath,diff --git a/apps/desktop/src/stores/app-state.ts b/apps/desktop/src/stores/app-state.tsindex e45e43b59..fb96f0741 100644--- a/apps/desktop/src/stores/app-state.ts+++ b/apps/desktop/src/stores/app-state.ts@@ -330,7 +330,8 @@ export type AppState = {restoreSession: (id: string) => void;renameSession: (id: string, title: string) => Promise<void>;/** Move an idle session into an already-known project, preserving history. */- moveSessionProject: (id: string, projectPath: string) => Promise<boolean>;+ /** `projectPath: null` moves the session into the temporary group. */+ moveSessionProject: (id: string, projectPath: string | null) => Promise<boolean>;deleteSession: (id: string) => Promise<void>;setSessionSort: (sort: SessionSort) => void;setSessionArchiveVisibility: (show: boolean) => void;diff --git a/apps/desktop/src/stores/slices/project-slice.ts b/apps/desktop/src/stores/slices/project-slice.tsindex bf5aa5e3d..7e168e7a3 100644--- a/apps/desktop/src/stores/slices/project-slice.ts+++ b/apps/desktop/src/stores/slices/project-slice.ts@@ -2,6 +2,7 @@ import { forgetTranscriptReadingState } from "../../lib/transcript-reading-positimport i18n from "i18next";import type { ProjectWorkspace } from "@pi-desktop/shared";import { api } from "../../lib/api";+import { isRemoteSession } from "../../lib/remote-session-safety";import {rememberProject,removeRecentProject,@@ -565,13 +566,15 @@ export function createProjectSlice({},moveSessionProject: async (id, projectPath) => {- const destinationKey = normalizeProjectPath(projectPath);const state = get();const session = state.sessions.find((item) => item.id === id);- if (!id || !session || !destinationKey) return false;+ if (!id || !session || session.source === "pi-native" || isRemoteSession(session)) return false;if (state.runningSessions[id]) return false;- if (normalizeProjectPath(session.projectPath) === destinationKey) return true;+ const destinationKey = projectPath === null ? null : normalizeProjectPath(projectPath);+ if (projectPath !== null && !destinationKey) return false;+ if ((normalizeProjectPath(session.projectPath) || null) === destinationKey) return true;if (+ destinationKey !== null &&!state.openProjectPaths.some((path) => normalizeProjectPath(path) === destinationKey,)@@ -581,9 +584,13 @@ export function createProjectSlice({const result = await api.moveSessionProject(id, projectPath);set((current) => ({sessions: current.sessions.map((item) =>- item.id === id ? { ...item, ...result.session } : item,+ item.id === id ? { ...item, ...result.session, projectPath: result.session.projectPath ?? undefined } : item,),}));+ // The active session decides the visible project: follow it so the+ // composer, file tree, and project instructions match the new owner.+ // Re-selecting aligns the workspace while keeping the conversation.+ if (get().activeSessionId === id) await get().selectSession(id, { record: false });return true;},diff --git a/apps/desktop/src/stores/slices/session-slice.ts b/apps/desktop/src/stores/slices/session-slice.tsindex 67eefd67f..f4ea410a7 100644--- a/apps/desktop/src/stores/slices/session-slice.ts+++ b/apps/desktop/src/stores/slices/session-slice.ts@@ -719,10 +719,15 @@ export function createSessionSlice({if (!(options && "projectPath" in options) && isRemoteSession(activeSession ?? (get().activeSessionId?.startsWith("remote:") ? { id: get().activeSessionId! } : undefined))) throw new Error(i18n.t("remote:REMOTE_PROJECT_REQUIRED"));+ // A global New Task (sidebar, titlebar, Cmd/Ctrl+N, palette, search)+ // starts a temporary conversation; only an explicit `projectPath` (a+ // project row's +, the home project picker, the project index, or a+ // worktree) attaches it to a project (issue #2455). An active remote+ // project is the exception above: it has no temporary group.const requestedProjectPath =options && "projectPath" in options? options.projectPath ?? null- : get().workspace?.path ?? null;+ : null;const isolated = options?.isolated === true;const scopeKey = `${runtime.newSessionScopeKey(requestedProjectPath)}${isolated ? "\u0000isolated" : ""}`;const pending = runtime.pendingNewSessionRequests.get(scopeKey);diff --git a/apps/desktop/src/styles/chat-shell.css b/apps/desktop/src/styles/chat-shell.cssindex 098f61f52..488200e72 100644--- a/apps/desktop/src/styles/chat-shell.css+++ b/apps/desktop/src/styles/chat-shell.css@@ -826,6 +826,43 @@border-radius: var(--radius-3xs);}+.empty-hero .home-project-chip {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 4px 10px;+ border: 1px solid var(--ds-border-subtle);+ border-radius: var(--radius-full);+ background: transparent;+ color: var(--ds-text-secondary);+ font-size: var(--text-sm);+ line-height: var(--leading-compact);+ cursor: pointer;+ transition: background-color 150ms ease, color 150ms ease;+}++.empty-hero .home-project-chip:hover,+.empty-hero .home-project-chip[aria-expanded="true"] {+ background: var(--ds-bg-hover);+ color: var(--ds-text-primary);+}++.empty-hero .home-project-chip:focus-visible {+ outline: 2px solid var(--ds-focus);+ outline-offset: 2px;+}++.empty-hero .home-project-chip:disabled {+ cursor: default;+ opacity: 0.6;+}++@media (prefers-reduced-motion: reduce) {+ .empty-hero .home-project-chip {+ transition: none;+ }+}+.home-project-switcher-menu {position: fixed;top: 0;diff --git a/apps/desktop/src/styles/chrome.css b/apps/desktop/src/styles/chrome.cssindex c7aafae9d..69a14f54c 100644--- a/apps/desktop/src/styles/chrome.css+++ b/apps/desktop/src/styles/chrome.css@@ -702,6 +702,39 @@white-space: nowrap;}+.conversation-topbar .ct-project-menu {+ display: inline-flex;+ flex: 0 1 auto;+ min-width: 0;+}++.conversation-topbar .ct-project-trigger {+ max-width: 100%;+ margin: -2px -4px;+ padding: 2px 4px;+ border: 0;+ border-radius: var(--radius-3xs);+ background: transparent;+ font: inherit;+ font-size: var(--text-xs);+ cursor: pointer;+}++.conversation-topbar .ct-project-trigger:hover,+.conversation-topbar .ct-project-trigger[aria-expanded="true"] {+ background: var(--ds-bg-hover);+ color: var(--ds-text-secondary);+}++.conversation-topbar .ct-project-trigger:focus-visible {+ outline: 2px solid var(--ds-focus);+ outline-offset: 1px;+}++.conversation-topbar .ct-project-trigger:disabled {+ cursor: default;+}+.conversation-topbar .ct-project > svg {flex: 0 0 auto;}diff --git a/apps/desktop/test/home-project-switcher.test.mjs b/apps/desktop/test/home-project-switcher.test.mjsindex a2bcdd0ae..4b61367da 100644--- a/apps/desktop/test/home-project-switcher.test.mjs+++ b/apps/desktop/test/home-project-switcher.test.mjs@@ -74,3 +74,15 @@ test("home project switcher trigger is the underlined name without a chevron", (/\.empty-hero \.project-underline\[aria-expanded="true"\] \.project-underline-name \{[\s\S]*?text-decoration-style:\s*solid;/,);});++test("home project switcher lists No project first and has a chip for temporary homes (#2455)", () => {+ assert.match(switcher, /key: TEMPORARY_KEY, name: temporaryLabel/);+ assert.match(switcher, /if \(project\.temporary\) return selectTemporary\(\);/);+ assert.match(switcher, /await newSession\(\{ projectPath: null \}\)/);+ assert.match(switcher, /className="home-project-chip"/);+ assert.match(switcher, /t\("project\.chooseProject"\)/);+ // A temporary or projectless home offers the chip; a project home keeps+ // the underlined name in its title.+ assert.match(chatSurface, /\{heroProject \? null : <HomeProjectSwitcher variant="chip" \/>\}/);+ assert.match(styles, /\.empty-hero \.home-project-chip \{[\s\S]*?border-radius:\s*var\(--radius-full\);/);+});diff --git a/apps/desktop/test/session-project-move.test.mjs b/apps/desktop/test/session-project-move.test.mjsindex f285a13c3..39f7a00f8 100644--- a/apps/desktop/test/session-project-move.test.mjs+++ b/apps/desktop/test/session-project-move.test.mjs@@ -35,7 +35,10 @@ test("session project move is a durable host command, not a renderer-only regrouconst runningTurnHelper =sessions.match(/pub fn session_has_running_turn\([\s\S]*?\n\}\n/)?.[0] ?? "";assert.match(runningTurnHelper, /SELECT EXISTS\([\s\S]*?status = 'running'/);- assert.match(moveBlock, /db\.ensure_project\(project_path, false\)/);+ assert.match(moveBlock, /Some\(path\) => Some\(db\.ensure_project\(path, false\)\?\)/);+ // An explicit null moves the session into the temporary group (#2455).+ assert.match(moveBlock, /None => None/);+ assert.match(rpc, /Some\(Value::Null\) => None/);assert.match(moveBlock,/UPDATE sessions SET project_id = \?1, updated_at = \?2 WHERE id = \?3/,@@ -72,12 +75,12 @@ test("a successful move rebinds the live agent to the new project", () => {test("renderer api and store expose one guarded move action", () => {assert.match(api,- /moveSessionProject:\s*\(sessionId: string, projectPath: string\)/,+ /moveSessionProject:\s*\(sessionId: string, projectPath: string \| null\)/,);assert.match(api, /IPC\.invoke\.sessionMoveProject/);assert.match(store,- /moveSessionProject: \(id: string, projectPath: string\) => Promise<boolean>;/,+ /moveSessionProject: \(id: string, projectPath: string \| null\) => Promise<boolean>;/,);const storeBlock = store.match(/moveSessionProject: async \(id, projectPath\)[\s\S]*?\n \},\n/)?.[0] ?? "";diff --git a/apps/desktop/test/session-project-scope.test.mjs b/apps/desktop/test/session-project-scope.test.mjsnew file mode 100644index 000000000..71b49474b--- /dev/null+++ b/apps/desktop/test/session-project-scope.test.mjs@@ -0,0 +1,137 @@+import assert from "node:assert/strict";+import { register } from "node:module";+import test from "node:test";++register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));+const { api } = await import("../src/lib/api.ts");+const { createSessionRuntime } = await import("../src/stores/runtime/session-runtime.ts");+const { createSessionCoordination } = await import("../src/stores/runtime/session-coordination.ts");+const { createSessionSlice } = await import("../src/stores/slices/session-slice.ts");+const { createProjectSlice } = await import("../src/stores/slices/project-slice.ts");++/**+ * Issue #2455: a global New Task starts a temporary conversation, and an idle+ * conversation can leave its project or join one without losing anything.+ */+function fixture(t) {+ const createRequests = [];+ const moveRequests = [];+ let created = 0;+ let state = {+ activeSessionId: undefined, page: "chat", sessions: [], messages: [],+ sessionMeta: {}, pendingPlans: {}, planCheckpoints: {}, planningStates: {},+ runningSessions: {}, agentStatuses: {}, latestTurnResults: {}, sessionOutcomes: {},+ sessionCompactions: {}, sessionHistory: {}, retainedSessionIds: [], retainedTranscripts: {},+ workPanelContexts: {}, workPanelTabs: [], activeWorkPanelTabId: null,+ workPanelOpen: false, workPanelFileRequest: null, navStack: [], navIndex: -1,+ settings: {}, providers: [], providerModels: {}, recentModels: [], draftConfiguration: null,+ workspace: { path: "/synthetic/project", name: "project" }, activeProjectPath: "/synthetic/project",+ openProjectPaths: ["/synthetic/project", "/synthetic/other"], openProjects: [], projectMeta: {},+ queuedPrompts: {},+ refreshSessions: async () => {}, rememberModel: () => {}, showToast: () => {},+ resetWorkPanelContext: () => {},+ };+ const get = () => state;+ const set = (update) => { state = { ...state, ...(typeof update === "function" ? update(state) : update) }; };+ const runtime = createSessionRuntime({ get, set });+ const withoutRecordKey = (record, key) => { const result = { ...record }; delete result[key]; return result; };+ t.mock.method(api, "createSession", async (input) => {+ createRequests.push(input);+ const id = `created-${++created}`;+ return { session: { id, title: "New task", mode: "agent", messageCount: 0,+ projectPath: input.projectPath ?? undefined, updatedAt: "2026-11-20T00:00:00Z" } };+ });+ t.mock.method(api, "moveSessionProject", async (sessionId, projectPath) => {+ moveRequests.push({ sessionId, projectPath });+ const session = state.sessions.find((item) => item.id === sessionId);+ // The host omits `projectPath` for a temporary session.+ const { projectPath: _old, ...rest } = session;+ return { session: projectPath === null ? rest : { ...rest, projectPath } };+ });+ t.mock.method(api, "setProject", async (path) => ({ workspace: { path, name: "project" } }));+ t.mock.method(api, "clearProject", async () => {});+ t.mock.method(api, "getOnboarding", async () => ({}));+ const coordination = createSessionCoordination({+ get, set, runtime, decorateSessions: (rows) => rows, withoutRecordKey,+ untitledTaskTitle: () => "New task",+ });+ Object.assign(state, createSessionSlice({+ get, set, runtime, decorateSessions: (rows) => rows, withoutRecordKey,+ ...coordination, getBootstrapGeneration: () => 0,+ }));+ const project = createProjectSlice({+ get, set, runtime, withoutRecordKey,+ withProjectDisplayName: (workspace) => workspace,+ promoteProjectPath: (paths, path) => [path, ...paths.filter((item) => item !== path)],+ removeProjectPath: (paths, path) => paths.filter((item) => item !== path),+ upsertWorkspace: (projects, workspace) => [...projects.filter((item) => item.path !== workspace.path), workspace],+ persistCurrentSidebar: () => {},+ });+ Object.assign(state, {+ moveSessionProject: project.moveSessionProject,+ // Stand-ins that keep only the visible-project effect.+ clearProject: async () => set({ workspace: null, activeProjectPath: undefined }),+ activateProject: async (path) => {+ const workspace = { path, name: "project" };+ set({ workspace, activeProjectPath: path });+ return workspace;+ },+ selectSession: async (id) => {+ const session = state.sessions.find((item) => item.id === id);+ if (session?.projectPath) await state.activateProject(session.projectPath);+ else await state.clearProject();+ set({ activeSessionId: id });+ },+ });+ return { get, set, createRequests, moveRequests };+}++test("global New Task starts a temporary conversation inside a project", async (t) => {+ const f = fixture(t);+ await f.get().newSession();+ assert.equal(f.createRequests.length, 1);+ assert.equal(f.createRequests[0].projectPath, undefined, "the active project is not inherited");+ assert.equal(f.get().workspace, null, "the visible project is released");+ assert.equal(f.get().sessions[0].projectPath, undefined);+});++test("an explicit project target still attaches the new conversation", async (t) => {+ const f = fixture(t);+ f.set({ workspace: null, activeProjectPath: undefined });+ await f.get().newSession({ projectPath: "/synthetic/other" });+ assert.equal(f.createRequests[0].projectPath, "/synthetic/other");+ assert.equal(f.get().workspace?.path, "/synthetic/other");+});++test("an idle conversation leaves its project and joins another", async (t) => {+ const f = fixture(t);+ f.set({+ activeSessionId: "s1",+ sessions: [{ id: "s1", title: "Work", mode: "agent", messageCount: 4,+ projectPath: "/synthetic/project", updatedAt: "2026-11-20T00:00:00Z" }],+ });++ assert.equal(await f.get().moveSessionProject("s1", null), true);+ assert.deepEqual(f.moveRequests.at(-1), { sessionId: "s1", projectPath: null });+ assert.equal(f.get().sessions[0].projectPath, undefined, "the stale project path is cleared");+ assert.equal(f.get().sessions[0].messageCount, 4, "the conversation keeps its transcript");+ assert.equal(f.get().workspace, null, "the active conversation's workspace follows it");+ assert.equal(f.get().activeSessionId, "s1", "the conversation stays open");++ assert.equal(await f.get().moveSessionProject("s1", "/synthetic/other"), true);+ assert.equal(f.get().sessions[0].projectPath, "/synthetic/other");+ assert.equal(f.get().workspace?.path, "/synthetic/other");+});++test("moving is refused for running sessions and unopened projects", async (t) => {+ const f = fixture(t);+ f.set({+ sessions: [{ id: "s1", title: "Work", mode: "agent", messageCount: 1, updatedAt: "2026-11-20T00:00:00Z" }],+ runningSessions: { s1: true },+ });+ assert.equal(await f.get().moveSessionProject("s1", "/synthetic/project"), false);+ f.set({ runningSessions: {} });+ assert.equal(await f.get().moveSessionProject("s1", "/not/open"), false);+ assert.equal(await f.get().moveSessionProject("s1", null), true, "already temporary is a no-op");+ assert.equal(f.moveRequests.length, 0);+});diff --git a/apps/desktop/test/topbar-title-rendering.test.mjs b/apps/desktop/test/topbar-title-rendering.test.mjsindex 21f6ae8ef..4dd0900ef 100644--- a/apps/desktop/test/topbar-title-rendering.test.mjs+++ b/apps/desktop/test/topbar-title-rendering.test.mjs@@ -88,10 +88,12 @@ test("topbar renders the session's project crumb and preserves complete titles","the rename affordance carries the visible title",);assert.ok(- html.includes('class="ct-project"') &&+ /class="ct-project[ "]/.test(html) &&html.includes('class="ct-project-name">Project</span>'),"the crumb names the session's project",);+ // An idle local conversation can move between projects from its crumb.+ assert.ok(html.includes('data-action="conversation-project"'));assert.ok(html.includes('<span class="ct-sep" aria-hidden="true">/</span>'),"the project and the task are separated by a slash",@@ -107,21 +109,37 @@ test("topbar renders the session's project crumb and preserves complete titles",});});-test("a session without a project keeps only the title", async () => {+test("a session without a project offers a No project crumb to choose one", async () => {await withTopbar(async ({ render }) => {const html = render({activeSessionId: "temp-test",sessions: [{ id: "temp-test", title: "Scratch pad" }],projectMeta: { "/project": { name: "Project" } },+ runningSessions: {},});- assert.ok(!html.includes('class="ct-project"'), "no folder crumb without a project");- assert.ok(!html.includes('class="ct-sep"'), "no separator without a project");+ // Issue #2455: a temporary conversation can join a project from the crumb.+ assert.match(html, /class="ct-project ct-project-trigger is-temporary"[^>]*data-action="conversation-project"/);+ assert.ok(html.includes(`class="ct-project-name">${catalogs.en.project.noProject}</span>`));+ assert.ok(!html.includes('class="ct-project-name">Project</span>'), "no project is named");assert.match(html, /class="ct-title">[\s\S]*?Scratch pad/);assert.ok(html.includes('title="Scratch pad"'));});});+test("a running temporary session keeps only the title", async () => {+ await withTopbar(async ({ render }) => {+ const html = render({+ activeSessionId: "temp-test",+ sessions: [{ id: "temp-test", title: "Scratch pad" }],+ runningSessions: { "temp-test": true },+ });++ assert.ok(!html.includes("ct-project"), "a running session cannot move");+ assert.ok(!html.includes('class="ct-sep"'), "no separator without a project");+ });+});+test("an empty chat names the active workspace and stays read-only", async () => {await withTopbar(async ({ render }) => {const html = render({diff --git a/crates/host-core/src/rpc/mod.rs b/crates/host-core/src/rpc/mod.rsindex 077429234..2d16e85b4 100644--- a/crates/host-core/src/rpc/mod.rs+++ b/crates/host-core/src/rpc/mod.rs@@ -2880,12 +2880,18 @@ async fn handle_request(.map(str::trim).filter(|value| !value.is_empty()).ok_or_else(|| rpc_err(1002, "sessionId required", "INVALID_PARAMS"))?;- let project_path = params- .get("projectPath")- .and_then(|v| v.as_str())- .map(str::trim)- .filter(|value| !value.is_empty())- .ok_or_else(|| rpc_err(1002, "projectPath required", "INVALID_PARAMS"))?;+ // An explicit `null` detaches the session from its project; a+ // missing key or a blank string remains a caller error.+ let project_path = match params.get("projectPath") {+ Some(Value::Null) => None,+ value => Some(+ value+ .and_then(|v| v.as_str())+ .map(str::trim)+ .filter(|value| !value.is_empty())+ .ok_or_else(|| rpc_err(1002, "projectPath required", "INVALID_PARAMS"))?,+ ),+ };let st = state.lock().await;// An isolated session's worktree belongs to its project's repository.let isolated = crate::session_worktrees::registry::for_owner(&st.db, session_id, None)diff --git a/crates/host-core/src/sessions.rs b/crates/host-core/src/sessions.rsindex 08d5aba39..e24fdd72b 100644--- a/crates/host-core/src/sessions.rs+++ b/crates/host-core/src/sessions.rs@@ -2294,7 +2294,8 @@ pub enum MoveSessionProjectResult {Busy,}-/// Move an idle session to another project.+/// Move an idle session to another project, or out of any project when+/// `project_path` is `None` (it then joins the temporary group).////// Only the session's project association and `updated_at` change: transcript,/// revisions, artifacts, notifications, scratch data, and runtime state belong@@ -2304,7 +2305,7 @@ pub enum MoveSessionProjectResult {pub fn move_session_project(db: &Database,id: &str,- project_path: &str,+ project_path: Option<&str>,) -> Result<MoveSessionProjectResult> {if get_session(db, id)?.is_none() {return Ok(MoveSessionProjectResult::NotFound);@@ -2312,7 +2313,10 @@ pub fn move_session_project(if session_has_running_turn(db, id)? {return Ok(MoveSessionProjectResult::Busy);}- let project_id = db.ensure_project(project_path, false)?;+ let project_id = match project_path {+ Some(path) => Some(db.ensure_project(path, false)?),+ None => None,+ };db.conn().prepare_cached("UPDATE sessions SET project_id = ?1, updated_at = ?2 WHERE id = ?3")?.execute(params![project_id, now_ms(), id])?;@@ -7540,7 +7544,8 @@ mod tests {// with forward slashes.let target_path = crate::db::canonical_project_path(&target.to_string_lossy()).expect("canonical project path");- let moved = move_session_project(&db, &session.id, &target.to_string_lossy()).unwrap();+ let moved =+ move_session_project(&db, &session.id, Some(&target.to_string_lossy())).unwrap();let MoveSessionProjectResult::Moved(summary) = moved else {panic!("an idle session must move to the requested project");};@@ -7555,20 +7560,39 @@ mod tests {// instruction roots mid-turn.let turn = begin_turn(&db, &session.id, None, None).unwrap();assert!(matches!(- move_session_project(&db, &session.id, &source.to_string_lossy()).unwrap(),+ move_session_project(&db, &session.id, Some(&source.to_string_lossy())).unwrap(),MoveSessionProjectResult::Busy));end_turn(&db, &turn, "aborted", None, None, false).unwrap();assert!(matches!(- move_session_project(&db, &session.id, &source.to_string_lossy()).unwrap(),+ move_session_project(&db, &session.id, Some(&source.to_string_lossy())).unwrap(),MoveSessionProjectResult::Moved(_)));assert!(matches!(- move_session_project(&db, "missing-session", &source.to_string_lossy()).unwrap(),+ move_session_project(&db, "missing-session", Some(&source.to_string_lossy())).unwrap(),MoveSessionProjectResult::NotFound));- assert!(move_session_project(&db, &session.id, " ").is_err());+ assert!(move_session_project(&db, &session.id, Some(" ")).is_err());++ // `None` detaches the session into the temporary group and keeps it+ // otherwise intact; it can then move back into a project.+ let MoveSessionProjectResult::Moved(detached) =+ move_session_project(&db, &session.id, None).unwrap()+ else {+ panic!("an idle session must leave its project");+ };+ assert_eq!(detached.project_path, None);+ assert_eq!(detached.title, "Move me");+ let MoveSessionProjectResult::Moved(reattached) =+ move_session_project(&db, &session.id, Some(&target.to_string_lossy())).unwrap()+ else {+ panic!("a temporary session must move into a project");+ };+ assert_eq!(+ reattached.project_path.as_deref(),+ Some(target_path.as_str())+ );}#[test]diff --git a/docs/spec/03-runtime/06-host-rpc-protocol.md b/docs/spec/03-runtime/06-host-rpc-protocol.mdindex f73d90cc6..1dd79426f 100644--- a/docs/spec/03-runtime/06-host-rpc-protocol.md+++ b/docs/spec/03-runtime/06-host-rpc-protocol.md@@ -420,7 +420,11 @@ to later refresh and inference; the vendor picker does not collect them.project and returns `{ session }` carrying the canonical project path. Itupserts the project row and updates only `sessions.project_id` and`updated_at`; transcript, revisions, artifacts, notifications, and scratch- data stay with the session. Blank ids or paths are `INVALID_PARAMS`, an+ data stay with the session. An explicit `projectPath: null` moves the+ session out of its project into the temporary group (`project_id` becomes+ `NULL`, `projectPath` is omitted from the summary); older hosts reject it as+ `INVALID_PARAMS`. Blank ids, a missing key, or blank paths are+ `INVALID_PARAMS`, anunknown session is `NOT_FOUND`, and a session with a running turn is`CONFLICT` so a live agent never switches instruction roots mid-turn.An isolated session is refused with `WORKTREE_MOVE_UNSUPPORTED`.diff --git a/docs/spec/04-ux/01-ui-ia.md b/docs/spec/04-ux/01-ui-ia.mdindex cfd2925d7..8c0d83a30 100644--- a/docs/spec/04-ux/01-ui-ia.md+++ b/docs/spec/04-ux/01-ui-ia.md@@ -502,14 +502,21 @@ shared capability contract:switcher of the sidebar's open projects instead of the folder picker. Anopen project with no session yet names the hero the same way, because thatempty home already belongs to it and a task started there lands in the- project. A temporary session shows dedicated temporary-chat copy with no- project underline or switcher; and with no project open the generic welcome- title stands.-- New task resolves the current project or temporary group by its most recent- session: if that session has `messageCount = 0`, it is selected and reused;- otherwise a durable empty session is created immediately and appears in the- sidebar. Repeated clicks therefore keep one empty slot per visible group;- an empty slot remains persisted until the user deletes or archives it.+ project. A temporary session shows dedicated temporary-chat copy, and with+ no project open the generic welcome title stands; both show a "Choose+ project" chip under the title that opens the same switcher. The switcher+ lists "No project" first, so the next task can leave or join a project from+ the empty home.+- New task resolves the temporary group by its most recent session: if that+ session has `messageCount = 0`, it is selected and reused; otherwise a+ durable empty session is created immediately and appears in the sidebar. A+ project row's `+` and the empty-home switcher resolve their target group the+ same way. Repeated clicks therefore keep one empty slot per target group; an+ empty slot remains persisted until the user deletes or archives it.+- The conversation topbar's project crumb (or a "No project" crumb for a+ temporary session) opens a menu that moves an idle local conversation into+ another open project or out of any project. Running, remote, native, and+ isolated-worktree sessions show the static crumb.## 6. Keyboard map (IA level)diff --git a/docs/spec/04-ux/04-builtin-commands.md b/docs/spec/04-ux/04-builtin-commands.mdindex b58613906..b30d6369d 100644--- a/docs/spec/04-ux/04-builtin-commands.md+++ b/docs/spec/04-ux/04-builtin-commands.md@@ -22,7 +22,7 @@ builtin command contracts.| id | title | keywords | category | risk | behavior ||---|---|---|---|---|---|-| `builtin.session.new` | New Task | new, chat, task | Session | low | reuse the latest empty session in the current group or create a durable empty session, then focus the composer |+| `builtin.session.new` | New Task | new, chat, task | Session | low | reuse the latest empty session in the temporary group or create a durable empty session, then focus the composer || `builtin.agent.compact` | Compact Conversation Context | compact, context, tokens | Session | low | create a model-context checkpoint for the idle active session || `builtin.mode.agent` | Switch to Agent | mode, agent | Session | low | set the idle session mode to Agent || `builtin.mode.plan` | Switch to Plan | mode, plan, planning | Session | low | set the idle session mode to Plan |@@ -34,10 +34,14 @@ builtin command contracts.- The six IDs are the complete first-party registry. Removed IDs are notpalette results and are not renderer dispatch cases; plugin commands remainindependently discoverable.-- `New Task` uses the current project or temporary group. It selects the- group's most recent empty session when present; otherwise it reveals the- empty home on the first frame and creates the durable empty session. The- action is idempotent within a group.+- `New Task` starts in the temporary group, never the project the user happens+ to be viewing (issue #2455). It selects that group's most recent empty+ session when present; otherwise it reveals the empty home on the first frame+ and creates the durable empty session. The action is idempotent within the+ temporary group. Project-scoped actions — a project row's `+`, the empty-home+ project switcher, the project index, and worktree sessions — pass their+ target path explicitly and stay in that project. An active remote session+ keeps creating in its remote project.- `Compact Conversation Context` is available while the active session is idle;an active turn or checkpoint remains busy according to the existing compactioncontract.diff --git a/docs/spec/04-ux/09-interaction-patterns.md b/docs/spec/04-ux/09-interaction-patterns.mdindex 28a6937dd..0c8ba2310 100644--- a/docs/spec/04-ux/09-interaction-patterns.md+++ b/docs/spec/04-ux/09-interaction-patterns.md@@ -362,8 +362,9 @@ may be retained while exactly one workspace supplies the visible shell context.falls back to latest, and read failures use the existing error notification.- New Task is not a cold switch. Creating a session reveals the empty home onthe first frame (the previous conversation and retained panes clear before- `session.create`). Reusing the group's latest empty session commits that empty- transcript on the same frame rather than waiting for `session.get`. The+ `session.create`). Reusing the target group's latest empty session commits+ that empty transcript on the same frame rather than waiting for+ `session.get`. Thedurable row is inserted from the `session.create` summary; send and paste waitfor that in-flight create instead of opening a second slot (ADR 0154).Concurrent first-input materializations share the same project-scoped@@ -384,6 +385,8 @@ may be retained while exactly one workspace supplies the visible shell context.the visible workspace. Project-scoped new-session actions pass their targetpath to that same store transaction; sidebar and project-index handlers donot perform a second project navigation before session creation or selection.+ Global New Task actions pass no path, so they clear the visible workspace and+ resolve only the temporary group.- Run state, permission grants, and streamed events are keyed by session id.A project/tab switch does not abort a background turn or copy its events intothe visible transcript. Background message and tool events update that@@ -1441,8 +1444,11 @@ Sidebar drag/drop is implemented:- The dragged row paints at opacity 0.5 and the eligible project grouphighlights with an accent outline. A session's own project group is not adrop target, so a same-project drag never issues a request.-- Project reassignment is available through the drag/drop interaction only;- the session context menu does not contain a project list.+- Project reassignment is also available from the conversation topbar's+ project crumb, which can move an idle conversation into another open+ project or out of any project (`session.moveProject` with `projectPath:+ null`); the sidebar session context menu does not contain a project list.+ When the moved conversation is active, the visible workspace follows it.- Dropping a folder on the projects list adds it as a project, or switches toit when it is already known; duplicate paths resolve to one project row. Adrop that carries no folder reports why nothing happened.diff --git a/docs/spec/06-delivery/e2e/conversation.md b/docs/spec/06-delivery/e2e/conversation.mdindex 926e54c0a..4b36d97da 100644--- a/docs/spec/06-delivery/e2e/conversation.md+++ b/docs/spec/06-delivery/e2e/conversation.md@@ -983,11 +983,15 @@ folder/mixed-selection behavior. No system clipboard contents are changed.- **Preconditions**: Provider configured; at least one real session exists sothe sidebar history is non-empty.- **Steps**: 1) Invoke New Task from the sidebar, the top bar, or Cmd/Ctrl+N- inside a retained project and in the temporary scope. 2) Inspect the sidebar- history and the composer. 3) Click the same group's New Task control several- times quickly. 4) Type a message and send it. 5) Inspect the sidebar history- again and repeat in a different project group.-- **Expected**: When the group's latest session is non-empty, the empty home+ while a retained project is active, then use a project row's `+` action.+ 2) Inspect the sidebar history and the composer. 3) Click the same target's+ New Task control several times quickly. 4) Type a message and send it. 5)+ Inspect the sidebar history again and repeat for a different project group.+- **Expected**: Global New Task creates a path-less conversation in the+ temporary group and clears the visible workspace, whatever project was+ active (issue #2455); only a project row's `+` or the empty-home project+ switcher creates inside a project. When the target group's latest session is+ non-empty, the empty homereplaces the previous transcript on the first frame, then one new row ispersisted from `session.create` (without a blocking `session.list` /`session.get` round-trip) and selected before the first send. Once that row@@ -1001,7 +1005,29 @@ folder/mixed-selection behavior. No system clipboard contents are changed.- **Milestone**: M2- **Status**: Source-level regression covered(`app-store-sidebar.test.mjs`, `composer-send-state.test.mjs`,- `session-create.test.mjs`); full UI scenario Draft+ `session-create.test.mjs`, `session-project-scope.test.mjs`); full UI+ scenario Draft++## E2E-011f2: A conversation leaves or joins a project from its crumb++- **Preconditions**: Two projects are open; one idle conversation with+ messages belongs to the first project and one temporary conversation exists.+- **Steps**: 1) Open the project conversation and choose "No project" from the+ topbar project crumb. 2) Choose the second project from the same crumb. 3)+ Open the temporary conversation's empty home or topbar and choose a project.+ 4) Start a turn and open the crumb while it runs.+- **Expected**: Each move keeps the transcript, title, and model, regroups the+ sidebar row, and the visible workspace follows the active conversation. The+ next turn uses the new project's instructions (or none). A running,+ remote, native, or isolated-worktree conversation shows a static crumb and+ cannot move.+- **Specs linked**: `04-ux/01-ui-ia.md` (§5), `04-ux/09-interaction-patterns.md`+- **Acceptance**: C (session grouping), F (persistence)+- **Milestone**: M2+- **Status**: Source-level regression covered (`session-project-scope.test.mjs`,+ `topbar-title-rendering.test.mjs`, host-core+ `move_session_project_reassigns_only_the_project_and_rejects_running_turns`);+ full UI scenario Draft## E2E-011e: Empty-session reuse is scoped to the latest sessiondiff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex d83783b57..efb0718f7 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -274,6 +274,8 @@ export const de = {"sortName": "Name","sortCreated": "Erstellungsdatum","sessionMoved": "Verschoben nach {{name}}",+ "moveToProject": "In Projekt verschieben",+ "sessionMovedToTemporary": "Aus dem Projekt entfernt","moveRunningSessionBlocked": "Beende zuerst die laufende Sitzung.","deleteRunningSessionBlocked": "Beenden Sie die laufende Sitzung, bevor Sie sie löschen.","moveSessionUnavailable": "Diese Sitzung kann nicht in dieses Projekt verschoben werden.",@@ -2148,6 +2150,9 @@ sklm: {"createFolderRequired": "Füge mindestens einen Ordner hinzu.","active": "Aktiv","switchProject": "Projekt wechseln",+ "noProject": "Kein Projekt",+ "noProjectHint": "Temporärer Chat außerhalb von Projekten",+ "chooseProject": "Projekt wählen","clone": "Git-Projekt klonen","cloneUrlPlaceholder": "https://github.com/org/repo.git","cloneUrlHint": "Fügen Sie eine Repository-URL ein und wählen Sie dann einen Ordner.",diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex c8321c1a2..475e03a45 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -281,6 +281,8 @@ export const en = {sortName: "Name",sortCreated: "Created date",sessionMoved: "Moved to {{name}}",+ moveToProject: "Move to project",+ sessionMovedToTemporary: "Moved out of the project",moveRunningSessionBlocked: "Stop the running session before moving it.",deleteRunningSessionBlocked: "Stop the running session before deleting it.",moveSessionUnavailable: "This session cannot move to that project.",@@ -2168,6 +2170,9 @@ sklm: {createFolderRequired: "Add at least one folder.",active: "Active",switchProject: "Switch project",+ noProject: "No project",+ noProjectHint: "Temporary chat outside any project",+ chooseProject: "Choose project",clone: "Clone git project",cloneUrlPlaceholder: "https://github.com/org/repo.git",cloneUrlHint: "Paste a repository URL, then pick a folder.",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex f12c5da33..1f7b6b784 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -274,6 +274,8 @@ export const es = {"sortName": "Nombre","sortCreated": "Fecha de creación","sessionMoved": "Movido a {{name}}",+ "moveToProject": "Mover a proyecto",+ "sessionMovedToTemporary": "Se quitó del proyecto","moveRunningSessionBlocked": "Detén la sesión en ejecución antes de moverla.","deleteRunningSessionBlocked": "Detén la sesión en ejecución antes de eliminarla.","moveSessionUnavailable": "Esta sesión no puede moverse a ese proyecto.",@@ -2148,6 +2150,9 @@ sklm: {"createFolderRequired": "Añade al menos una carpeta.","active": "Activo","switchProject": "Cambiar de proyecto",+ "noProject": "Sin proyecto",+ "noProjectHint": "Chat temporal fuera de cualquier proyecto",+ "chooseProject": "Elegir proyecto","clone": "Clonar proyecto git","cloneUrlPlaceholder": "https://github.com/org/repo.git","cloneUrlHint": "Pega la URL del repositorio y elige una carpeta.",diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex 6392ce211..878a4eb61 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -274,6 +274,8 @@ export const fr = {"sortName": "Nom","sortCreated": "Date de création","sessionMoved": "Déplacé vers {{name}}",+ "moveToProject": "Déplacer vers un projet",+ "sessionMovedToTemporary": "Retiré du projet","moveRunningSessionBlocked": "Arrêtez la session en cours avant de la déplacer.","deleteRunningSessionBlocked": "Arrêtez la session en cours avant de la supprimer.","moveSessionUnavailable": "Cette session ne peut pas être déplacée vers ce projet.",@@ -2148,6 +2150,9 @@ sklm: {"createFolderRequired": "Ajoutez au moins un dossier.","active": "Actif","switchProject": "Changer de projet",+ "noProject": "Aucun projet",+ "noProjectHint": "Discussion temporaire hors de tout projet",+ "chooseProject": "Choisir un projet","clone": "Cloner un projet git","cloneUrlPlaceholder": "https://github.com/org/repo.git","cloneUrlHint": "Collez l’URL du dépôt, puis choisissez un dossier.",diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex e79e951ed..d93edb107 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -283,6 +283,8 @@ export const ko = {sortName: "이름",sortCreated: "생성일",sessionMoved: "{{name}}(으)로 이동함",+ moveToProject: "프로젝트로 이동",+ sessionMovedToTemporary: "프로젝트에서 제외함",moveRunningSessionBlocked: "이동하기 전에 실행 중인 세션을 중지하세요.",deleteRunningSessionBlocked: "실행 중인 세션을 먼저 중지한 후 삭제하세요.",moveSessionUnavailable: "이 세션은 해당 프로젝트로 이동할 수 없습니다.",@@ -2164,6 +2166,9 @@ sklm: {createFolderRequired: "폴더를 하나 이상 추가하세요.",active: "활성",switchProject: "프로젝트 전환",+ noProject: "프로젝트 없음",+ noProjectHint: "어떤 프로젝트에도 속하지 않는 임시 대화",+ chooseProject: "프로젝트 선택",clone: "Git 프로젝트 클론",cloneUrlPlaceholder: "https://github.com/org/repo.git",cloneUrlHint: "저장소 URL을 붙여넣은 다음 폴더를 선택하세요.",diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.tsindex 3b80d613b..27bed3307 100644--- a/packages/i18n/src/locales/pt-BR/index.ts+++ b/packages/i18n/src/locales/pt-BR/index.ts@@ -273,6 +273,8 @@ export const ptBR = {sortName: "Nome",sortCreated: "Data de criação",sessionMoved: "Movido para {{name}}",+ moveToProject: "Mover para projeto",+ sessionMovedToTemporary: "Removido do projeto",moveRunningSessionBlocked: "Interrompa a sessão em execução antes de movê-la.",deleteRunningSessionBlocked: "Encerre a sessão em execução antes de excluí-la.",moveSessionUnavailable: "Esta sessão não pode ser movida para esse projeto.",@@ -2118,6 +2120,9 @@ export const ptBR = {createFolderRequired: "Adicione ao menos uma pasta.",active: "Ativo",switchProject: "Alternar projeto",+ noProject: "Sem projeto",+ noProjectHint: "Conversa temporária fora de qualquer projeto",+ chooseProject: "Escolher projeto",clone: "Clonar projeto git",cloneUrlPlaceholder: "https://github.com/org/repo.git",cloneUrlHint: "Cole a URL do repositório e escolha uma pasta.",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex 274330df4..de25734ef 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -283,6 +283,8 @@ export const tr = {sortName: "Ad",sortCreated: "Oluşturma tarihi",sessionMoved: "{{name}} konumuna taşındı",+ moveToProject: "Projeye taşı",+ sessionMovedToTemporary: "Projeden çıkarıldı",moveRunningSessionBlocked: "Taşımadan önce çalışan oturumu durdurun.",deleteRunningSessionBlocked: "Silmeden önce çalışan oturumu durdurun.",moveSessionUnavailable: "Bu oturum o projeye taşınamaz.",@@ -2158,6 +2160,9 @@ sklm: {createFolderRequired: "En az bir klasör ekleyin.",active: "Etkin",switchProject: "Projeyi değiştir",+ noProject: "Proje yok",+ noProjectHint: "Herhangi bir projeye ait olmayan geçici sohbet",+ chooseProject: "Proje seç",clone: "Git projesi kopyala",cloneUrlPlaceholder: "https://github.com/org/repo.git",cloneUrlHint: "Depo URL’sini yapıştırın, ardından bir klasör seçin.",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex 77f106e06..1ce596a59 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -276,6 +276,8 @@ export const zhCN = {sortName: "名称",sortCreated: "创建时间",sessionMoved: "已移动到 {{name}}",+ moveToProject: "移动到项目",+ sessionMovedToTemporary: "已移出项目",moveRunningSessionBlocked: "请先停止运行中的会话,再移动它。",deleteRunningSessionBlocked: "请先停止运行中的会话,再删除它。",moveSessionUnavailable: "该会话无法移动到目标项目。",@@ -2143,6 +2145,9 @@ sklm: {createFolderRequired: "请至少添加一个文件夹。",active: "当前",switchProject: "切换项目",+ noProject: "不使用项目",+ noProjectHint: "不属于任何项目的临时会话",+ chooseProject: "选择项目",clone: "克隆 Git 项目",cloneUrlPlaceholder: "https://github.com/org/repo.git",cloneUrlHint: "粘贴仓库地址,然后选择保存位置。",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex abf4614fb..7e744103b 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -276,6 +276,8 @@ export const zhTW = {sortName: "名稱",sortCreated: "建立時間",sessionMoved: "已移動到 {{name}}",+ moveToProject: "移動到專案",+ sessionMovedToTemporary: "已移出專案",moveRunningSessionBlocked: "請先停止執行中的工作階段,再移動它。",deleteRunningSessionBlocked: "請先停止執行中的會話,再刪除它。",moveSessionUnavailable: "此工作階段無法移動到目標專案。",@@ -2143,6 +2145,9 @@ sklm: {createFolderRequired: "請至少新增一個資料夾。",active: "當前",switchProject: "切換專案",+ noProject: "不使用專案",+ noProjectHint: "不屬於任何專案的臨時對話",+ chooseProject: "選擇專案",clone: "克隆 Git 專案",cloneUrlPlaceholder: "https://github.com/org/repo.git",cloneUrlHint: "貼上儲存庫網址,然後選擇儲存位置。",