[Feature]: Move an existing desktop session into an existing project (workspace rebind + artifact relocation)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- desktop
調査の方向性
Start by tracing the existing “Move to project” action and canUseCloudProjects gate in the desktop sidebar, then inspect the local runtime session and project assignment logic described in the issue. Follow how workspace paths are stored for turn diffs, diff journals, and session assets. Done means a local session can be rebound to a directory-backed project while preserving its conversation and keeping its workspace files, delivered-file cards, and change/undo records usable.
索引モデルが issue の本文から書いたものです。
説明
Product or interface
Desktop app
Use case and problem
I want to keep a session that started in the default workspace (no project) and later promote it into a real project directory: the session keeps its conversation and the files it produced, and from then on it runs inside that project.
Today the desktop app has no way to do this.
What exists today, and why none of it covers this case:
- Create a new task inside the project (
onNewTaskInProjectin the sidebar) — binds a new conversation to the project directory. It does not carry over the existing conversation, and the old session stays where it was. - "Move to project" in the session menu — the entry exists in the UI bundle (
sidebar.action_move_to_project) but it is cloud-only. The action is gated bycanUseCloudProjects, which is computed assource === "cloud", and returns early for local sessions; the submenu entries are rendered with a cloud project icon (target: { source: "cloud", id }); the underlying call isPATCH /session/{id} { project_id }against the cloud API, and the local runtime explicitly rejectsproject_idwithproject_id is not supported by desktop local-runtime. - "Move to section" (
sidebar.action_section) only changes a front-end grouping inside the sidebar store (assignments/sections/sessionOrder). It does not touch the session's workspace or its project, and the runtime does not know about it. - Dragging a session in the sidebar drops it into a section as well, not into a project.
So for a local desktop session there is currently no action that changes which project (that is, which directory) the session belongs to.
Why this is not only a UI toggle
In the local runtime model a workspace project is its directory, so moving a session into a project is a change of the session's run location rather than a metadata edit:
local_runtime_projectsconstrainsproject_kind='workspace'rows to exactly one non-emptyworkspace_dir, with a unique index on it; thedefaultkind holds no directory at all.local_runtime_sessions.project_workspace_dir+is_default_workspacedetermineproject_idthrough thetrg_local_runtime_project_session_assignment_v5trigger, and the runtime raisesSession Project associations are incompletewhen a session'sproject_iddoes not match a project row with the same directory.resolveWorkspace()prefers the session's explicit workspace directory over the agent/session default, so the bound directory is also the agent's working directory.
Consequences of a local move, which a metadata-only implementation would miss:
- Rebind the session —
workspace_dir/project_workspace_dir/is_default_workspace;project_idis then re-derived by the existing trigger, so it stays consistent. - Relocate the artifacts the session produced; they live in the old session workspace folder (
~/.minimax/sessions/<session-id>/workspace/). - Repoint historical path references.
local_runtime_turn_diffsandlocal_runtime_turn_diff_journalstore the workspace directory used for each captured change (they back the "review changes / undo" panel), andlocal_runtime_session_assetsstores the absolute path of every delivered file (the file cards in the chat). The runtime never updatesworkspace_diron those rows, and there is noUPDATEstatement forlocal_runtime_session_assets.pathat all — so after a rebind the delivered-file cards and the undo records still point at the old directory and become dead links.
Desired behavior
- A local session's context menu offers a working Move to project, listing local (directory-backed) projects.
- Selecting a project rebinds the session: it stays the same conversation (same session id, same history and attachments) and its working directory becomes the project directory for subsequent turns.
- The user is asked whether to relocate the workspace files that session produced into the project directory, or is clearly told that they remain in the old folder.
- After the move, the delivered-file cards and the change/undo panel of that session resolve to the new location.
- Moving one session does not affect other sessions of the same project, and deleting a project still behaves as it does today.
Platform
Windows
Alternatives and additional context
- Workaround used locally: update
runtime-state.sqlitedirectly (with a backup) to rebind the session, copy the produced files into the project directory, and repair the path fields inlocal_runtime_turn_diffs/local_runtime_turn_diff_journal/local_runtime_session_assetsby hand. This shows the operation is feasible, but it is unsupported, it touches a runtime-owned database, and step 3 is easy to miss — which is the reason a supported action would help. - Related: #136 (closed as
not_plannedin a backlog cleanup; it asked for the same move, including moving the workspace data) and #554 (projects with several directories).
Environment: MiniMax Code 3.1.16.226, Windows 10 x64.
中文摘要
桌面端目前无法把一个已存在的本地会话迁入已有项目。会话菜单里的「移动到项目」是云端专用:canUseCloudProjects 仅在 source === "cloud" 时为真,本地会话点了直接 return;子菜单图标写死 source: "cloud";底层是云端 PATCH /session/{id} { project_id },而本地运行时会明确拒绝 project_id。「移动到分区」只是侧边栏的纯前端分组,拖拽落到的也是分区。
由于本地项目在数据模型里就等于它的目录,迁移实际包含三件事:① 改绑会话(workspace_dir / project_workspace_dir / is_default_workspace,project_id 由既有触发器自动重算);② 搬迁会话产出的文件;③ 修正历史路径引用——local_runtime_turn_diffs / turn_diff_journal(撤销/回滚面板)与 local_runtime_session_assets(交付文件卡片)仍指向旧目录,改绑后即成死链,而运行时从不更新这些行。
希望官方提供受支持的「将会话移动到项目」入口,并一并处理产物搬迁与历史引用修正。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 315
- 平均マージ
- 3時間 54分
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/minimax-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#639 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MiniMax-AI/minimax-code#636 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#615 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MiniMax-AI/minimax-code#556 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#507 ·
メンテナーはふだん 1 日以内に返信
MiniMax-AI/minimax-code の issue をすべて見る
似ている issue
-
area:api bug good first issue priority:high
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Doezer/Questarr#1486 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Sergey-Bar/Penny#245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mihazs/lazysh#3377 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Approve the Cloudflare agent plugin for harness sessions対応中かも @joshtsch が今日担当しました。 オープンenhancement ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信