feat: move sessions to new worktrees
Add a root-session action that creates a generated worktree from the session directory's current branch, transfers uncommitted changes, and moves the parent session plus its descendants through OpenCode's control-plane API. Reuse existing project/worktree topology and quick-create behavior, keep the UI non-blocking, reconcile live and global session state across directories, and roll back partial moves and failed worktree creation safely. Split worktree bootstrap readiness into directory-created, git-ready, and setup-ready phases across web and VS Code. Session moves wait for Git readiness while existing setup-aware flows continue waiting for full setup completion, and worktree removal is serialized with active bootstrap tasks. Expose the move only for idle root sessions, show localized progress and explanatory tooltips in the sidebar, and keep pending/ready worktree metadata synchronized with authoritative session attachments to avoid stale setup indicators. Add coverage for control-plane payloads, session-state migration, bootstrap phase ordering and compatibility, removal races, progress metadata, and fast-ready attachment races.
This commit is contained in:
@@ -457,6 +457,12 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sessions.sidebar.session.menu.copyLink': 'リンクをコピー',
|
||||
'sessions.sidebar.session.menu.unshare': '共有解除',
|
||||
'sessions.sidebar.session.menu.exportMarkdown': 'Markdownでエクスポート',
|
||||
'sessions.sidebar.session.menu.moveToWorktree': '新しいworktreeへ移動',
|
||||
'sessions.sidebar.session.moveToWorktree.success': 'セッションを新しいworktreeへ移動しました',
|
||||
'sessions.sidebar.session.moveToWorktree.failed': 'セッションを新しいworktreeへ移動できませんでした',
|
||||
'sessions.sidebar.session.moveToWorktree.tooltip': '現在のブランチから新しいworktreeを作成し、未コミットの変更とこのセッションおよびサブセッションを移動します。',
|
||||
'sessions.sidebar.session.moveToWorktree.tooltipBusy': 'セッションがアイドル状態のときに利用できます。現在の処理を停止するか、完了するまでお待ちください。',
|
||||
'sessions.sidebar.session.moveToWorktree.tooltipMoving': 'このセッションはすでに新しいworktreeへ移動中です。',
|
||||
'sessions.sidebar.session.menu.runFusion': 'フュージョンを実行',
|
||||
'sessions.sidebar.session.menu.openInSidePanel': 'サイドパネルで開く',
|
||||
'sessions.sidebar.session.actions.openInEditor': 'エディターで開く',
|
||||
@@ -477,6 +483,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sessions.sidebar.session.status.active': 'セッションアクティブ',
|
||||
'sessions.sidebar.session.status.unread': '未読の更新',
|
||||
'sessions.sidebar.session.status.pinned': 'ピン留めされたセッション',
|
||||
'sessions.sidebar.session.status.movingToWorktree': 'セッションを新しいworktreeへ移動中',
|
||||
'sessions.sidebar.session.status.permissionRequired': '権限が必要です',
|
||||
'sessions.sidebar.session.subsessions.collapse': 'サブセッションを折りたたむ',
|
||||
'sessions.sidebar.session.subsessions.expand': 'サブセッションを展開',
|
||||
|
||||
Reference in New Issue
Block a user