You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "MoonOld (via GitHub)" <gi...@apache.org> on 2026/09/16 09:07:27 UTC

[I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

MoonOld opened a new issue, #5389:
URL: https://github.com/apache/maka/issues/5389

   ### Problem
   
   Creating a project in the desktop app is currently bound to picking an existing
   directory. Every entry point — the composer's "Add project", the `+` next to the
   Projects header, and Settings → Projects — goes through a native folder picker
   and registers that folder as the project's identity.
   
   That makes Maka's "project" a folder-bound entity, but many users want to
   organize the way ChatGPT Projects do: create an empty, named container first,
   then file conversations into it later — independent of (or before deciding)
   which directory the work will actually live in.
   
   Two concrete gaps:
   
   1. **No way to create an empty project without choosing a folder.** PR #1545
      already made zero-session projects first-class in the catalog, so the data
      model is ready; only the creation flow still demands a directory.
   2. **No way to move an existing session into a different project** (or out to
      "No project" / Ungrouped) from the desktop UI. The session row menu only
      offers Pin / Rename / Archive / Unarchive / Delete.
   
   ### Desired outcome
   
   - A **"New project"** action that creates an empty, named project without
     requiring a directory (ChatGPT-Projects style). The directory can be attached
     later, when it is actually known.
   - **Drag and drop**: dragging a session row onto a project in the sidebar
     (re)assigns it; dragging it onto the Inbox / Ungrouped bucket clears its
     project association.
   - A non-drag fallback for accessibility: a **"Move to project…"** item in the
     session row menu.
   
   ### Why this should be cheap on the backend
   
   The runtime already supports changing a session's project **without** touching
   its working directory:
   
   - `packages/runtime/src/session-manager.ts` — `relocateSessionWorkspace(sessionId, { expectedRevision, cwd, projectId })` has a dedicated `projectIdChanged` branch that commits a `projectId`-only update when `cwd` is unchanged.
   - The Runtime Host exposes it as the operation `session.workspace.relocate` (see `REMOTE_OWNER_OPERATION_GRANTS`), alongside `session.metadata.update`.
   - The catalog already supports zero-session projects and an explicit no-project association (PR #1545), and the sidebar already renders an unassigned / Ungrouped bucket (PR #510).
   
   What is missing is purely the desktop surface: `SessionRowActions` in
   `packages/ui/src/session-history-list.tsx` exposes only
   `onToggleFlag | onArchive | onUnarchive | onRename`, and the existing
   `moveToProject` / `moveToInbox` copy is wired only to Work Board items
   (`apps/desktop/src/renderer/work-board-panel.tsx`), not to sessions.
   
   Design caveat worth settling in the proposal: project identity is currently a
   directory / Git-repo identity, so a directory-less project needs defined cwd
   semantics for the sessions filed into it. This overlaps with the "default
   working directory" work in #2322 / #2998.
   
   ### Alternatives or workarounds
   
   - Today you must pick a folder before you can organize anything into a project, and to "move" a session you would have to add the target folder and start a new session there.
   - The CLI `/move` (#1101) can rebind a session to a new working directory, but it is cwd-centric and not exposed in the desktop UI.
   - Related work: #2322 / #2998 (configurable default working directory for sessions without a project), #2560 (Work Board Inbox vs. project scope), #4935 (restore an archived project when re-adding its directory).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks closed issue #5389: feat(desktop): create an empty project and reassign sessions between projects (drag and drop)
URL: https://github.com/apache/maka/issues/5389


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on issue #5389:
URL: https://github.com/apache/maka/issues/5389#issuecomment-5695239663

   Updating the direction to close the open question in the original write-up.
   
   **Decision: a project stays directory-backed.** Creating one names a directory (picked, or created in the picker). We are not adding directory-less projects, so this no longer depends on #2322 / #2998 — those cover the fallback cwd for sessions with *no* project, which is a different problem.
   
   That also means "empty project" is already possible today: it is a folder-backed project with no sessions yet (#1545). The remaining gaps are (a) an explicit "New project" affordance instead of the "Add project"-only entry point, and (b) moving an existing task between projects — which the Host already supports via `session.workspace.relocate` and which the desktop UI simply does not expose yet.
   
   One consequence to be explicit about: because the Host resolves a project target to that project's preferred directory, moving a task into a project also moves its working directory (same as the CLI `/move`). I am treating that as intended.
   
   I am starting with (b): a "Move to project…" submenu on the session row, wired to `session.workspace.relocate` with a project target (and a `host_path` target seeded from the task's current cwd for the "remove from project" case). Drag and drop, and the "New project" dialog, follow.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on issue #5389:
URL: https://github.com/apache/maka/issues/5389#issuecomment-5716229127

   Implemented in https://github.com/apache/maka/pull/5392, which now uses `Fixes #5389` so this issue closes when the PR merges.
   
   The PR covers named directory-backed project creation, the task-row Move to project menu, and session drag/drop onto project rows (including empty projects) and the visible Ungrouped bucket. Moving into a project also changes cwd to its preferred directory; detaching preserves cwd.
   
   Real desktop validation caught an additional integration bug: the BrowserWindow file-drop guard intercepted session drags before React could receive them. The guard now permits the session MIME only on designated project targets. After restarting the development app, the reporter confirmed manual dragging works.
   
   The branch is synced with main, the architecture conflicts are resolved, and 75 targeted tests plus typecheck, lint, format, and architecture checks pass. CI/review and merge remain pending; keeping the issue open until merge. The default-directory and Work Board issues referenced above remain outside this PR's scope.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on issue #5389:
URL: https://github.com/apache/maka/issues/5389#issuecomment-5694947974

   I'd like to pick this up.
   
   Rough plan:
   
   1. Add a "New project" creation path that does not require a directory (empty, named project), keeping the existing folder-picker flow as the alternative.
   2. Expose a non-drag "Move to project…" action on the session row, backed by the existing `session.workspace.relocate` projectId-only path (no cwd change).
   3. Layer drag-and-drop onto sidebar projects / the Inbox (Ungrouped) bucket on top of that same action.
   
   Open question I'd like to settle before writing code: the intended cwd semantics for sessions filed into a directory-less project — this seems tied to #2322 / #2998. I'll start with steps 1–2 and open a PR against `main` once the direction is clear.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on issue #5389:
URL: https://github.com/apache/maka/issues/5389#issuecomment-5694956848

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] feat(desktop): create an empty project and reassign sessions between projects (drag and drop) [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on issue #5389:
URL: https://github.com/apache/maka/issues/5389#issuecomment-5748331793

   Visual evidence for the implementation in #5392 (which carries `Fixes #5389`).
   
   **What shipped**
   
   - **New project** — creating one names it: a dialog (`项目名称` → `选择文件夹`) runs before the folder picker, and the project is registered under the typed name. Entry points are the + on the rail's 项目 heading and Settings → Projects; on macOS the picker gets `createDirectory`, so a new folder can be made in place rather than having to exist beforehand.
   - **Move a task between projects** — a `移动到项目` item on the session row (keyboard path) and drag and drop onto a project row, including an **empty** project and the ungrouped bucket.
   - **Directory-backed, as decided above** — moving into a project also moves the task's cwd to that project's preferred directory; detaching keeps the cwd and the conversation history.
   
   **Screenshots** (from the development app, driven over CDP)
   
   <img width="1240" height="820" alt="New project dialog, opened from the + on the rail's 项目 heading" src="https://github.com/user-attachments/assets/b3ee10b2-91bb-4ec5-8d38-f214c0294976" />
   
   <img width="1240" height="820" alt="A session dragged over a project row: the row shows the drop ring" src="https://github.com/user-attachments/assets/92f962f2-588f-41b3-a1e0-155db0db7646" />
   
   <img width="1240" height="820" alt="Before: the rail with the Projects heading" src="https://github.com/user-attachments/assets/94681545-d789-4f51-9d42-45e3dd9d6311" />
   
   **Verified in the running app**, not only in tests: `dragover` reaches React with `types: ['application/x-maka-session']` and is accepted by the row under the pointer (and only by eligible rows), and an end-to-end move into an empty project resolves `ok` with the cwd following the project's directory and the rail regrouping live.
   
   **From review (#5392)** — three findings, all fixed: the detach now commits the revision it read instead of replaying a stale directory; Runtime Host groups are headings, not drop targets; and drop eligibility now matches the menu (available, unarchived). Move affordances also follow the Session's Host, since the rail holds only the local Host's project list.
   
   CI is green on the current head; the PR is waiting on a committer's approval.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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