@cerbur/clutch-dsh-worktree 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +314 -43
- package/README.zh.md +263 -37
- package/assets/screenshots/screenshots-dashboard.png +0 -0
- package/assets/screenshots/screenshots-en.png +0 -0
- package/assets/screenshots/screenshots-git-reviewer.png +0 -0
- package/assets/screenshots/screenshots-import.png +0 -0
- package/assets/screenshots/screenshots-worktree-tool.png +0 -0
- package/assets/screenshots/screenshots-zh.png +0 -0
- package/cordis.patch.yml +6 -19
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +41 -13
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/branch/GitBranchSelector.d.ts +23 -0
- package/lib/client/branch/GitBranchSelector.d.ts.map +1 -0
- package/lib/client/branch/GitBranchSelector.js +142 -0
- package/lib/client/branch/GitBranchSelector.js.map +1 -0
- package/lib/client/command-activity.d.ts +11 -0
- package/lib/client/command-activity.d.ts.map +1 -0
- package/lib/client/command-activity.js +71 -0
- package/lib/client/command-activity.js.map +1 -0
- package/lib/client/context/worktree-context-store.d.ts.map +1 -1
- package/lib/client/context/worktree-context-store.js +1 -0
- package/lib/client/context/worktree-context-store.js.map +1 -1
- package/lib/client/context/worktree-context.d.ts +3 -2
- package/lib/client/context/worktree-context.d.ts.map +1 -1
- package/lib/client/context/worktree-context.js +5 -3
- package/lib/client/context/worktree-context.js.map +1 -1
- package/lib/client/dashboard/DashboardRequest.d.ts +2 -1
- package/lib/client/dashboard/DashboardRequest.d.ts.map +1 -1
- package/lib/client/dashboard/DashboardRequest.js +3 -3
- package/lib/client/dashboard/DashboardRequest.js.map +1 -1
- package/lib/client/dashboard/WorktreeDashboard.d.ts +6 -2
- package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -1
- package/lib/client/dashboard/WorktreeDashboard.js +111 -89
- package/lib/client/dashboard/WorktreeDashboard.js.map +1 -1
- package/lib/client/dashboard/WorktreeInstructions.d.ts +2 -1
- package/lib/client/dashboard/WorktreeInstructions.d.ts.map +1 -1
- package/lib/client/dashboard/WorktreeInstructions.js +27 -8
- package/lib/client/dashboard/WorktreeInstructions.js.map +1 -1
- package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -1
- package/lib/client/dashboard/dashboard-overlay.js +38 -52
- package/lib/client/dashboard/dashboard-overlay.js.map +1 -1
- package/lib/client/dashboard/dashboard-selection.d.ts +4 -2
- package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -1
- package/lib/client/dashboard/dashboard-selection.js +6 -4
- package/lib/client/dashboard/dashboard-selection.js.map +1 -1
- package/lib/client/dashboard/git/GitChangedFiles.d.ts +2 -1
- package/lib/client/dashboard/git/GitChangedFiles.d.ts.map +1 -1
- package/lib/client/dashboard/git/GitChangedFiles.js +8 -6
- package/lib/client/dashboard/git/GitChangedFiles.js.map +1 -1
- package/lib/client/dashboard/git/GitCommitList.d.ts +6 -1
- package/lib/client/dashboard/git/GitCommitList.d.ts.map +1 -1
- package/lib/client/dashboard/git/GitCommitList.js +34 -29
- package/lib/client/dashboard/git/GitCommitList.js.map +1 -1
- package/lib/client/dashboard/git/GitCommitStats.d.ts +8 -0
- package/lib/client/dashboard/git/GitCommitStats.d.ts.map +1 -0
- package/lib/client/dashboard/git/GitCommitStats.js +7 -0
- package/lib/client/dashboard/git/GitCommitStats.js.map +1 -0
- package/lib/client/dashboard/git/WorktreeGitOverview.d.ts.map +1 -1
- package/lib/client/dashboard/git/WorktreeGitOverview.js +2 -1
- package/lib/client/dashboard/git/WorktreeGitOverview.js.map +1 -1
- package/lib/client/dashboard/git/WorktreeGitPanel.d.ts +3 -2
- package/lib/client/dashboard/git/WorktreeGitPanel.d.ts.map +1 -1
- package/lib/client/dashboard/git/WorktreeGitPanel.js +79 -14
- package/lib/client/dashboard/git/WorktreeGitPanel.js.map +1 -1
- package/lib/client/dashboard/git/file-address.d.ts +5 -1
- package/lib/client/dashboard/git/file-address.d.ts.map +1 -1
- package/lib/client/dashboard/git/file-address.js +49 -11
- package/lib/client/dashboard/git/file-address.js.map +1 -1
- package/lib/client/dashboard/git/git-facts.js +1 -1
- package/lib/client/dashboard/git/git-facts.js.map +1 -1
- package/lib/client/dashboard/git/useWorktreeGitState.d.ts +7 -2
- package/lib/client/dashboard/git/useWorktreeGitState.d.ts.map +1 -1
- package/lib/client/dashboard/git/useWorktreeGitState.js +88 -22
- package/lib/client/dashboard/git/useWorktreeGitState.js.map +1 -1
- package/lib/client/dsh-icons.d.ts +4 -0
- package/lib/client/dsh-icons.d.ts.map +1 -1
- package/lib/client/dsh-icons.js +5 -1
- package/lib/client/dsh-icons.js.map +1 -1
- package/lib/client/dsh-slot-contract.d.ts +9 -1
- package/lib/client/dsh-slot-contract.d.ts.map +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +39 -2
- package/lib/client/entry.js.map +1 -1
- package/lib/client/layout/app-frame.d.ts +12 -0
- package/lib/client/layout/app-frame.d.ts.map +1 -0
- package/lib/client/layout/app-frame.js +82 -0
- package/lib/client/layout/app-frame.js.map +1 -0
- package/lib/client/locales.d.ts +184 -2
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +250 -68
- package/lib/client/locales.js.map +1 -1
- package/lib/client/overlay/overlay-bounds.d.ts.map +1 -1
- package/lib/client/overlay/overlay-bounds.js +8 -3
- package/lib/client/overlay/overlay-bounds.js.map +1 -1
- package/lib/client/overlay/sidebar-overlay-geometry.d.ts +3 -1
- package/lib/client/overlay/sidebar-overlay-geometry.d.ts.map +1 -1
- package/lib/client/overlay/sidebar-overlay-geometry.js +94 -34
- package/lib/client/overlay/sidebar-overlay-geometry.js.map +1 -1
- package/lib/client/restart-notice.d.ts +10 -3
- package/lib/client/restart-notice.d.ts.map +1 -1
- package/lib/client/restart-notice.js +44 -11
- package/lib/client/restart-notice.js.map +1 -1
- package/lib/client/select/SearchableSingleSelect.d.ts +44 -0
- package/lib/client/select/SearchableSingleSelect.d.ts.map +1 -0
- package/lib/client/select/SearchableSingleSelect.js +180 -0
- package/lib/client/select/SearchableSingleSelect.js.map +1 -0
- package/lib/client/select/WorktreeSelector.d.ts +14 -0
- package/lib/client/select/WorktreeSelector.d.ts.map +1 -0
- package/lib/client/select/WorktreeSelector.js +11 -0
- package/lib/client/select/WorktreeSelector.js.map +1 -0
- package/lib/client/session/session-view.d.ts +16 -2
- package/lib/client/session/session-view.d.ts.map +1 -1
- package/lib/client/session/session-view.js +24 -10
- package/lib/client/session/session-view.js.map +1 -1
- package/lib/client/session/worktree-session.d.ts +1 -0
- package/lib/client/session/worktree-session.d.ts.map +1 -1
- package/lib/client/session/worktree-session.js +3 -1
- package/lib/client/session/worktree-session.js.map +1 -1
- package/lib/client/settings/ToolSettings.d.ts +9 -0
- package/lib/client/settings/ToolSettings.d.ts.map +1 -0
- package/lib/client/settings/ToolSettings.js +77 -0
- package/lib/client/settings/ToolSettings.js.map +1 -0
- package/lib/client/settings/WorktreeSettings.d.ts +8 -0
- package/lib/client/settings/WorktreeSettings.d.ts.map +1 -0
- package/lib/client/settings/WorktreeSettings.js +46 -0
- package/lib/client/settings/WorktreeSettings.js.map +1 -0
- package/lib/client/settings/WorktreeSettingsNavIcon.d.ts +6 -0
- package/lib/client/settings/WorktreeSettingsNavIcon.d.ts.map +1 -0
- package/lib/client/settings/WorktreeSettingsNavIcon.js +51 -0
- package/lib/client/settings/WorktreeSettingsNavIcon.js.map +1 -0
- package/lib/client/settings/diagnostics.d.ts +24 -0
- package/lib/client/settings/diagnostics.d.ts.map +1 -0
- package/lib/client/settings/diagnostics.js +63 -0
- package/lib/client/settings/diagnostics.js.map +1 -0
- package/lib/client/settings/settings-navigation.d.ts +7 -0
- package/lib/client/settings/settings-navigation.d.ts.map +1 -0
- package/lib/client/settings/settings-navigation.js +12 -0
- package/lib/client/settings/settings-navigation.js.map +1 -0
- package/lib/client/surface/actions/useLifecycleActions.d.ts +2 -1
- package/lib/client/surface/actions/useLifecycleActions.d.ts.map +1 -1
- package/lib/client/surface/actions/useLifecycleActions.js +15 -6
- package/lib/client/surface/actions/useLifecycleActions.js.map +1 -1
- package/lib/client/surface/actions/useSessionActions.d.ts.map +1 -1
- package/lib/client/surface/actions/useSessionActions.js +6 -6
- package/lib/client/surface/actions/useSessionActions.js.map +1 -1
- package/lib/client/surface/actions/useWorktreeRegistration.d.ts +1 -1
- package/lib/client/surface/actions/useWorktreeRegistration.d.ts.map +1 -1
- package/lib/client/surface/actions/useWorktreeRegistration.js +36 -13
- package/lib/client/surface/actions/useWorktreeRegistration.js.map +1 -1
- package/lib/client/surface/components/NotificationToasts.d.ts +19 -3
- package/lib/client/surface/components/NotificationToasts.d.ts.map +1 -1
- package/lib/client/surface/components/NotificationToasts.js +73 -7
- package/lib/client/surface/components/NotificationToasts.js.map +1 -1
- package/lib/client/surface/components/OverlayScrollbar.d.ts +6 -0
- package/lib/client/surface/components/OverlayScrollbar.d.ts.map +1 -0
- package/lib/client/surface/components/OverlayScrollbar.js +84 -0
- package/lib/client/surface/components/OverlayScrollbar.js.map +1 -0
- package/lib/client/surface/components/RegistrationDialog.d.ts +3 -3
- package/lib/client/surface/components/RegistrationDialog.d.ts.map +1 -1
- package/lib/client/surface/components/RegistrationDialog.js +70 -5
- package/lib/client/surface/components/RegistrationDialog.js.map +1 -1
- package/lib/client/surface/components/RestartToast.d.ts.map +1 -1
- package/lib/client/surface/components/RestartToast.js +4 -3
- package/lib/client/surface/components/RestartToast.js.map +1 -1
- package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -1
- package/lib/client/surface/components/SurfaceContent.js +110 -39
- package/lib/client/surface/components/SurfaceContent.js.map +1 -1
- package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -1
- package/lib/client/surface/components/WorkspaceTree.js +13 -9
- package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
- package/lib/client/surface/components/dialogs.d.ts +1 -1
- package/lib/client/surface/components/dialogs.d.ts.map +1 -1
- package/lib/client/surface/components/dialogs.js +34 -21
- package/lib/client/surface/components/dialogs.js.map +1 -1
- package/lib/client/surface/components/rows.d.ts +1 -1
- package/lib/client/surface/components/rows.d.ts.map +1 -1
- package/lib/client/surface/components/rows.js +15 -97
- package/lib/client/surface/components/rows.js.map +1 -1
- package/lib/client/surface/notification-queue.d.ts +15 -0
- package/lib/client/surface/notification-queue.d.ts.map +1 -1
- package/lib/client/surface/notification-queue.js +13 -2
- package/lib/client/surface/notification-queue.js.map +1 -1
- package/lib/client/surface/state/useRegistrationState.d.ts +6 -1
- package/lib/client/surface/state/useRegistrationState.d.ts.map +1 -1
- package/lib/client/surface/state/useRegistrationState.js +7 -0
- package/lib/client/surface/state/useRegistrationState.js.map +1 -1
- package/lib/client/surface/state/useSurfaceRefresh.d.ts +1 -1
- package/lib/client/surface/state/useSurfaceRefresh.d.ts.map +1 -1
- package/lib/client/surface/state/useSurfaceRefresh.js +13 -1
- package/lib/client/surface/state/useSurfaceRefresh.js.map +1 -1
- package/lib/client/surface/state/useSurfaceSources.d.ts +1 -1
- package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -1
- package/lib/client/surface/state/useSurfaceSources.js +4 -2
- package/lib/client/surface/state/useSurfaceSources.js.map +1 -1
- package/lib/client/surface/state/useTitleMarquee.d.ts +7 -0
- package/lib/client/surface/state/useTitleMarquee.d.ts.map +1 -0
- package/lib/client/surface/state/useTitleMarquee.js +60 -0
- package/lib/client/surface/state/useTitleMarquee.js.map +1 -0
- package/lib/client/surface/types.d.ts +12 -1
- package/lib/client/surface/types.d.ts.map +1 -1
- package/lib/client/view/worktree-error-copy.d.ts.map +1 -1
- package/lib/client/view/worktree-error-copy.js +73 -14
- package/lib/client/view/worktree-error-copy.js.map +1 -1
- package/lib/client/view/worktree-view-errors.d.ts.map +1 -1
- package/lib/client/view/worktree-view-errors.js +13 -5
- package/lib/client/view/worktree-view-errors.js.map +1 -1
- package/lib/client/view/worktree-view-read.d.ts +4 -2
- package/lib/client/view/worktree-view-read.d.ts.map +1 -1
- package/lib/client/view/worktree-view-read.js +34 -17
- package/lib/client/view/worktree-view-read.js.map +1 -1
- package/lib/client/worktree-connection.d.ts +9 -2
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +24 -1
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client/worktree-tool-changes.d.ts +13 -0
- package/lib/client/worktree-tool-changes.d.ts.map +1 -0
- package/lib/client/worktree-tool-changes.js +64 -0
- package/lib/client/worktree-tool-changes.js.map +1 -0
- package/lib/client.js +3503 -1310
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +15 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +79 -12
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +12 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/contract/tool-settings.d.ts +28 -0
- package/lib/contract/tool-settings.d.ts.map +1 -0
- package/lib/contract/tool-settings.js +10 -0
- package/lib/contract/tool-settings.js.map +1 -0
- package/lib/contract/worktree-tool-changes.d.ts +10 -0
- package/lib/contract/worktree-tool-changes.d.ts.map +1 -0
- package/lib/contract/worktree-tool-changes.js +2 -0
- package/lib/contract/worktree-tool-changes.js.map +1 -0
- package/lib/host/permission-preset-append.d.ts +15 -0
- package/lib/host/permission-preset-append.d.ts.map +1 -0
- package/lib/host/permission-preset-append.js +63 -0
- package/lib/host/permission-preset-append.js.map +1 -0
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +7 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +30 -6
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +85 -11
- package/lib/host/service.js.map +1 -1
- package/lib/host/tool-settings.d.ts +14 -0
- package/lib/host/tool-settings.d.ts.map +1 -0
- package/lib/host/tool-settings.js +98 -0
- package/lib/host/tool-settings.js.map +1 -0
- package/lib/host/worktree-permission-manager.d.ts.map +1 -1
- package/lib/host/worktree-permission-manager.js +2 -4
- package/lib/host/worktree-permission-manager.js.map +1 -1
- package/lib/host/worktree-tool-changes.d.ts +12 -0
- package/lib/host/worktree-tool-changes.d.ts.map +1 -0
- package/lib/host/worktree-tool-changes.js +60 -0
- package/lib/host/worktree-tool-changes.js.map +1 -0
- package/lib/manage/manager-git-history.d.ts +5 -7
- package/lib/manage/manager-git-history.d.ts.map +1 -1
- package/lib/manage/manager-git-history.js +185 -91
- package/lib/manage/manager-git-history.js.map +1 -1
- package/lib/manage/manager-git-paths.d.ts +7 -0
- package/lib/manage/manager-git-paths.d.ts.map +1 -0
- package/lib/manage/manager-git-paths.js +62 -0
- package/lib/manage/manager-git-paths.js.map +1 -0
- package/lib/manage/manager-sessions.d.ts +5 -0
- package/lib/manage/manager-sessions.d.ts.map +1 -1
- package/lib/manage/manager-sessions.js +34 -11
- package/lib/manage/manager-sessions.js.map +1 -1
- package/lib/manage/manager-support.d.ts +3 -1
- package/lib/manage/manager-support.d.ts.map +1 -1
- package/lib/manage/manager-support.js +17 -0
- package/lib/manage/manager-support.js.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.js +5 -4
- package/lib/manage/manager-worktree-lifecycle.js.map +1 -1
- package/lib/manage/manager-worktrees.d.ts +10 -1
- package/lib/manage/manager-worktrees.d.ts.map +1 -1
- package/lib/manage/manager-worktrees.js +141 -34
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +22 -5
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +76 -4
- package/lib/manage/manager.js.map +1 -1
- package/lib/manage/types.d.ts +10 -1
- package/lib/manage/types.d.ts.map +1 -1
- package/lib/provider/generated-name.d.ts.map +1 -1
- package/lib/provider/generated-name.js +5 -4
- package/lib/provider/generated-name.js.map +1 -1
- package/lib/provider/git/adapter.d.ts +13 -12
- package/lib/provider/git/adapter.d.ts.map +1 -1
- package/lib/provider/git/adapter.js +157 -31
- package/lib/provider/git/adapter.js.map +1 -1
- package/lib/provider/git/branch-name.d.ts +5 -0
- package/lib/provider/git/branch-name.d.ts.map +1 -0
- package/lib/provider/git/branch-name.js +16 -0
- package/lib/provider/git/branch-name.js.map +1 -0
- package/lib/provider/git/branches.d.ts +11 -0
- package/lib/provider/git/branches.d.ts.map +1 -0
- package/lib/provider/git/branches.js +37 -0
- package/lib/provider/git/branches.js.map +1 -0
- package/lib/provider/mutation-token.d.ts +1 -1
- package/lib/provider/mutation-token.d.ts.map +1 -1
- package/lib/provider/mutation-token.js +1 -0
- package/lib/provider/mutation-token.js.map +1 -1
- package/lib/provider/sidecar/repository.d.ts.map +1 -1
- package/lib/provider/sidecar/repository.js +3 -1
- package/lib/provider/sidecar/repository.js.map +1 -1
- package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -1
- package/lib/provider/sidecar/sidecar-schema.js +26 -4
- package/lib/provider/sidecar/sidecar-schema.js.map +1 -1
- package/lib/provider/transaction/operations/adopt-branch.d.ts.map +1 -1
- package/lib/provider/transaction/operations/adopt-branch.js +6 -5
- package/lib/provider/transaction/operations/adopt-branch.js.map +1 -1
- package/lib/provider/transaction/operations/clean.d.ts.map +1 -1
- package/lib/provider/transaction/operations/clean.js +20 -19
- package/lib/provider/transaction/operations/clean.js.map +1 -1
- package/lib/provider/transaction/operations/create.d.ts +1 -1
- package/lib/provider/transaction/operations/create.d.ts.map +1 -1
- package/lib/provider/transaction/operations/create.js +39 -17
- package/lib/provider/transaction/operations/create.js.map +1 -1
- package/lib/provider/transaction/operations/import.d.ts.map +1 -1
- package/lib/provider/transaction/operations/import.js +7 -1
- package/lib/provider/transaction/operations/import.js.map +1 -1
- package/lib/provider/transaction/operations/remove.d.ts.map +1 -1
- package/lib/provider/transaction/operations/remove.js +20 -19
- package/lib/provider/transaction/operations/remove.js.map +1 -1
- package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -1
- package/lib/provider/transaction/recovery/failure-recovery.js +22 -20
- package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -1
- package/lib/provider/transaction/recovery/recover.d.ts.map +1 -1
- package/lib/provider/transaction/recovery/recover.js +11 -4
- package/lib/provider/transaction/recovery/recover.js.map +1 -1
- package/lib/provider/transaction/support/inspection.d.ts.map +1 -1
- package/lib/provider/transaction/support/inspection.js +3 -2
- package/lib/provider/transaction/support/inspection.js.map +1 -1
- package/lib/provider/transaction/support/journal.d.ts.map +1 -1
- package/lib/provider/transaction/support/journal.js +9 -5
- package/lib/provider/transaction/support/journal.js.map +1 -1
- package/lib/provider/transaction/support/path-safety.d.ts.map +1 -1
- package/lib/provider/transaction/support/path-safety.js +4 -3
- package/lib/provider/transaction/support/path-safety.js.map +1 -1
- package/lib/provider/transaction/types.d.ts +2 -1
- package/lib/provider/transaction/types.d.ts.map +1 -1
- package/lib/provider/types.d.ts +27 -5
- package/lib/provider/types.d.ts.map +1 -1
- package/lib/provider/types.js +1 -1
- package/lib/provider/types.js.map +1 -1
- package/lib/provider/worktree-path.d.ts +10 -0
- package/lib/provider/worktree-path.d.ts.map +1 -0
- package/lib/provider/worktree-path.js +47 -0
- package/lib/provider/worktree-path.js.map +1 -0
- package/lib/tool/context.d.ts +14 -0
- package/lib/tool/context.d.ts.map +1 -0
- package/lib/tool/context.js +95 -0
- package/lib/tool/context.js.map +1 -0
- package/lib/tool/delegation.d.ts +41 -0
- package/lib/tool/delegation.d.ts.map +1 -0
- package/lib/tool/delegation.js +196 -0
- package/lib/tool/delegation.js.map +1 -0
- package/lib/tool/errors.d.ts +3 -0
- package/lib/tool/errors.d.ts.map +1 -0
- package/lib/tool/errors.js +63 -0
- package/lib/tool/errors.js.map +1 -0
- package/lib/tool/guidance.d.ts +5 -0
- package/lib/tool/guidance.d.ts.map +1 -0
- package/lib/tool/guidance.js +48 -0
- package/lib/tool/guidance.js.map +1 -0
- package/lib/tool/history.d.ts +27 -0
- package/lib/tool/history.d.ts.map +1 -0
- package/lib/tool/history.js +157 -0
- package/lib/tool/history.js.map +1 -0
- package/lib/tool/index.d.ts +8 -0
- package/lib/tool/index.d.ts.map +1 -0
- package/lib/tool/index.js +296 -0
- package/lib/tool/index.js.map +1 -0
- package/lib/tool/inputs.d.ts +12 -0
- package/lib/tool/inputs.d.ts.map +1 -0
- package/lib/tool/inputs.js +24 -0
- package/lib/tool/inputs.js.map +1 -0
- package/lib/tool/list-models.d.ts +3 -0
- package/lib/tool/list-models.d.ts.map +1 -0
- package/lib/tool/list-models.js +38 -0
- package/lib/tool/list-models.js.map +1 -0
- package/lib/tool/list-sessions.d.ts +3 -0
- package/lib/tool/list-sessions.d.ts.map +1 -0
- package/lib/tool/list-sessions.js +70 -0
- package/lib/tool/list-sessions.js.map +1 -0
- package/lib/tool/list-worktrees.d.ts +3 -0
- package/lib/tool/list-worktrees.d.ts.map +1 -0
- package/lib/tool/list-worktrees.js +46 -0
- package/lib/tool/list-worktrees.js.map +1 -0
- package/lib/tool/native-session.d.ts +74 -0
- package/lib/tool/native-session.d.ts.map +1 -0
- package/lib/tool/native-session.js +248 -0
- package/lib/tool/native-session.js.map +1 -0
- package/lib/tool/new-worktree.d.ts +3 -0
- package/lib/tool/new-worktree.d.ts.map +1 -0
- package/lib/tool/new-worktree.js +81 -0
- package/lib/tool/new-worktree.js.map +1 -0
- package/lib/tool/outputs.d.ts +50 -0
- package/lib/tool/outputs.d.ts.map +1 -0
- package/lib/tool/outputs.js +65 -0
- package/lib/tool/outputs.js.map +1 -0
- package/lib/tool/report-result.d.ts +3 -0
- package/lib/tool/report-result.d.ts.map +1 -0
- package/lib/tool/report-result.js +83 -0
- package/lib/tool/report-result.js.map +1 -0
- package/lib/tool/schema.d.ts +7 -0
- package/lib/tool/schema.d.ts.map +1 -0
- package/lib/tool/schema.js +92 -0
- package/lib/tool/schema.js.map +1 -0
- package/lib/tool/send-message.d.ts +3 -0
- package/lib/tool/send-message.d.ts.map +1 -0
- package/lib/tool/send-message.js +64 -0
- package/lib/tool/send-message.js.map +1 -0
- package/lib/tool/span-worktree.d.ts +3 -0
- package/lib/tool/span-worktree.d.ts.map +1 -0
- package/lib/tool/span-worktree.js +114 -0
- package/lib/tool/span-worktree.js.map +1 -0
- package/lib/tool/types.d.ts +54 -0
- package/lib/tool/types.d.ts.map +1 -0
- package/lib/tool/types.js +2 -0
- package/lib/tool/types.js.map +1 -0
- package/lib/typert.host.js +387 -46
- package/lib/typert.remote-client.d.ts +17 -5
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +387 -46
- package/package.json +17 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-context.js","sourceRoot":"","sources":["../../../src/client/context/worktree-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worktree-context.js","sourceRoot":"","sources":["../../../src/client/context/worktree-context.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { WorktreeTranslate } from '../surface/types.js';
|
|
2
2
|
import type { WorktreeViewError } from '../view/worktree-view.js';
|
|
3
3
|
/** Present a header request while its target read settles, without expanding navigation. */
|
|
4
|
-
export declare function DashboardRequest({ t, error, onRetry, onClose, }: {
|
|
4
|
+
export declare function DashboardRequest({ t, error, onRetry, onClose, context, }: {
|
|
5
5
|
readonly t: WorktreeTranslate;
|
|
6
6
|
readonly error?: WorktreeViewError;
|
|
7
7
|
readonly onRetry: () => void;
|
|
8
8
|
readonly onClose: () => void;
|
|
9
|
+
readonly context?: string;
|
|
9
10
|
}): import("react").JSX.Element;
|
|
10
11
|
//# sourceMappingURL=DashboardRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardRequest.d.ts","sourceRoot":"","sources":["../../../src/client/dashboard/DashboardRequest.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,EAC/B,CAAC,EACD,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,CAAC,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardRequest.d.ts","sourceRoot":"","sources":["../../../src/client/dashboard/DashboardRequest.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,EAC/B,CAAC,EACD,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,CAAC,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,+BA8DA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useLayoutEffect, useRef, useState } from 'react';
|
|
3
|
-
import { formatWorktreeViewError } from '../view/worktree-error-copy.js';
|
|
4
3
|
import { mountDashboardOverlay } from './dashboard-overlay.js';
|
|
5
4
|
import styles from './dashboard.css';
|
|
5
|
+
import { ErrorToast } from '../surface/components/NotificationToasts.js';
|
|
6
6
|
/** Present a header request while its target read settles, without expanding navigation. */
|
|
7
|
-
export function DashboardRequest({ t, error, onRetry, onClose, }) {
|
|
7
|
+
export function DashboardRequest({ t, error, onRetry, onClose, context, }) {
|
|
8
8
|
const ref = useRef(null);
|
|
9
9
|
const [placement, setPlacement] = useState();
|
|
10
10
|
useLayoutEffect(() => {
|
|
@@ -33,6 +33,6 @@ export function DashboardRequest({ t, error, onRetry, onClose, }) {
|
|
|
33
33
|
}
|
|
34
34
|
}, children: [_jsxs("header", { className: styles.dashboardTopline, "data-dashboard-topbar": true, "data-window-drag": true, children: [_jsx("span", { style: {
|
|
35
35
|
marginInlineStart: `max(0px, calc(var(--dsh-frame-leading-clearance, 0px) - ${placement?.left ?? 0}px - 20px))`,
|
|
36
|
-
}, children: t('dashboard.title') }), _jsx("div", { className: styles.dashboardToplineActions, children: _jsx("button", { type: "button", className: styles.dashboardButton, onClick: onClose, children: t('dashboard.back') }) })] }), _jsxs("div", { className: styles.dashboardPage, children: [_jsx("p", { role:
|
|
36
|
+
}, children: t('dashboard.title') }), _jsx("div", { className: styles.dashboardToplineActions, children: _jsx("button", { type: "button", className: styles.dashboardButton, onClick: onClose, children: t('dashboard.back') }) })] }), _jsxs("div", { className: styles.dashboardPage, children: [error === undefined && _jsx("p", { role: "status", children: t('status.loading') }), _jsx(ErrorToast, { error: error, t: t, scope: "dashboard-request", context: context ?? t('dashboard.title'), actions: [{ label: t('action.retry'), onClick: onRetry }] })] })] }));
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=DashboardRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardRequest.js","sourceRoot":"","sources":["../../../src/client/dashboard/DashboardRequest.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DashboardRequest.js","sourceRoot":"","sources":["../../../src/client/dashboard/DashboardRequest.tsx"],"names":[],"mappings":"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"}
|
|
@@ -2,11 +2,15 @@ import type { DashboardRecord } from './dashboard-selection.js';
|
|
|
2
2
|
import type { WorktreeTranslate } from '../surface/types.js';
|
|
3
3
|
import type { SessionListLike, SessionPresentation } from '../session/session-view.js';
|
|
4
4
|
import type { BranchRecord, WorktreeManager } from '../../contract/index.js';
|
|
5
|
+
import type { WorktreeToolSettingsManager } from '../../contract/tool-settings.js';
|
|
5
6
|
export interface WorktreeDashboardProps {
|
|
6
|
-
readonly manager?: WorktreeManager
|
|
7
|
+
readonly manager?: WorktreeManager & Partial<WorktreeToolSettingsManager>;
|
|
7
8
|
readonly onSaveInstructions?: (text: string, expected: string) => Promise<string>;
|
|
8
9
|
readonly onSaveBaseline?: (baseBranch: string, expectedBaseBranch?: string) => Promise<string>;
|
|
10
|
+
readonly onFetchBranches?: () => Promise<readonly BranchRecord[]>;
|
|
11
|
+
readonly onLoadBranches?: () => Promise<readonly BranchRecord[]>;
|
|
9
12
|
readonly branches?: readonly BranchRecord[];
|
|
13
|
+
readonly branchesLoading?: boolean;
|
|
10
14
|
readonly record: DashboardRecord;
|
|
11
15
|
readonly workspaceTitle: string;
|
|
12
16
|
readonly t: WorktreeTranslate;
|
|
@@ -24,5 +28,5 @@ export interface WorktreeDashboardProps {
|
|
|
24
28
|
readonly onOpenFile?: (path: string) => void;
|
|
25
29
|
}
|
|
26
30
|
/** A managed Worktree or browser Main projection with explicit unavailable states for inapplicable facts. */
|
|
27
|
-
export declare function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, branches, }: WorktreeDashboardProps): import("react").JSX.Element;
|
|
31
|
+
export declare function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, onFetchBranches, onLoadBranches, branches, branchesLoading, }: WorktreeDashboardProps): import("react").JSX.Element;
|
|
28
32
|
//# sourceMappingURL=WorktreeDashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeDashboard.d.ts","sourceRoot":"","sources":["../../../src/client/dashboard/WorktreeDashboard.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAWvF,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"WorktreeDashboard.d.ts","sourceRoot":"","sources":["../../../src/client/dashboard/WorktreeDashboard.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAWvF,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAOnF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC1E,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClF,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/F,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC,CAAC;IAClE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC,CAAC;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,CAAC,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC;IAChD,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAC,CAAC,CAAC;IACzF,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IACvC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AA8SD,6GAA6G;AAC7G,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,cAAc,EACd,CAAC,EACD,OAAO,EACP,aAAa,EACb,sBAAsB,EACtB,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,cAAc,EACd,QAAa,EACb,eAAuB,GACxB,EAAE,sBAAsB,+BAqlBxB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { NotificationToasts } from '../surface/components/NotificationToasts.js';
|
|
3
|
+
import { toWorktreeViewError } from '../view/worktree-view.js';
|
|
4
|
+
import { formatWorktreeViewError } from '../view/worktree-error-copy.js';
|
|
5
|
+
import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import { Button, Modal, StateDot, Tooltip, writeClipboard, } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
7
|
+
import { IconBranchOutline16, IconCopyOutline16, IconEditOutline16, IconPanelLeftOutline16, } from '../dsh-icons.js';
|
|
5
8
|
import { isBlankSession, relativeTime, sessionDisplayLabel } from '../session/session-view.js';
|
|
6
9
|
import { currentSessionIdFromList } from '../session/session-selection.js';
|
|
7
10
|
import { sessionStatusLabel, sessionTimeLabel } from '../session/session-labels.js';
|
|
@@ -13,6 +16,8 @@ import styles from './dashboard.css';
|
|
|
13
16
|
import { WorktreeInstructions } from './WorktreeInstructions.js';
|
|
14
17
|
import { WorktreeGitPanel } from './git/WorktreeGitPanel.js';
|
|
15
18
|
import { useWorktreeGitOverview, WorktreeGitOverviewValue } from './git/WorktreeGitOverview.js';
|
|
19
|
+
import { GitBranchPicker } from '../branch/GitBranchSelector.js';
|
|
20
|
+
import { ToolSettings } from '../settings/ToolSettings.js';
|
|
16
21
|
const TABS = ['overview', 'git', 'sessions', 'children', 'settings'];
|
|
17
22
|
function DashboardIcon({ kind }) {
|
|
18
23
|
const paths = {
|
|
@@ -35,24 +40,34 @@ function DashboardFactRow({ label, children, action, baseline = false, }) {
|
|
|
35
40
|
function PlaceholderButton({ children, t }) {
|
|
36
41
|
return (_jsx("button", { type: "button", className: styles.dashboardButton, disabled: true, title: t('dashboard.soon'), children: children }));
|
|
37
42
|
}
|
|
38
|
-
function WorktreeBaselineEditor({ value, branches, currentBranch, onSave, t, disabled, }) {
|
|
43
|
+
function WorktreeBaselineEditor({ value, branches, loading, currentBranch, onSave, onFetch, onLoad, t, disabled, context, }) {
|
|
39
44
|
const [saved, setSaved] = useState(value);
|
|
40
45
|
const [draft, setDraft] = useState();
|
|
41
|
-
const [search, setSearch] = useState('');
|
|
42
46
|
const [pending, setPending] = useState(false);
|
|
43
|
-
const [error, setError] = useState(
|
|
47
|
+
const [error, setError] = useState();
|
|
44
48
|
const busy = useRef(false);
|
|
45
49
|
const alive = useRef(true);
|
|
46
|
-
const optionRefs = useRef([]);
|
|
47
50
|
const trigger = useRef(null);
|
|
48
51
|
const wasOpen = useRef(false);
|
|
49
52
|
const expected = useRef(value);
|
|
50
|
-
|
|
51
|
-
const
|
|
53
|
+
// Workspace projections omit the branch catalog; this editor owns on-demand results.
|
|
54
|
+
const [fetched, setFetched] = useState();
|
|
55
|
+
const [reading, setReading] = useState(false);
|
|
56
|
+
const editorOpen = useRef(false);
|
|
57
|
+
const editorGeneration = useRef(0);
|
|
58
|
+
const requestGeneration = useRef(0);
|
|
59
|
+
const roster = fetched ?? branches;
|
|
60
|
+
const options = useMemo(() => roster.filter((branch) => branch.kind === 'remote' || branch.name !== currentBranch), [roster, currentBranch]);
|
|
61
|
+
const draftMatches = options.filter((branch) => (branch.ref ?? branch.name) === draft ||
|
|
62
|
+
(!draft?.startsWith('refs/') && (branch.name === draft ||
|
|
63
|
+
(branch.kind === 'remote' && 'remotes/' + branch.name === draft))));
|
|
64
|
+
const validDraft = draftMatches.length === 1;
|
|
52
65
|
useEffect(() => {
|
|
53
66
|
alive.current = true;
|
|
54
67
|
return () => {
|
|
55
68
|
alive.current = false;
|
|
69
|
+
editorGeneration.current++;
|
|
70
|
+
requestGeneration.current++;
|
|
56
71
|
};
|
|
57
72
|
}, []);
|
|
58
73
|
useEffect(() => {
|
|
@@ -67,74 +82,66 @@ function WorktreeBaselineEditor({ value, branches, currentBranch, onSave, t, dis
|
|
|
67
82
|
const closeEditor = () => {
|
|
68
83
|
if (pending)
|
|
69
84
|
return;
|
|
85
|
+
editorOpen.current = false;
|
|
86
|
+
editorGeneration.current++;
|
|
87
|
+
requestGeneration.current++;
|
|
88
|
+
setReading(false);
|
|
70
89
|
setDraft(undefined);
|
|
71
|
-
|
|
72
|
-
setError(false);
|
|
90
|
+
setError(undefined);
|
|
73
91
|
};
|
|
74
92
|
const openEditor = () => {
|
|
93
|
+
editorOpen.current = true;
|
|
94
|
+
editorGeneration.current++;
|
|
95
|
+
requestGeneration.current++;
|
|
96
|
+
setReading(false);
|
|
75
97
|
expected.current = saved;
|
|
76
98
|
setDraft(saved ?? '');
|
|
77
|
-
|
|
78
|
-
setError(false);
|
|
99
|
+
setError(undefined);
|
|
79
100
|
};
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return;
|
|
94
|
-
setDraft(branch.name);
|
|
95
|
-
};
|
|
96
|
-
const moveOption = (offset) => {
|
|
97
|
-
if (filteredOptions.length === 0)
|
|
98
|
-
return;
|
|
99
|
-
const nextIndex = activeIndex < 0
|
|
100
|
-
? offset > 0
|
|
101
|
-
? 0
|
|
102
|
-
: filteredOptions.length - 1
|
|
103
|
-
: (activeIndex + offset + filteredOptions.length) % filteredOptions.length;
|
|
104
|
-
selectOption(nextIndex);
|
|
105
|
-
optionRefs.current[nextIndex]?.scrollIntoView({ block: 'nearest' });
|
|
106
|
-
};
|
|
107
|
-
const onSearchKeyDown = (event) => {
|
|
108
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
109
|
-
event.preventDefault();
|
|
110
|
-
moveOption(event.key === 'ArrowDown' ? 1 : -1);
|
|
101
|
+
const lifetime = editorGeneration.current;
|
|
102
|
+
const readBranches = async (read) => {
|
|
103
|
+
if (!alive.current || !editorOpen.current || editorGeneration.current !== lifetime)
|
|
104
|
+
return options;
|
|
105
|
+
const request = ++requestGeneration.current;
|
|
106
|
+
const isCurrent = () => alive.current && editorOpen.current &&
|
|
107
|
+
editorGeneration.current === lifetime && requestGeneration.current === request;
|
|
108
|
+
setReading(true);
|
|
109
|
+
try {
|
|
110
|
+
const next = await read();
|
|
111
|
+
if (isCurrent())
|
|
112
|
+
setFetched(next);
|
|
113
|
+
return next.filter((branch) => branch.kind === 'remote' || branch.name !== currentBranch);
|
|
111
114
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
finally {
|
|
116
|
+
if (isCurrent())
|
|
117
|
+
setReading(false);
|
|
115
118
|
}
|
|
116
119
|
};
|
|
117
120
|
const save = async () => {
|
|
118
121
|
if (busy.current ||
|
|
119
122
|
draft === undefined ||
|
|
120
123
|
onSave === undefined ||
|
|
121
|
-
|
|
124
|
+
loading ||
|
|
125
|
+
reading ||
|
|
126
|
+
!validDraft)
|
|
122
127
|
return;
|
|
123
128
|
busy.current = true;
|
|
124
129
|
setPending(true);
|
|
125
|
-
setError(
|
|
130
|
+
setError(undefined);
|
|
126
131
|
try {
|
|
127
132
|
const result = await onSave(draft, expected.current);
|
|
128
133
|
if (alive.current) {
|
|
129
134
|
setSaved(result);
|
|
130
135
|
expected.current = result;
|
|
136
|
+
editorOpen.current = false;
|
|
137
|
+
editorGeneration.current++;
|
|
138
|
+
requestGeneration.current++;
|
|
131
139
|
setDraft(undefined);
|
|
132
|
-
setSearch('');
|
|
133
140
|
}
|
|
134
141
|
}
|
|
135
|
-
catch {
|
|
142
|
+
catch (cause) {
|
|
136
143
|
if (alive.current)
|
|
137
|
-
setError(
|
|
144
|
+
setError(toWorktreeViewError(cause));
|
|
138
145
|
}
|
|
139
146
|
finally {
|
|
140
147
|
busy.current = false;
|
|
@@ -142,12 +149,26 @@ function WorktreeBaselineEditor({ value, branches, currentBranch, onSave, t, dis
|
|
|
142
149
|
setPending(false);
|
|
143
150
|
}
|
|
144
151
|
};
|
|
145
|
-
return (_jsxs(_Fragment, { children: [_jsx(DashboardFactRow, { label: t('dashboard.base'), baseline: true, action: onSave !== undefined ? (_jsx(Tooltip, { label: t('dashboard.editBase'), side: "bottom", delayMs: 500, disabled: disabled || options.length === 0, children: _jsx("button", { type: "button", ref: trigger, className: styles.dashboardIconButton, "data-dashboard-baseline-edit": true, "aria-label": t('dashboard.editBase'), title: t('dashboard.editBase'), "aria-haspopup": "dialog", "aria-expanded": draft !== undefined, disabled: disabled || options.length === 0, onClick: openEditor, children: _jsx(IconEditOutline16, {}) }) })) : undefined, children: saved === undefined ? (_jsx("span", { className: styles.dashboardHistorical, children: t('dashboard.historicalUnavailable') })) : (_jsx("span", { "data-dashboard-baseline-value": true, children: saved })) }), _jsx(Modal, { open: draft !== undefined, onClose: closeEditor, closeLabel: t('dialog.closeBaseline'), title: t('dashboard.editBase'), description: t('dashboard.editBaseDescription'), className: styles.dashboardBaselineModal, contentClassName: styles.dashboardBaselineModalContent, footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", disabled: pending, onClick: closeEditor, children: t('dashboard.cancelBase') }), _jsx(Button, { variant: "primary", "data-dashboard-baseline-save": true, disabled: pending || disabled ||
|
|
146
|
-
|
|
147
|
-
|
|
152
|
+
return (_jsxs(_Fragment, { children: [_jsx(DashboardFactRow, { label: t('dashboard.base'), baseline: true, action: onSave !== undefined ? (_jsx(Tooltip, { label: t('dashboard.editBase'), side: "bottom", delayMs: 500, disabled: disabled || (options.length === 0 && onLoad === undefined), children: _jsx("button", { type: "button", ref: trigger, className: styles.dashboardIconButton, "data-dashboard-baseline-edit": true, "aria-label": t('dashboard.editBase'), title: t('dashboard.editBase'), "aria-haspopup": "dialog", "aria-expanded": draft !== undefined, disabled: disabled || (options.length === 0 && onLoad === undefined), onClick: openEditor, children: _jsx(IconEditOutline16, {}) }) })) : undefined, children: saved === undefined ? (_jsx("span", { className: styles.dashboardHistorical, children: t('dashboard.historicalUnavailable') })) : (_jsx("span", { "data-dashboard-baseline-value": true, title: saved, children: saved.replace(/^refs\/(heads|remotes)\//u, '') })) }), _jsx(Modal, { open: draft !== undefined, onClose: closeEditor, closeLabel: t('dialog.closeBaseline'), title: t('dashboard.editBase'), description: t('dashboard.editBaseDescription'), className: styles.dashboardBaselineModal, contentClassName: styles.dashboardBaselineModalContent, footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", disabled: pending, onClick: closeEditor, children: t('dashboard.cancelBase') }), _jsx(Button, { variant: "primary", "data-dashboard-baseline-save": true, disabled: pending || disabled || loading || reading || !validDraft, onClick: () => void save(), children: t(pending ? 'dashboard.savingBase' : 'dashboard.saveBase') })] }), children: _jsxs("div", { className: styles.dashboardBaselinePicker, "data-dashboard-baseline-modal": true, children: [draft !== undefined && _jsx(GitBranchPicker, { branches: options, value: draft, onChange: setDraft, t: t, disabled: pending || disabled, loading: loading, onClose: closeEditor, onLoad: onLoad === undefined ? undefined : () => readBranches(onLoad), onFetch: onFetch === undefined ? undefined : () => readBranches(onFetch) }, lifetime), _jsx(NotificationToasts, { notices: error === undefined
|
|
153
|
+
? []
|
|
154
|
+
: [
|
|
155
|
+
{
|
|
156
|
+
key: JSON.stringify(['baseline', context, error.code, error.details]),
|
|
157
|
+
context, error,
|
|
158
|
+
actions: [{ label: t('action.retry'), disabled: pending || disabled,
|
|
159
|
+
onClick: () => { void save(); } }],
|
|
160
|
+
describe: (translate) => translate('dashboard.base') + ' · ' + (context ?? ''),
|
|
161
|
+
message: (translate) => translate('dashboard.baseSaveFailed') +
|
|
162
|
+
(error.code === 'WORKTREE_VIEW_FAILED' ? '' : ' ' + formatWorktreeViewError(error, translate)),
|
|
163
|
+
text: t('dashboard.baseSaveFailed') +
|
|
164
|
+
(error.code === 'WORKTREE_VIEW_FAILED'
|
|
165
|
+
? ''
|
|
166
|
+
: ' ' + formatWorktreeViewError(error, t)),
|
|
167
|
+
},
|
|
168
|
+
] })] }) })] }));
|
|
148
169
|
}
|
|
149
170
|
/** A managed Worktree or browser Main projection with explicit unavailable states for inapplicable facts. */
|
|
150
|
-
export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, branches = [], }) {
|
|
171
|
+
export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, onFetchBranches, onLoadBranches, branches = [], branchesLoading = false, }) {
|
|
151
172
|
const surface = useRef(null);
|
|
152
173
|
const heading = useRef(null);
|
|
153
174
|
const [placement, setPlacement] = useState();
|
|
@@ -202,7 +223,7 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
202
223
|
return () => {
|
|
203
224
|
branchCopyGeneration.current += 1;
|
|
204
225
|
};
|
|
205
|
-
}, [record.branch]);
|
|
226
|
+
}, [record.branch, record.currentBranch, record.currentHead?.name]);
|
|
206
227
|
const copyPath = async () => {
|
|
207
228
|
if (copyPending.current)
|
|
208
229
|
return;
|
|
@@ -223,8 +244,10 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
223
244
|
copyPending.current = false;
|
|
224
245
|
}
|
|
225
246
|
};
|
|
226
|
-
const
|
|
227
|
-
const
|
|
247
|
+
const isMain = isMainWorktreeId(record.worktreeId);
|
|
248
|
+
const refName = record.currentHead?.name ?? record.currentBranch ?? record.branch;
|
|
249
|
+
const branchAvailable = refName.length > 0;
|
|
250
|
+
const displayBranch = branchAvailable ? refName : t('dashboard.branchUnavailable');
|
|
228
251
|
const copyBranch = async () => {
|
|
229
252
|
if (!branchAvailable || branchCopyPending.current)
|
|
230
253
|
return;
|
|
@@ -232,7 +255,7 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
232
255
|
const generation = branchCopyGeneration.current;
|
|
233
256
|
setBranchCopyState('pending');
|
|
234
257
|
try {
|
|
235
|
-
const copied = await writeClipboard(
|
|
258
|
+
const copied = await writeClipboard(refName);
|
|
236
259
|
if (generation === branchCopyGeneration.current)
|
|
237
260
|
setBranchCopyState(copied ? 'copied' : 'failed');
|
|
238
261
|
}
|
|
@@ -245,7 +268,7 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
245
268
|
branchCopyPending.current = false;
|
|
246
269
|
}
|
|
247
270
|
};
|
|
248
|
-
const healthKey = record.health === 'ready'
|
|
271
|
+
const healthKey = isMain ? 'dashboard.mainReady' : record.health === 'ready'
|
|
249
272
|
? 'worktree.ready'
|
|
250
273
|
: record.health === 'repair'
|
|
251
274
|
? 'worktree.repair'
|
|
@@ -256,10 +279,10 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
256
279
|
: record.health === 'cleaned'
|
|
257
280
|
? 'dashboard.cleaned'
|
|
258
281
|
: 'dashboard.unknown';
|
|
259
|
-
const liveBranch = record.currentBranch === null
|
|
282
|
+
const liveBranch = record.currentHead?.name ?? (record.currentBranch === null
|
|
260
283
|
? t('dashboard.detached')
|
|
261
284
|
: (record.currentBranch ??
|
|
262
|
-
(branchAvailable ? record.branch : t('dashboard.branchUnavailable')));
|
|
285
|
+
(branchAvailable ? record.branch : t('dashboard.branchUnavailable'))));
|
|
263
286
|
const baselineCurrentBranch = record.currentBranch === undefined ? record.branch : (record.currentBranch ?? undefined);
|
|
264
287
|
const persistBaseline = onSaveBaseline === undefined
|
|
265
288
|
? undefined
|
|
@@ -287,7 +310,7 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
287
310
|
document.getElementById(`${id}-${next}`)?.focus();
|
|
288
311
|
};
|
|
289
312
|
const tabLink = (next, label) => (_jsxs("button", { type: "button", className: styles.dashboardLink, onClick: () => selectTab(next, true), children: [label, _jsx("span", { "aria-hidden": "true", children: "\u2192" })] }));
|
|
290
|
-
const sessionList = (ids) => ids.length === 0 ? (
|
|
313
|
+
const sessionList = (ids) => ids.length === 0 ? (_jsxs("div", { className: styles.dashboardEmpty, children: [_jsx("p", { children: t('dashboard.noSessions') }), onCreateSession !== undefined && _jsx("button", { type: "button", className: styles.dashboardButton, disabled: actionPending, onClick: onCreateSession, children: t('dashboard.newSession') })] })) : (_jsx("ul", { className: styles.dashboardSessions, children: ids.map((sessionId) => {
|
|
291
314
|
const presentation = sessionPresentations[sessionId];
|
|
292
315
|
const blank = isBlankSession(sessionId, sessions);
|
|
293
316
|
const statusLabel = presentation === undefined ? undefined : sessionStatusLabel(t, presentation.status);
|
|
@@ -307,6 +330,8 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
307
330
|
if (event.defaultPrevented)
|
|
308
331
|
return;
|
|
309
332
|
if (event.key === 'Escape') {
|
|
333
|
+
if (event.target?.closest?.('[data-single-select-picker]'))
|
|
334
|
+
return;
|
|
310
335
|
// Other dashboard menus own Escape even when focus remains elsewhere in the surface.
|
|
311
336
|
if (event.currentTarget.querySelector('[role="menu"]'))
|
|
312
337
|
return;
|
|
@@ -323,29 +348,24 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
323
348
|
}, children: topActionIsCreateSession ? t('dashboard.newSession') : _jsxs(_Fragment, { children: ["\u2190 ", t('dashboard.back')] }) }), !rightSidebarOpen && onOpenSidebar !== undefined && (_jsx(Tooltip, { label: t('dashboard.openSidebar'), side: "bottom", delayMs: 500, children: _jsx("button", { type: "button", className: styles.dashboardSidebarButton, "aria-label": t('dashboard.openSidebar'), title: t('dashboard.openSidebar'), "data-sidebar-right-expand": true, onClick: () => {
|
|
324
349
|
onOpenSidebar();
|
|
325
350
|
setRightSidebarOpen(true);
|
|
326
|
-
}, children: _jsx(IconPanelLeftOutline16, {}) }) }))] })] }), _jsxs("div", { className: styles.dashboardPage, children: [_jsxs("header", { className: styles.dashboardHeader, children: [_jsxs("div", { className: styles.dashboardIdentity, children: [_jsxs("div", { className: styles.dashboardTitleRow,
|
|
327
|
-
? (event) => {
|
|
328
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
329
|
-
event.preventDefault();
|
|
330
|
-
void copyBranch();
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
: undefined, children: [_jsx(IconBranchOutline16, {}), _jsx("h1", { id: `${id}-title`, ref: heading, tabIndex: -1, children: displayBranch }), _jsxs("span", { className: styles.dashboardHealth, "data-health": record.health ?? 'unknown', children: [_jsx("span", { "aria-hidden": "true", children: "\u25CF" }), t(healthKey)] }), record.status === 'removed' && (_jsx("span", { className: styles.dashboardSoon, children: t('dashboard.archived') }))] }), _jsxs("div", { className: styles.dashboardPath, children: [_jsx("span", { className: styles.dashboardFieldLabel, children: "cwd" }), _jsx("code", { children: record.absolutePath }), _jsx("button", { type: "button", className: styles.dashboardIconButton, "aria-label": t('worktree.copyPath'), title: t('worktree.copyPath'), disabled: copyState === 'pending', onClick: () => {
|
|
351
|
+
}, children: _jsx(IconPanelLeftOutline16, {}) }) }))] })] }), _jsxs("div", { className: styles.dashboardPage, children: [_jsxs("header", { className: styles.dashboardHeader, children: [_jsxs("div", { className: styles.dashboardIdentity, children: [_jsxs("div", { className: styles.dashboardTitleRow, children: [_jsx(IconBranchOutline16, {}), _jsx("h1", { id: `${id}-title`, ref: heading, tabIndex: -1, children: _jsx("button", { type: "button", className: styles.dashboardRefButton, "data-dashboard-copy": "branch", disabled: !branchAvailable, "aria-label": branchAvailable ? t('dashboard.copyBranch') : undefined, title: branchAvailable ? t('dashboard.copyBranch') : undefined, "aria-busy": branchAvailable && branchCopyState === 'pending' ? true : undefined, onClick: branchAvailable ? () => void copyBranch() : undefined, children: displayBranch }) }), record.currentHead?.kind !== undefined && record.currentHead.kind !== 'branch' && _jsx("span", { className: styles.dashboardSoon, children: t(record.currentHead.kind === 'tag' ? 'dashboard.refKind.tag' : 'dashboard.refKind.commit') }), _jsxs("span", { className: styles.dashboardHealth, "data-health": isMain ? 'local' : record.health ?? 'unknown', children: [_jsx("span", { "aria-hidden": "true", children: "\u25CF" }), t(healthKey)] }), record.status === 'removed' && (_jsx("span", { className: styles.dashboardSoon, children: t('dashboard.archived') }))] }), _jsxs("div", { className: styles.dashboardPath, children: [_jsx("span", { className: styles.dashboardFieldLabel, children: "cwd" }), _jsx("code", { children: record.absolutePath }), _jsx("button", { type: "button", className: styles.dashboardIconButton, "aria-label": t('worktree.copyPath'), title: t('worktree.copyPath'), disabled: copyState === 'pending', onClick: () => {
|
|
334
352
|
void copyPath();
|
|
335
|
-
}, children: _jsx(IconCopyOutline16, {}) })] }), _jsx(
|
|
336
|
-
(branchCopyState === '
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
353
|
+
}, children: _jsx(IconCopyOutline16, {}) })] }), _jsx(NotificationToasts, { notices: [
|
|
354
|
+
...(branchCopyState === 'failed'
|
|
355
|
+
? [{ key: 'copy-branch:' + record.absolutePath, text: t('dashboard.branchCopyFailed'),
|
|
356
|
+
context: workspaceTitle + ' · ' + record.branch + ' · ' + record.absolutePath,
|
|
357
|
+
message: (translate) => translate('dashboard.branchCopyFailed') }]
|
|
358
|
+
: []),
|
|
359
|
+
...(copyState === 'failed'
|
|
360
|
+
? [{ key: 'copy-path:' + record.absolutePath, text: t('dashboard.copyFailed'),
|
|
361
|
+
context: workspaceTitle + ' · ' + record.absolutePath,
|
|
362
|
+
message: (translate) => translate('dashboard.copyFailed') }]
|
|
363
|
+
: []),
|
|
364
|
+
] }), _jsx("p", { className: styles.dashboardCopyStatus, role: "status", children: branchCopyState === 'copied'
|
|
365
|
+
? t('dashboard.branchCopied')
|
|
366
|
+
: copyState === 'copied'
|
|
367
|
+
? t('dashboard.copied')
|
|
368
|
+
: '\u00a0' })] }), _jsx("div", { className: styles.dashboardHeaderAside, children: _jsxs("dl", { className: styles.dashboardFacts, children: [!isMain && _jsx(DashboardFactRow, { label: t(acquisitionLabel), children: acquisitionFacts.timestamp ? (_jsx("time", { dateTime: acquisitionFacts.timestamp, children: new Date(acquisitionFacts.timestamp).toLocaleString() })) : (_jsx("span", { className: styles.dashboardHistorical, children: t('dashboard.historicalUnavailable') })) }), !isMain && (persistBaseline !== undefined ? (_jsx(WorktreeBaselineEditor, { context: workspaceTitle + ' · ' + record.branch + ' · ' + record.absolutePath, value: baselineBranch, branches: branches, loading: branchesLoading, currentBranch: baselineCurrentBranch, onSave: persistBaseline, onFetch: onFetchBranches, onLoad: onLoadBranches, t: t, disabled: record.status !== 'active' || record.health === 'recovery-needed' })) : (_jsx(DashboardFactRow, { label: t('dashboard.base'), baseline: true, children: displayedBaseline?.replace(/^refs\/(heads|remotes)\//u, '') ?? (_jsx("span", { className: styles.dashboardHistorical, children: t('dashboard.historicalUnavailable') })) }))), _jsx(DashboardFactRow, { label: t('dashboard.source'), children: isMainWorktreeId(record.worktreeId)
|
|
349
369
|
? t('worktree.main')
|
|
350
370
|
: t(record.source === 'external' ? 'dashboard.external' : 'dashboard.plugin') })] }) })] }), _jsx("div", { className: styles.dashboardTabs, role: "tablist", "aria-label": t('dashboard.title'), children: TABS.map((value) => (_jsxs("button", { type: "button", id: `${id}-${value}`, role: "tab", "aria-selected": tab === value, "aria-controls": `${id}-panel`, tabIndex: tab === value ? 0 : -1, onClick: () => selectTab(value), onKeyDown: (event) => {
|
|
351
371
|
const index = TABS.indexOf(value);
|
|
@@ -362,9 +382,11 @@ export function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose,
|
|
|
362
382
|
event.preventDefault();
|
|
363
383
|
selectTab(next, true);
|
|
364
384
|
}
|
|
365
|
-
}, children: [_jsx(DashboardIcon, { kind: value }), tabLabel(value)] }, value))) }), _jsx("div", { id: `${id}-panel`, role: "tabpanel", "aria-labelledby": `${id}-${tab}`, tabIndex: 0, className: styles.dashboardPanel, children: tab === 'overview' ? (_jsxs("div", { className: styles.dashboardGrid, children: [_jsxs("div", { className: styles.dashboardColumn, children: [_jsxs("section", { className: styles.dashboardStart, children: [_jsxs("h2", { children: [_jsx(IconBranchOutline16, {}), t('dashboard.start')] }), _jsx("p", { children: t('dashboard.startDescription') }), _jsxs("div", { className: styles.dashboardStartActions, children: [_jsxs("button", { type: "button", disabled: actionPending || !onCreateWorktree, onClick: onCreateWorktree, "data-dashboard-action": "create-worktree", children: [_jsx(DashboardIcon, { kind: "git" }), _jsxs("span", { children: [_jsx("strong", { children: t('dashboard.newWorktree') }), _jsx("small", { children: t('dashboard.newWorktreeDescription') })] })] }), _jsxs("button", { type: "button", disabled: actionPending || !onCreateSession, onClick: onCreateSession, "data-dashboard-action": "create-session", children: [_jsx(DashboardIcon, { kind: "sessions" }), _jsxs("span", { children: [_jsx("strong", { children: t('dashboard.newSession') }), _jsx("small", { children: t('dashboard.newSessionDescription') })] })] })] })] }), _jsxs(Card, { title: t('dashboard.instructions'), icon: _jsx(DashboardIcon, { kind: "instructions" }), children: [_jsx("p", { children: t('dashboard.instructionsDescription') }), _jsx(WorktreeInstructions, { value: record.instructions ?? '', onSave: onSaveInstructions, t: t, disabled: actionPending || record.health === 'recovery-needed' })] }), _jsxs(Card, { title: tabLabel('sessions'), icon: _jsx(DashboardIcon, { kind: "sessions" }), action: _jsx("span", { children: sessionIds.length }), children: [sessionList(sessionIds.slice(0, 5)), tabLink('sessions', t('dashboard.viewSessions'))] })] }), _jsxs("div", { className: styles.dashboardColumn, children: [_jsxs(Card, { title: t('dashboard.status'), icon: _jsx(DashboardIcon, { kind: "git" }), children: [_jsx("p", { children: t('dashboard.statusHint') }), _jsxs("dl", { className: styles.dashboardFacts, children: [_jsx(DashboardFactRow, { label: t('dashboard.health'), children: t(healthKey) }), _jsx(DashboardFactRow, { label: t('dashboard.branch'), children: liveBranch }), _jsx(DashboardFactRow, { label: t('dashboard.base'), children: displayedBaseline ?? (_jsx("span", { className: styles.dashboardHistorical, children: t('dashboard.historicalUnavailable') })) }), _jsx(DashboardFactRow, { label: t('dashboard.aheadBehind'), children: _jsx(WorktreeGitOverviewValue, { state: gitOverview, metric: "aheadBehind", t: t }) }), _jsx(DashboardFactRow, { label: t('dashboard.committedChanges'), children: _jsx(WorktreeGitOverviewValue, { state: gitOverview, metric: "committed", t: t }) }), _jsx(DashboardFactRow, { label: t('dashboard.workingTree'), children: _jsx(WorktreeGitOverviewValue, { state: gitOverview, metric: "workingTree", t: t }) })] }), tabLink('git', t('dashboard.viewDetails'))] }), _jsxs(Card, { title: t('dashboard.derived'), icon: _jsx(DashboardIcon, { kind: "children" }), action: placeholder, children: [_jsx("div", { className: styles.dashboardEmpty, children: _jsx("p", { children: t('dashboard.childrenHint') }) }), tabLink('children', t('dashboard.viewChildren'))] }), _jsx(Card, { title: t('dashboard.quickActions'), icon: _jsx(DashboardIcon, { kind: "actions" }), children: _jsxs("div", { className: styles.dashboardQuickActions, children: [['terminal', 'diff', 'pullRequest', 'tests', 'sync'].map((action) => (_jsx(PlaceholderButton, { t: t, children: t(`dashboard.action.${action}`) }, action))), _jsx("button", { type: "button", className: styles.dashboardButton, disabled: actionPending || !onArchiveWorktree, onClick: onArchiveWorktree, "data-dashboard-action": "archive-worktree", children: t('dashboard.action.archive') })] }) })] })] })) : tab === 'git' ? (_jsx(WorktreeGitPanel, { manager: manager, workspaceId: record.workspaceId, worktreeId: record.worktreeId, defaultBaselineBranch: displayedBaseline, currentBranch: baselineCurrentBranch, capturedBaseline: record.baseCommit !== undefined, onOpenFile: (filePath) => {
|
|
385
|
+
}, children: [_jsx(DashboardIcon, { kind: value }), tabLabel(value)] }, value))) }), _jsx("div", { id: `${id}-panel`, role: "tabpanel", "aria-labelledby": `${id}-${tab}`, tabIndex: 0, className: styles.dashboardPanel, children: tab === 'overview' ? (_jsxs("div", { className: styles.dashboardGrid, children: [_jsxs("div", { className: styles.dashboardColumn, children: [_jsxs("section", { className: styles.dashboardStart, children: [_jsxs("h2", { children: [_jsx(IconBranchOutline16, {}), t('dashboard.start')] }), _jsx("p", { children: t('dashboard.startDescription') }), _jsxs("div", { className: styles.dashboardStartActions, children: [_jsxs("button", { type: "button", disabled: actionPending || !onCreateWorktree, onClick: onCreateWorktree, "data-dashboard-action": "create-worktree", children: [_jsx(DashboardIcon, { kind: "git" }), _jsxs("span", { children: [_jsx("strong", { children: t('dashboard.newWorktree') }), _jsx("small", { children: t('dashboard.newWorktreeDescription') })] })] }), _jsxs("button", { type: "button", disabled: actionPending || !onCreateSession, onClick: onCreateSession, "data-dashboard-action": "create-session", children: [_jsx(DashboardIcon, { kind: "sessions" }), _jsxs("span", { children: [_jsx("strong", { children: t('dashboard.newSession') }), _jsx("small", { children: t('dashboard.newSessionDescription') })] })] })] })] }), _jsxs(Card, { title: t('dashboard.instructions'), icon: _jsx(DashboardIcon, { kind: "instructions" }), children: [_jsx("p", { children: t('dashboard.instructionsDescription') }), _jsx(WorktreeInstructions, { context: workspaceTitle + ' · ' + record.branch + ' · ' + record.absolutePath, value: record.instructions ?? '', onSave: onSaveInstructions, t: t, disabled: actionPending || record.health === 'recovery-needed' })] }), _jsxs(Card, { title: tabLabel('sessions'), icon: _jsx(DashboardIcon, { kind: "sessions" }), action: _jsx("span", { children: sessionIds.length }), children: [sessionList(sessionIds.slice(0, 5)), tabLink('sessions', t('dashboard.viewSessions'))] })] }), _jsxs("div", { className: styles.dashboardColumn, children: [_jsxs(Card, { title: t('dashboard.status'), icon: _jsx(DashboardIcon, { kind: "git" }), children: [_jsx("p", { children: t('dashboard.statusHint') }), _jsxs("dl", { className: styles.dashboardFacts, children: [_jsx(DashboardFactRow, { label: t('dashboard.health'), children: t(healthKey) }), _jsx(DashboardFactRow, { label: t('dashboard.branch'), children: liveBranch }), !isMain && _jsx(DashboardFactRow, { label: t('dashboard.base'), children: displayedBaseline?.replace(/^refs\/(heads|remotes)\//u, '') ?? (_jsx("span", { className: styles.dashboardHistorical, children: t('dashboard.historicalUnavailable') })) }), _jsx(DashboardFactRow, { label: t('dashboard.aheadBehind'), children: _jsx(WorktreeGitOverviewValue, { state: gitOverview, metric: "aheadBehind", t: t }) }), _jsx(DashboardFactRow, { label: t('dashboard.committedChanges'), children: _jsx(WorktreeGitOverviewValue, { state: gitOverview, metric: "committed", t: t }) }), _jsx(DashboardFactRow, { label: t('dashboard.workingTree'), children: _jsx(WorktreeGitOverviewValue, { state: gitOverview, metric: "workingTree", t: t }) })] }), tabLink('git', t('dashboard.viewDetails'))] }), _jsxs(Card, { title: t('dashboard.derived'), icon: _jsx(DashboardIcon, { kind: "children" }), action: placeholder, children: [_jsx("div", { className: styles.dashboardEmpty, children: _jsx("p", { children: t('dashboard.childrenHint') }) }), tabLink('children', t('dashboard.viewChildren'))] }), _jsx(Card, { title: t('dashboard.quickActions'), icon: _jsx(DashboardIcon, { kind: "actions" }), children: _jsxs("div", { className: styles.dashboardQuickActions, children: [['terminal', 'diff', 'pullRequest', 'tests', 'sync'].map((action) => (_jsx(PlaceholderButton, { t: t, children: t(`dashboard.action.${action}`) }, action))), _jsx("button", { type: "button", className: styles.dashboardButton, disabled: actionPending || !onArchiveWorktree, onClick: onArchiveWorktree, "data-dashboard-action": "archive-worktree", children: t('dashboard.action.archive') })] }) })] })] })) : tab === 'git' ? (_jsx(WorktreeGitPanel, { context: workspaceTitle + ' · ' + record.branch + ' · ' + record.absolutePath, manager: manager, workspaceId: record.workspaceId, worktreeId: record.worktreeId, defaultBaselineBranch: displayedBaseline, currentBranch: baselineCurrentBranch, capturedBaseline: record.baseCommit !== undefined, onOpenFile: onOpenFile === undefined ? undefined : (filePath) => {
|
|
366
386
|
onOpenFile?.(filePath);
|
|
367
|
-
setRightSidebarOpen(
|
|
368
|
-
}, t: t })) : tab === 'sessions' ? (_jsx(Card, { title: tabLabel('sessions'), icon: _jsx(DashboardIcon, { kind: "sessions" }), action: _jsx("button", { type: "button", className: styles.dashboardButton, disabled: actionPending || !onCreateSession, onClick: onCreateSession, children: t('dashboard.newSession') }), children: sessionList(sessionIds) })) : (
|
|
387
|
+
setRightSidebarOpen(isRightSidebarExpanded?.() ?? false);
|
|
388
|
+
}, t: t })) : tab === 'sessions' ? (_jsx(Card, { title: tabLabel('sessions'), icon: _jsx(DashboardIcon, { kind: "sessions" }), action: _jsx("button", { type: "button", className: styles.dashboardButton, disabled: actionPending || !onCreateSession, onClick: onCreateSession, children: t('dashboard.newSession') }), children: sessionList(sessionIds) })) : tab === 'settings' ? (_jsx(Card, { title: tabLabel('settings'), icon: _jsx(DashboardIcon, { kind: "settings" }), children: _jsx(ToolSettings, { manager: manager, scope: isMainWorktreeId(record.worktreeId)
|
|
389
|
+
? { kind: 'local', workspaceId: record.workspaceId }
|
|
390
|
+
: { kind: 'worktree', workspaceId: record.workspaceId, worktreeId: record.worktreeId }, t: t }, JSON.stringify([record.workspaceId, record.worktreeId])) })) : (_jsxs("section", { className: styles.dashboardTabPlaceholder, children: [_jsx(DashboardIcon, { kind: tab }), _jsx("h2", { children: tabLabel(tab) }), _jsx("p", { children: t(`dashboard.hint.${tab}`) }), placeholder] })) }), _jsx("p", { className: styles.dashboardFooter, children: t('dashboard.mvpHint') })] })] }));
|
|
369
391
|
}
|
|
370
392
|
//# sourceMappingURL=WorktreeDashboard.js.map
|