refactor(profiles): shared project entity with per-scope switching

Projects are now global shared entities; Claude and Codex groups switch
independently via scoped current pointers and scoped payload slots.

- Remove scope column from profiles; keep current_profile_id_<scope>
- Use Option<Vec<String>> for mcp/skills to distinguish 'never captured'
  from 'captured empty', preventing cross-side accidental disable
- Update/apply operations scoped to the active group via merge_scope_from
- Tray menu nests same shared list under Claude Code/Codex groups
- Add i18n for per-scope tooltips and 'not saved for this side' hint

Refs: profile P1 shared-entity redesign
This commit is contained in:
Jason
2026-07-04 21:34:30 +08:00
parent 65a5464fcc
commit dbb5999d1e
17 changed files with 831 additions and 190 deletions
+10 -3
View File
@@ -1867,19 +1867,26 @@
}
},
"profiles": {
"switcherTooltip": "Projects: switch providers / MCP / Skills / memory files for Claude Code and Codex, plus the Claude Desktop provider, in one click",
"switcherTooltip": {
"claude": "Projects: switch the Claude Code provider / MCP / Skills / memory files, plus the Claude Desktop provider, in one click",
"codex": "Projects: switch the Codex provider / MCP / Skills / memory files in one click"
},
"none": "No project",
"searchPlaceholder": "Search projects",
"empty": "No projects yet",
"createFromCurrent": "New project",
"createDescription": "Save the current provider, MCP, Skills and memory file configuration as a project you can switch to later.",
"createDescription": {
"claude": "Save the current Claude Code provider, MCP, Skills and memory file (plus the Claude Desktop provider) as a project you can switch to later.",
"codex": "Save the current Codex provider, MCP, Skills and memory file configuration as a project you can switch to later."
},
"manage": "Manage projects…",
"manageTitle": "Manage Projects",
"manageDescription": "Projects are configuration snapshots. To change a project, adjust your configuration first, then click \"Update from current\".",
"namePlaceholder": "e.g. Development, Drawing",
"rename": "Rename",
"updateSnapshot": "Update from current",
"updateSnapshotConfirm": "Overwrite the snapshot of project \"{{name}}\" with the current configuration?",
"updateSnapshotConfirm": "Overwrite the {{group}} side of project \"{{name}}\" with the current configuration? Other apps' snapshots are unaffected.",
"noSnapshotForScope": "Not saved for this app yet",
"delete": "Delete",
"deleteConfirmTitle": "Confirm Delete",
"deleteConfirmMessage": "Are you sure you want to delete project \"{{name}}\"? Your current configuration will not be changed.",
+10 -3
View File
@@ -1867,19 +1867,26 @@
}
},
"profiles": {
"switcherTooltip": "プロジェクト:Claude Code と Codex のプロバイダー / MCP / Skills / メモリファイル、および Claude Desktop のプロバイダーをワンクリックで切り替え",
"switcherTooltip": {
"claude": "プロジェクト:Claude Code のプロバイダー / MCP / Skills / メモリファイル、および Claude Desktop のプロバイダーをワンクリックで切り替え",
"codex": "プロジェクト:Codex のプロバイダー / MCP / Skills / メモリファイルをワンクリックで切り替え"
},
"none": "プロジェクトを使用しない",
"searchPlaceholder": "プロジェクトを検索",
"empty": "プロジェクトはまだありません",
"createFromCurrent": "新規プロジェクト",
"createDescription": "現在のプロバイダー、MCP、Skills、メモリファイルの設定をプロジェクトとして保存し、後からワンクリックで切り替えられます。",
"createDescription": {
"claude": "Claude Code の現在のプロバイダー、MCP、Skills、メモリファイル(および Claude Desktop のプロバイダー)をプロジェクトとして保存し、後からワンクリックで切り替えられます。",
"codex": "Codex の現在のプロバイダー、MCP、Skills、メモリファイルの設定をプロジェクトとして保存し、後からワンクリックで切り替えられます。"
},
"manage": "プロジェクトを管理…",
"manageTitle": "プロジェクト管理",
"manageDescription": "プロジェクトは設定のスナップショットです。内容を変更するには、先に設定を調整してから「現在の状態で更新」をクリックしてください。",
"namePlaceholder": "例:開発、イラスト",
"rename": "名前を変更",
"updateSnapshot": "現在の状態で更新",
"updateSnapshotConfirm": "プロジェクト「{{name}}」のスナップショットを現在の設定で上書きしますか?",
"updateSnapshotConfirm": "プロジェクト「{{name}}」の {{group}} 側スナップショットを現在の設定で上書きしますか?他のアプリ側には影響しません。",
"noSnapshotForScope": "このアプリ側は未保存",
"delete": "削除",
"deleteConfirmTitle": "削除の確認",
"deleteConfirmMessage": "プロジェクト「{{name}}」を削除してもよろしいですか?現在の設定は変更されません。",
+10 -3
View File
@@ -1839,19 +1839,26 @@
}
},
"profiles": {
"switcherTooltip": "專案:一鍵切換 Claude Code 與 Codex 的供應商 / MCP / Skills / 記憶檔案,及 Claude Desktop 的供應商",
"switcherTooltip": {
"claude": "專案:一鍵切換 Claude Code 的供應商 / MCP / Skills / 記憶檔案,及 Claude Desktop 的供應商",
"codex": "專案:一鍵切換 Codex 的供應商 / MCP / Skills / 記憶檔案"
},
"none": "不使用專案",
"searchPlaceholder": "搜尋專案",
"empty": "尚無專案",
"createFromCurrent": "新建專案",
"createDescription": "把目前的供應商、MCP、Skills 和記憶檔案設定儲存為一個專案,之後可一鍵切換。",
"createDescription": {
"claude": "把 Claude Code 目前的供應商、MCP、Skills、記憶檔案(及 Claude Desktop 的供應商)儲存為一個專案,之後可一鍵切換。",
"codex": "把 Codex 目前的供應商、MCP、Skills 和記憶檔案設定儲存為一個專案,之後可一鍵切換。"
},
"manage": "管理專案…",
"manageTitle": "管理專案",
"manageDescription": "專案是設定快照。要修改專案內容,先手動調好設定,再點「以目前狀態更新」。",
"namePlaceholder": "例如:開發、繪圖",
"rename": "重新命名",
"updateSnapshot": "以目前狀態更新",
"updateSnapshotConfirm": "用目前設定狀態覆蓋專案 \"{{name}}\" 的快照?",
"updateSnapshotConfirm": "用目前設定覆蓋專案 \"{{name}}\" 的 {{group}} 側快照?其他應用側的快照不受影響。",
"noSnapshotForScope": "本側未儲存",
"delete": "刪除",
"deleteConfirmTitle": "確認刪除",
"deleteConfirmMessage": "確定要刪除專案 \"{{name}}\" 嗎?不會改動任何現有設定。",
+10 -3
View File
@@ -1867,19 +1867,26 @@
}
},
"profiles": {
"switcherTooltip": "项目:一键切换 Claude Code 与 Codex 的供应商 / MCP / Skills / 记忆文件,及 Claude Desktop 的供应商",
"switcherTooltip": {
"claude": "项目:一键切换 Claude Code 的供应商 / MCP / Skills / 记忆文件,及 Claude Desktop 的供应商",
"codex": "项目:一键切换 Codex 的供应商 / MCP / Skills / 记忆文件"
},
"none": "不使用项目",
"searchPlaceholder": "搜索项目",
"empty": "暂无项目",
"createFromCurrent": "新建项目",
"createDescription": "把当前的供应商、MCP、Skills 和记忆文件配置保存为一个项目,之后可一键切换。",
"createDescription": {
"claude": "把 Claude Code 当前的供应商、MCP、Skills、记忆文件(及 Claude Desktop 的供应商)保存为一个项目,之后可一键切换。",
"codex": "把 Codex 当前的供应商、MCP、Skills 和记忆文件配置保存为一个项目,之后可一键切换。"
},
"manage": "管理项目…",
"manageTitle": "管理项目",
"manageDescription": "项目是配置快照。要修改项目内容,先手动调好配置,再点\"以当前状态更新\"。",
"namePlaceholder": "例如:开发、绘图",
"rename": "重命名",
"updateSnapshot": "以当前状态更新",
"updateSnapshotConfirm": "用当前配置状态覆盖项目 \"{{name}}\" 的快照?",
"updateSnapshotConfirm": "用当前配置覆盖项目 \"{{name}}\" 的 {{group}} 侧快照?其他应用侧的快照不受影响。",
"noSnapshotForScope": "本侧未保存",
"delete": "删除",
"deleteConfirmTitle": "确认删除",
"deleteConfirmMessage": "确定要删除项目 \"{{name}}\" 吗?不会改动任何现有配置。",