@akiojin/gwt 2.12.1 → 2.14.0
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.ja.md +33 -0
- package/README.md +31 -0
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +17 -11
- package/dist/claude.js.map +1 -1
- package/dist/cli/ui/components/App.d.ts +0 -6
- package/dist/cli/ui/components/App.d.ts.map +1 -1
- package/dist/cli/ui/components/App.js +93 -85
- package/dist/cli/ui/components/App.js.map +1 -1
- package/dist/cli/ui/components/common/Select.js +2 -2
- package/dist/cli/ui/components/common/Select.js.map +1 -1
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts +3 -1
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BranchListScreen.js +168 -34
- package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js +3 -3
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js.map +1 -1
- package/dist/cli/ui/hooks/useGitData.d.ts.map +1 -1
- package/dist/cli/ui/hooks/useGitData.js +17 -0
- package/dist/cli/ui/hooks/useGitData.js.map +1 -1
- package/dist/cli/ui/types.d.ts +2 -0
- package/dist/cli/ui/types.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.js +7 -2
- package/dist/cli/ui/utils/branchFormatter.js.map +1 -1
- package/dist/cli/ui/utils/continueSession.d.ts.map +1 -1
- package/dist/cli/ui/utils/continueSession.js +1 -1
- package/dist/cli/ui/utils/continueSession.js.map +1 -1
- package/dist/cli/ui/utils/modelOptions.d.ts.map +1 -1
- package/dist/cli/ui/utils/modelOptions.js +7 -0
- package/dist/cli/ui/utils/modelOptions.js.map +1 -1
- package/dist/client/assets/index-DPWWHorC.js +72 -0
- package/dist/client/assets/index-DsDNCy5f.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/codex.d.ts.map +1 -1
- package/dist/codex.js +21 -11
- package/dist/codex.js.map +1 -1
- package/dist/config/builtin-tools.d.ts.map +1 -1
- package/dist/config/builtin-tools.js +3 -2
- package/dist/config/builtin-tools.js.map +1 -1
- package/dist/config/shared-env.d.ts +41 -0
- package/dist/config/shared-env.d.ts.map +1 -0
- package/dist/config/shared-env.js +114 -0
- package/dist/config/shared-env.js.map +1 -0
- package/dist/gemini.d.ts.map +1 -1
- package/dist/gemini.js +20 -17
- package/dist/gemini.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -7
- package/dist/index.js.map +1 -1
- package/dist/logging/logger.d.ts +24 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +60 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/logging/rotation.d.ts +6 -0
- package/dist/logging/rotation.d.ts.map +1 -0
- package/dist/logging/rotation.js +26 -0
- package/dist/logging/rotation.js.map +1 -0
- package/dist/qwen.d.ts.map +1 -1
- package/dist/qwen.js +15 -11
- package/dist/qwen.js.map +1 -1
- package/dist/services/aiToolResolver.d.ts +41 -0
- package/dist/services/aiToolResolver.d.ts.map +1 -0
- package/dist/services/aiToolResolver.js +194 -0
- package/dist/services/aiToolResolver.js.map +1 -0
- package/dist/services/customToolResolver.d.ts +10 -0
- package/dist/services/customToolResolver.d.ts.map +1 -0
- package/dist/services/customToolResolver.js +71 -0
- package/dist/services/customToolResolver.js.map +1 -0
- package/dist/shared/aiToolConstants.d.ts +9 -0
- package/dist/shared/aiToolConstants.d.ts.map +1 -0
- package/dist/shared/aiToolConstants.js +29 -0
- package/dist/shared/aiToolConstants.js.map +1 -0
- package/dist/types/tools.d.ts +12 -0
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/prompt.d.ts.map +1 -1
- package/dist/utils/prompt.js.map +1 -1
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +15 -6
- package/dist/utils/session.js.map +1 -1
- package/dist/utils/terminal.d.ts +12 -3
- package/dist/utils/terminal.d.ts.map +1 -1
- package/dist/utils/terminal.js +5 -34
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils/webui.d.ts +8 -0
- package/dist/utils/webui.d.ts.map +1 -0
- package/dist/utils/webui.js +35 -0
- package/dist/utils/webui.js.map +1 -0
- package/dist/web/client/src/components/AIToolLaunchModal.d.ts +9 -0
- package/dist/web/client/src/components/AIToolLaunchModal.d.ts.map +1 -0
- package/dist/web/client/src/components/AIToolLaunchModal.js +363 -0
- package/dist/web/client/src/components/AIToolLaunchModal.js.map +1 -0
- package/dist/web/client/src/components/BranchGraph.d.ts.map +1 -1
- package/dist/web/client/src/components/BranchGraph.js +46 -49
- package/dist/web/client/src/components/BranchGraph.js.map +1 -1
- package/dist/web/client/src/components/CustomToolForm.d.ts +23 -0
- package/dist/web/client/src/components/CustomToolForm.d.ts.map +1 -0
- package/dist/web/client/src/components/CustomToolForm.js +209 -0
- package/dist/web/client/src/components/CustomToolForm.js.map +1 -0
- package/dist/web/client/src/components/CustomToolList.d.ts +10 -0
- package/dist/web/client/src/components/CustomToolList.d.ts.map +1 -0
- package/dist/web/client/src/components/CustomToolList.js +57 -0
- package/dist/web/client/src/components/CustomToolList.js.map +1 -0
- package/dist/web/client/src/components/EnvEditor.d.ts.map +1 -1
- package/dist/web/client/src/components/EnvEditor.js +33 -26
- package/dist/web/client/src/components/EnvEditor.js.map +1 -1
- package/dist/web/client/src/components/EnvironmentEditor.d.ts +17 -0
- package/dist/web/client/src/components/EnvironmentEditor.d.ts.map +1 -0
- package/dist/web/client/src/components/EnvironmentEditor.js +22 -0
- package/dist/web/client/src/components/EnvironmentEditor.js.map +1 -0
- package/dist/web/client/src/components/Terminal.d.ts.map +1 -1
- package/dist/web/client/src/components/Terminal.js +10 -3
- package/dist/web/client/src/components/Terminal.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts +10 -0
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +1 -0
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +104 -0
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +1 -0
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +22 -0
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +1 -0
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +79 -0
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +1 -0
- package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts +11 -0
- package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts.map +1 -0
- package/dist/web/client/src/components/branch-detail/TerminalPanel.js +32 -0
- package/dist/web/client/src/components/branch-detail/TerminalPanel.js.map +1 -0
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +40 -0
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +1 -0
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js +147 -0
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +1 -0
- package/dist/web/client/src/components/branch-detail/index.d.ts +5 -0
- package/dist/web/client/src/components/branch-detail/index.d.ts.map +1 -0
- package/dist/web/client/src/components/branch-detail/index.js +5 -0
- package/dist/web/client/src/components/branch-detail/index.js.map +1 -0
- package/dist/web/client/src/components/common/BranchCard.d.ts +17 -0
- package/dist/web/client/src/components/common/BranchCard.d.ts.map +1 -0
- package/dist/web/client/src/components/common/BranchCard.js +36 -0
- package/dist/web/client/src/components/common/BranchCard.js.map +1 -0
- package/dist/web/client/src/components/common/MetricCard.d.ts +10 -0
- package/dist/web/client/src/components/common/MetricCard.d.ts.map +1 -0
- package/dist/web/client/src/components/common/MetricCard.js +10 -0
- package/dist/web/client/src/components/common/MetricCard.js.map +1 -0
- package/dist/web/client/src/components/common/PageHeader.d.ts +12 -0
- package/dist/web/client/src/components/common/PageHeader.d.ts.map +1 -0
- package/dist/web/client/src/components/common/PageHeader.js +14 -0
- package/dist/web/client/src/components/common/PageHeader.js.map +1 -0
- package/dist/web/client/src/components/common/SearchInput.d.ts +14 -0
- package/dist/web/client/src/components/common/SearchInput.d.ts.map +1 -0
- package/dist/web/client/src/components/common/SearchInput.js +15 -0
- package/dist/web/client/src/components/common/SearchInput.js.map +1 -0
- package/dist/web/client/src/components/common/StatusBadge.d.ts +10 -0
- package/dist/web/client/src/components/common/StatusBadge.d.ts.map +1 -0
- package/dist/web/client/src/components/common/StatusBadge.js +15 -0
- package/dist/web/client/src/components/common/StatusBadge.js.map +1 -0
- package/dist/web/client/src/components/common/index.d.ts +6 -0
- package/dist/web/client/src/components/common/index.d.ts.map +1 -0
- package/dist/web/client/src/components/common/index.js +6 -0
- package/dist/web/client/src/components/common/index.js.map +1 -0
- package/dist/web/client/src/components/ui/alert.d.ts +9 -0
- package/dist/web/client/src/components/ui/alert.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/alert.js +25 -0
- package/dist/web/client/src/components/ui/alert.js.map +1 -0
- package/dist/web/client/src/components/ui/badge.d.ts +10 -0
- package/dist/web/client/src/components/ui/badge.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/badge.js +25 -0
- package/dist/web/client/src/components/ui/badge.js.map +1 -0
- package/dist/web/client/src/components/ui/button.d.ts +12 -0
- package/dist/web/client/src/components/ui/button.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/button.js +33 -0
- package/dist/web/client/src/components/ui/button.js.map +1 -0
- package/dist/web/client/src/components/ui/card.d.ts +9 -0
- package/dist/web/client/src/components/ui/card.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/card.js +16 -0
- package/dist/web/client/src/components/ui/card.js.map +1 -0
- package/dist/web/client/src/components/ui/index.d.ts +8 -0
- package/dist/web/client/src/components/ui/index.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/index.js +8 -0
- package/dist/web/client/src/components/ui/index.js.map +1 -0
- package/dist/web/client/src/components/ui/input.d.ts +4 -0
- package/dist/web/client/src/components/ui/input.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/input.js +8 -0
- package/dist/web/client/src/components/ui/input.js.map +1 -0
- package/dist/web/client/src/components/ui/select.d.ts +14 -0
- package/dist/web/client/src/components/ui/select.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/select.js +39 -0
- package/dist/web/client/src/components/ui/select.js.map +1 -0
- package/dist/web/client/src/components/ui/table.d.ts +11 -0
- package/dist/web/client/src/components/ui/table.d.ts.map +1 -0
- package/dist/web/client/src/components/ui/table.js +21 -0
- package/dist/web/client/src/components/ui/table.js.map +1 -0
- package/dist/web/client/src/hooks/useSessions.d.ts.map +1 -1
- package/dist/web/client/src/hooks/useSessions.js +6 -1
- package/dist/web/client/src/hooks/useSessions.js.map +1 -1
- package/dist/web/client/src/lib/utils.d.ts +7 -0
- package/dist/web/client/src/lib/utils.d.ts.map +1 -0
- package/dist/web/client/src/lib/utils.js +10 -0
- package/dist/web/client/src/lib/utils.js.map +1 -0
- package/dist/web/client/src/lib/websocket.d.ts +7 -0
- package/dist/web/client/src/lib/websocket.d.ts.map +1 -1
- package/dist/web/client/src/lib/websocket.js +44 -0
- package/dist/web/client/src/lib/websocket.js.map +1 -1
- package/dist/web/client/src/pages/BranchDetailPage.d.ts.map +1 -1
- package/dist/web/client/src/pages/BranchDetailPage.js +113 -361
- package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
- package/dist/web/client/src/pages/BranchListPage.d.ts.map +1 -1
- package/dist/web/client/src/pages/BranchListPage.js +89 -127
- package/dist/web/client/src/pages/BranchListPage.js.map +1 -1
- package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +1 -1
- package/dist/web/client/src/pages/ConfigManagementPage.js +46 -41
- package/dist/web/client/src/pages/ConfigManagementPage.js.map +1 -1
- package/dist/web/client/src/pages/ConfigPage.d.ts +3 -0
- package/dist/web/client/src/pages/ConfigPage.d.ts.map +1 -0
- package/dist/web/client/src/pages/ConfigPage.js +216 -0
- package/dist/web/client/src/pages/ConfigPage.js.map +1 -0
- package/dist/web/client/vite.config.d.ts.map +1 -1
- package/dist/web/client/vite.config.js +8 -1
- package/dist/web/client/vite.config.js.map +1 -1
- package/dist/web/server/index.d.ts +24 -2
- package/dist/web/server/index.d.ts.map +1 -1
- package/dist/web/server/index.js +49 -18
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/pty/manager.d.ts +12 -10
- package/dist/web/server/pty/manager.d.ts.map +1 -1
- package/dist/web/server/pty/manager.js +76 -43
- package/dist/web/server/pty/manager.js.map +1 -1
- package/dist/web/server/routes/branches.d.ts +2 -2
- package/dist/web/server/routes/branches.d.ts.map +1 -1
- package/dist/web/server/routes/branches.js.map +1 -1
- package/dist/web/server/routes/config.d.ts +2 -2
- package/dist/web/server/routes/config.d.ts.map +1 -1
- package/dist/web/server/routes/config.js.map +1 -1
- package/dist/web/server/routes/index.d.ts +2 -2
- package/dist/web/server/routes/index.d.ts.map +1 -1
- package/dist/web/server/routes/index.js.map +1 -1
- package/dist/web/server/routes/sessions.d.ts +2 -2
- package/dist/web/server/routes/sessions.d.ts.map +1 -1
- package/dist/web/server/routes/sessions.js +35 -2
- package/dist/web/server/routes/sessions.js.map +1 -1
- package/dist/web/server/routes/worktrees.d.ts +2 -2
- package/dist/web/server/routes/worktrees.d.ts.map +1 -1
- package/dist/web/server/routes/worktrees.js +2 -2
- package/dist/web/server/routes/worktrees.js.map +1 -1
- package/dist/web/server/services/worktrees.d.ts.map +1 -1
- package/dist/web/server/services/worktrees.js +7 -1
- package/dist/web/server/services/worktrees.js.map +1 -1
- package/dist/web/server/tray.d.ts +24 -0
- package/dist/web/server/tray.d.ts.map +1 -0
- package/dist/web/server/tray.js +79 -0
- package/dist/web/server/tray.js.map +1 -0
- package/dist/web/server/types.d.ts +4 -0
- package/dist/web/server/types.d.ts.map +1 -0
- package/dist/web/server/types.js +2 -0
- package/dist/web/server/types.js.map +1 -0
- package/dist/web/server/websocket/handler.d.ts +18 -2
- package/dist/web/server/websocket/handler.d.ts.map +1 -1
- package/dist/web/server/websocket/handler.js +82 -9
- package/dist/web/server/websocket/handler.js.map +1 -1
- package/dist/worktree.d.ts +1 -0
- package/dist/worktree.d.ts.map +1 -1
- package/dist/worktree.js.map +1 -1
- package/package.json +17 -3
- package/src/claude.ts +26 -15
- package/src/cli/ui/__tests__/components/ModelSelectorScreen.initial.test.tsx +13 -13
- package/src/cli/ui/__tests__/components/common/Select.test.tsx +11 -0
- package/src/cli/ui/__tests__/components/screens/BranchListScreen.test.tsx +97 -33
- package/src/cli/ui/__tests__/components/screens/BranchQuickStartScreen.test.tsx +4 -4
- package/src/cli/ui/__tests__/performance/branchList.performance.test.tsx +7 -3
- package/src/cli/ui/components/App.tsx +111 -125
- package/src/cli/ui/components/common/Select.tsx +2 -2
- package/src/cli/ui/components/screens/BranchListScreen.tsx +220 -34
- package/src/cli/ui/components/screens/BranchQuickStartScreen.tsx +41 -46
- package/src/cli/ui/hooks/useGitData.ts +20 -0
- package/src/cli/ui/types.ts +3 -0
- package/src/cli/ui/utils/branchFormatter.ts +7 -2
- package/src/cli/ui/utils/continueSession.ts +1 -7
- package/src/cli/ui/utils/modelOptions.test.ts +14 -0
- package/src/cli/ui/utils/modelOptions.ts +7 -0
- package/src/codex.ts +31 -22
- package/src/config/builtin-tools.ts +6 -2
- package/src/config/shared-env.ts +139 -0
- package/src/gemini.ts +35 -22
- package/src/index.ts +61 -7
- package/src/logging/logger.ts +82 -0
- package/src/logging/rotation.ts +25 -0
- package/src/qwen.ts +28 -19
- package/src/services/aiToolResolver.ts +276 -0
- package/src/services/customToolResolver.ts +98 -0
- package/src/shared/aiToolConstants.ts +30 -0
- package/src/trayicon.d.ts +30 -0
- package/src/types/tools.ts +15 -0
- package/src/utils/prompt.ts +15 -9
- package/src/utils/session.ts +80 -26
- package/src/utils/terminal.ts +11 -41
- package/src/utils/webui.ts +43 -0
- package/src/web/client/components.json +21 -0
- package/src/web/client/src/components/AIToolLaunchModal.tsx +575 -0
- package/src/web/client/src/components/BranchGraph.tsx +95 -75
- package/src/web/client/src/components/CustomToolForm.tsx +386 -0
- package/src/web/client/src/components/CustomToolList.tsx +119 -0
- package/src/web/client/src/components/EnvEditor.tsx +91 -81
- package/src/web/client/src/components/EnvironmentEditor.tsx +97 -0
- package/src/web/client/src/components/Terminal.tsx +11 -3
- package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +179 -0
- package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +181 -0
- package/src/web/client/src/components/branch-detail/TerminalPanel.tsx +92 -0
- package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +327 -0
- package/src/web/client/src/components/branch-detail/index.ts +4 -0
- package/src/web/client/src/components/common/BranchCard.tsx +117 -0
- package/src/web/client/src/components/common/MetricCard.tsx +22 -0
- package/src/web/client/src/components/common/PageHeader.tsx +44 -0
- package/src/web/client/src/components/common/SearchInput.tsx +40 -0
- package/src/web/client/src/components/common/StatusBadge.tsx +37 -0
- package/src/web/client/src/components/common/index.ts +5 -0
- package/src/web/client/src/components/ui/alert.tsx +63 -0
- package/src/web/client/src/components/ui/badge.tsx +44 -0
- package/src/web/client/src/components/ui/button.tsx +57 -0
- package/src/web/client/src/components/ui/card.tsx +82 -0
- package/src/web/client/src/components/ui/index.ts +32 -0
- package/src/web/client/src/components/ui/input.tsx +21 -0
- package/src/web/client/src/components/ui/select.tsx +156 -0
- package/src/web/client/src/components/ui/table.tsx +119 -0
- package/src/web/client/src/hooks/useSessions.ts +10 -1
- package/src/web/client/src/index.css +46 -816
- package/src/web/client/src/lib/utils.ts +10 -0
- package/src/web/client/src/lib/websocket.ts +48 -1
- package/src/web/client/src/pages/BranchDetailPage.tsx +222 -694
- package/src/web/client/src/pages/BranchListPage.tsx +190 -236
- package/src/web/client/src/pages/ConfigManagementPage.tsx +94 -76
- package/src/web/client/src/pages/ConfigPage.tsx +362 -0
- package/src/web/client/vite.config.ts +8 -1
- package/src/web/server/index.ts +78 -19
- package/src/web/server/pty/manager.ts +128 -55
- package/src/web/server/routes/branches.ts +2 -2
- package/src/web/server/routes/config.ts +2 -2
- package/src/web/server/routes/index.ts +2 -2
- package/src/web/server/routes/sessions.ts +61 -9
- package/src/web/server/routes/worktrees.ts +5 -5
- package/src/web/server/services/worktrees.ts +12 -4
- package/src/web/server/tray.ts +93 -0
- package/src/web/server/types.ts +14 -0
- package/src/web/server/websocket/handler.ts +119 -13
- package/src/worktree.ts +1 -0
- package/dist/client/assets/index-DeNwPosA.css +0 -1
- package/dist/client/assets/index-Dl798X5w.js +0 -32
|
@@ -2,37 +2,22 @@ import React, { useMemo, useState } from "react";
|
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
3
|
import { useBranches } from "../hooks/useBranches";
|
|
4
4
|
import { BranchGraph } from "../components/BranchGraph";
|
|
5
|
+
import { PageHeader } from "@/components/common/PageHeader";
|
|
6
|
+
import { MetricCard } from "@/components/common/MetricCard";
|
|
7
|
+
import { SearchInput } from "@/components/common/SearchInput";
|
|
8
|
+
import {
|
|
9
|
+
Card,
|
|
10
|
+
CardHeader,
|
|
11
|
+
CardContent,
|
|
12
|
+
CardFooter,
|
|
13
|
+
} from "@/components/ui/card";
|
|
14
|
+
import { Badge } from "@/components/ui/badge";
|
|
15
|
+
import { Button } from "@/components/ui/button";
|
|
16
|
+
import { Alert, AlertDescription } from "@/components/ui/alert";
|
|
5
17
|
import type { Branch } from "../../../../types/api.js";
|
|
6
18
|
|
|
7
19
|
const numberFormatter = new Intl.NumberFormat("ja-JP");
|
|
8
20
|
|
|
9
|
-
const BRANCH_TYPE_LABEL: Record<Branch["type"], string> = {
|
|
10
|
-
local: "ローカル",
|
|
11
|
-
remote: "リモート",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const MERGE_STATUS_LABEL: Record<Branch["mergeStatus"], string> = {
|
|
15
|
-
merged: "マージ済み",
|
|
16
|
-
unmerged: "未マージ",
|
|
17
|
-
unknown: "状態不明",
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const MERGE_STATUS_TONE: Record<
|
|
21
|
-
Branch["mergeStatus"],
|
|
22
|
-
"success" | "warning" | "muted"
|
|
23
|
-
> = {
|
|
24
|
-
merged: "success",
|
|
25
|
-
unmerged: "warning",
|
|
26
|
-
unknown: "muted",
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
interface PageStateMessage {
|
|
30
|
-
title: string;
|
|
31
|
-
description: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const SEARCH_PLACEHOLDER = "ブランチ名やタイプで検索...";
|
|
35
|
-
|
|
36
21
|
export function BranchListPage() {
|
|
37
22
|
const { data, isLoading, error } = useBranches();
|
|
38
23
|
const [query, setQuery] = useState("");
|
|
@@ -40,28 +25,17 @@ export function BranchListPage() {
|
|
|
40
25
|
const branches = data ?? [];
|
|
41
26
|
|
|
42
27
|
const metrics = useMemo(() => {
|
|
43
|
-
const worktrees = branches.filter((
|
|
44
|
-
|
|
45
|
-
).length;
|
|
46
|
-
const remote = branches.filter((branch) => branch.type === "remote").length;
|
|
47
|
-
const healthy = branches.filter(
|
|
48
|
-
(branch) => branch.divergence?.upToDate,
|
|
49
|
-
).length;
|
|
28
|
+
const worktrees = branches.filter((b) => Boolean(b.worktreePath)).length;
|
|
29
|
+
const remote = branches.filter((b) => b.type === "remote").length;
|
|
30
|
+
const healthy = branches.filter((b) => b.divergence?.upToDate).length;
|
|
50
31
|
|
|
51
|
-
return {
|
|
52
|
-
total: branches.length,
|
|
53
|
-
worktrees,
|
|
54
|
-
remote,
|
|
55
|
-
healthy,
|
|
56
|
-
};
|
|
32
|
+
return { total: branches.length, worktrees, remote, healthy };
|
|
57
33
|
}, [branches]);
|
|
58
34
|
|
|
59
35
|
const normalizedQuery = query.trim().toLowerCase();
|
|
60
36
|
|
|
61
37
|
const filteredBranches = useMemo(() => {
|
|
62
|
-
if (!normalizedQuery)
|
|
63
|
-
return branches;
|
|
64
|
-
}
|
|
38
|
+
if (!normalizedQuery) return branches;
|
|
65
39
|
|
|
66
40
|
return branches.filter((branch) => {
|
|
67
41
|
const haystack = [
|
|
@@ -77,208 +51,129 @@ export function BranchListPage() {
|
|
|
77
51
|
});
|
|
78
52
|
}, [branches, normalizedQuery]);
|
|
79
53
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
54
|
+
// Loading state
|
|
55
|
+
if (isLoading) {
|
|
56
|
+
return (
|
|
57
|
+
<div className="min-h-screen bg-background">
|
|
58
|
+
<PageHeader
|
|
59
|
+
eyebrow="WORKTREE DASHBOARD"
|
|
60
|
+
title="gwt Control Center"
|
|
61
|
+
subtitle="Loading branch data..."
|
|
62
|
+
/>
|
|
63
|
+
<main className="mx-auto max-w-7xl px-6 py-8">
|
|
64
|
+
<div className="flex items-center justify-center py-20">
|
|
65
|
+
<div className="text-center">
|
|
66
|
+
<div className="mb-4 text-4xl">⏳</div>
|
|
67
|
+
<p className="text-muted-foreground">Loading branches...</p>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</main>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Error state
|
|
76
|
+
if (error) {
|
|
77
|
+
return (
|
|
78
|
+
<div className="min-h-screen bg-background">
|
|
79
|
+
<PageHeader eyebrow="WORKTREE DASHBOARD" title="gwt Control Center" />
|
|
80
|
+
<main className="mx-auto max-w-7xl px-6 py-8">
|
|
81
|
+
<Alert variant="destructive">
|
|
82
|
+
<AlertDescription>
|
|
83
|
+
{error instanceof Error
|
|
84
|
+
? error.message
|
|
85
|
+
: "Failed to load branches"}
|
|
86
|
+
</AlertDescription>
|
|
87
|
+
</Alert>
|
|
88
|
+
</main>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Empty state
|
|
94
|
+
if (!branches.length) {
|
|
95
|
+
return (
|
|
96
|
+
<div className="min-h-screen bg-background">
|
|
97
|
+
<PageHeader eyebrow="WORKTREE DASHBOARD" title="gwt Control Center" />
|
|
98
|
+
<main className="mx-auto max-w-7xl px-6 py-8">
|
|
99
|
+
<Card className="border-dashed">
|
|
100
|
+
<CardContent className="flex flex-col items-center justify-center py-12">
|
|
101
|
+
<div className="mb-4 text-4xl">📭</div>
|
|
102
|
+
<h3 className="mb-2 text-lg font-semibold">No branches found</h3>
|
|
103
|
+
<p className="text-sm text-muted-foreground">
|
|
104
|
+
Try running{" "}
|
|
105
|
+
<code className="rounded bg-muted px-1">git fetch origin</code>{" "}
|
|
106
|
+
to sync branches.
|
|
107
|
+
</p>
|
|
108
|
+
</CardContent>
|
|
109
|
+
</Card>
|
|
110
|
+
</main>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
108
114
|
|
|
109
115
|
return (
|
|
110
|
-
<div className="
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
</header>
|
|
122
|
-
|
|
123
|
-
<main className="page-content">
|
|
124
|
-
{!pageState && filteredBranches.length > 0 && (
|
|
116
|
+
<div className="min-h-screen bg-background">
|
|
117
|
+
<PageHeader
|
|
118
|
+
eyebrow="WORKTREE DASHBOARD"
|
|
119
|
+
title="gwt Control Center"
|
|
120
|
+
subtitle="Manage Git branches and AI tools from your browser"
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<main className="mx-auto max-w-7xl space-y-6 px-6 py-8">
|
|
124
|
+
{/* Branch Graph */}
|
|
125
|
+
{filteredBranches.length > 0 && (
|
|
125
126
|
<BranchGraph branches={filteredBranches} />
|
|
126
127
|
)}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<article className="metric-card">
|
|
151
|
-
<p className="metric-card__label">最新コミットが最新</p>
|
|
152
|
-
<p className="metric-card__value">
|
|
153
|
-
{numberFormatter.format(metrics.healthy)}
|
|
154
|
-
</p>
|
|
155
|
-
<p className="metric-card__hint">divergence 0 のブランチ</p>
|
|
156
|
-
</article>
|
|
157
|
-
</section>
|
|
158
|
-
|
|
159
|
-
<section className="toolbar">
|
|
160
|
-
<label className="toolbar__field">
|
|
161
|
-
<span className="toolbar__icon" aria-hidden="true">
|
|
162
|
-
🔍
|
|
163
|
-
</span>
|
|
164
|
-
<input
|
|
165
|
-
type="search"
|
|
166
|
-
className="search-input"
|
|
167
|
-
placeholder={SEARCH_PLACEHOLDER}
|
|
168
|
-
value={query}
|
|
169
|
-
onChange={(event) => setQuery(event.target.value)}
|
|
170
|
-
/>
|
|
171
|
-
</label>
|
|
172
|
-
<span className="toolbar__count">
|
|
173
|
-
{numberFormatter.format(filteredBranches.length)} /{" "}
|
|
174
|
-
{numberFormatter.format(metrics.total)} branches
|
|
175
|
-
</span>
|
|
129
|
+
{/* Metrics Grid */}
|
|
130
|
+
<section className="grid grid-cols-2 gap-4 md:grid-cols-4">
|
|
131
|
+
<MetricCard
|
|
132
|
+
label="Total Branches"
|
|
133
|
+
value={numberFormatter.format(metrics.total)}
|
|
134
|
+
hint="Local + Remote"
|
|
135
|
+
/>
|
|
136
|
+
<MetricCard
|
|
137
|
+
label="Active Worktrees"
|
|
138
|
+
value={numberFormatter.format(metrics.worktrees)}
|
|
139
|
+
hint="Ready for AI tools"
|
|
140
|
+
/>
|
|
141
|
+
<MetricCard
|
|
142
|
+
label="Remote Tracking"
|
|
143
|
+
value={numberFormatter.format(metrics.remote)}
|
|
144
|
+
hint="Synced with origin"
|
|
145
|
+
/>
|
|
146
|
+
<MetricCard
|
|
147
|
+
label="Up to Date"
|
|
148
|
+
value={numberFormatter.format(metrics.healthy)}
|
|
149
|
+
hint="No divergence"
|
|
150
|
+
/>
|
|
176
151
|
</section>
|
|
177
152
|
|
|
178
|
-
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
153
|
+
{/* Search */}
|
|
154
|
+
<SearchInput
|
|
155
|
+
value={query}
|
|
156
|
+
onChange={setQuery}
|
|
157
|
+
placeholder="Search branches by name, type, or commit..."
|
|
158
|
+
count={{ filtered: filteredBranches.length, total: metrics.total }}
|
|
159
|
+
/>
|
|
160
|
+
|
|
161
|
+
{/* Branch Grid */}
|
|
162
|
+
{filteredBranches.length === 0 ? (
|
|
163
|
+
<Card className="border-dashed">
|
|
164
|
+
<CardContent className="flex flex-col items-center justify-center py-12">
|
|
165
|
+
<h3 className="mb-2 text-lg font-semibold">
|
|
166
|
+
No matching branches
|
|
167
|
+
</h3>
|
|
168
|
+
<p className="text-sm text-muted-foreground">
|
|
169
|
+
Try a different search term or clear the filter.
|
|
170
|
+
</p>
|
|
171
|
+
</CardContent>
|
|
172
|
+
</Card>
|
|
191
173
|
) : (
|
|
192
|
-
<div className="
|
|
174
|
+
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
193
175
|
{filteredBranches.map((branch) => (
|
|
194
|
-
<
|
|
195
|
-
<div className="branch-card__header">
|
|
196
|
-
<div>
|
|
197
|
-
<p className="branch-card__eyebrow">
|
|
198
|
-
{BRANCH_TYPE_LABEL[branch.type]}ブランチ
|
|
199
|
-
</p>
|
|
200
|
-
<h2>{branch.name}</h2>
|
|
201
|
-
</div>
|
|
202
|
-
<div className="badge-group">
|
|
203
|
-
<span
|
|
204
|
-
className={`status-badge status-badge--${branch.type}`}
|
|
205
|
-
>
|
|
206
|
-
{BRANCH_TYPE_LABEL[branch.type]}
|
|
207
|
-
</span>
|
|
208
|
-
<span
|
|
209
|
-
className={`status-badge status-badge--${MERGE_STATUS_TONE[branch.mergeStatus]}`}
|
|
210
|
-
>
|
|
211
|
-
{MERGE_STATUS_LABEL[branch.mergeStatus]}
|
|
212
|
-
</span>
|
|
213
|
-
<span
|
|
214
|
-
className={`status-badge ${
|
|
215
|
-
branch.worktreePath
|
|
216
|
-
? "status-badge--success"
|
|
217
|
-
: "status-badge--muted"
|
|
218
|
-
}`}
|
|
219
|
-
>
|
|
220
|
-
{branch.worktreePath ? "Worktreeあり" : "Worktree未作成"}
|
|
221
|
-
</span>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
|
|
225
|
-
<p className="branch-card__commit">
|
|
226
|
-
{branch.commitMessage ?? "コミットメッセージがありません"}
|
|
227
|
-
</p>
|
|
228
|
-
|
|
229
|
-
<dl className="metadata-grid metadata-grid--compact">
|
|
230
|
-
<div>
|
|
231
|
-
<dt>最新コミット</dt>
|
|
232
|
-
<dd>{branch.commitHash.slice(0, 7)}</dd>
|
|
233
|
-
</div>
|
|
234
|
-
<div>
|
|
235
|
-
<dt>Author</dt>
|
|
236
|
-
<dd>{branch.author ?? "N/A"}</dd>
|
|
237
|
-
</div>
|
|
238
|
-
<div>
|
|
239
|
-
<dt>Worktree</dt>
|
|
240
|
-
<dd>{branch.worktreePath ?? "未作成"}</dd>
|
|
241
|
-
</div>
|
|
242
|
-
</dl>
|
|
243
|
-
|
|
244
|
-
{branch.divergence && (
|
|
245
|
-
<div className="pill-group">
|
|
246
|
-
<span className="pill">
|
|
247
|
-
Ahead {branch.divergence.ahead}
|
|
248
|
-
</span>
|
|
249
|
-
<span className="pill">
|
|
250
|
-
Behind {branch.divergence.behind}
|
|
251
|
-
</span>
|
|
252
|
-
<span
|
|
253
|
-
className={`pill ${
|
|
254
|
-
branch.divergence.upToDate
|
|
255
|
-
? "pill--success"
|
|
256
|
-
: "pill--warning"
|
|
257
|
-
}`}
|
|
258
|
-
>
|
|
259
|
-
{branch.divergence.upToDate ? "最新" : "更新あり"}
|
|
260
|
-
</span>
|
|
261
|
-
</div>
|
|
262
|
-
)}
|
|
263
|
-
|
|
264
|
-
<div className="branch-card__actions">
|
|
265
|
-
<Link
|
|
266
|
-
className="button button--ghost"
|
|
267
|
-
to={`/${encodeURIComponent(branch.name)}`}
|
|
268
|
-
>
|
|
269
|
-
詳細を見る
|
|
270
|
-
</Link>
|
|
271
|
-
<span
|
|
272
|
-
className={`info-pill ${
|
|
273
|
-
branch.worktreePath
|
|
274
|
-
? "info-pill--success"
|
|
275
|
-
: "info-pill--warning"
|
|
276
|
-
}`}
|
|
277
|
-
>
|
|
278
|
-
{branch.worktreePath ?? "Worktree未作成"}
|
|
279
|
-
</span>
|
|
280
|
-
</div>
|
|
281
|
-
</article>
|
|
176
|
+
<BranchCardItem key={branch.name} branch={branch} />
|
|
282
177
|
))}
|
|
283
178
|
</div>
|
|
284
179
|
)}
|
|
@@ -286,3 +181,62 @@ export function BranchListPage() {
|
|
|
286
181
|
</div>
|
|
287
182
|
);
|
|
288
183
|
}
|
|
184
|
+
|
|
185
|
+
// Extracted Branch Card component
|
|
186
|
+
function BranchCardItem({ branch }: { branch: Branch }) {
|
|
187
|
+
return (
|
|
188
|
+
<Card className="flex flex-col transition-colors hover:border-muted-foreground/50">
|
|
189
|
+
<CardHeader className="pb-3">
|
|
190
|
+
<div className="flex items-start justify-between gap-2">
|
|
191
|
+
<div className="min-w-0 flex-1">
|
|
192
|
+
<p className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
|
|
193
|
+
{branch.type === "local" ? "Local" : "Remote"} Branch
|
|
194
|
+
</p>
|
|
195
|
+
<h3 className="mt-1 truncate font-semibold" title={branch.name}>
|
|
196
|
+
{branch.name}
|
|
197
|
+
</h3>
|
|
198
|
+
</div>
|
|
199
|
+
<div className="flex flex-wrap justify-end gap-1">
|
|
200
|
+
<Badge variant={branch.type === "local" ? "local" : "remote"}>
|
|
201
|
+
{branch.type === "local" ? "L" : "R"}
|
|
202
|
+
</Badge>
|
|
203
|
+
{branch.worktreePath && <Badge variant="success">WT</Badge>}
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
</CardHeader>
|
|
207
|
+
|
|
208
|
+
<CardContent className="flex-1 pb-3">
|
|
209
|
+
<p className="line-clamp-2 text-sm text-muted-foreground">
|
|
210
|
+
{branch.commitMessage ?? "No commit message"}
|
|
211
|
+
</p>
|
|
212
|
+
|
|
213
|
+
{branch.divergence && (
|
|
214
|
+
<div className="mt-3 flex flex-wrap gap-1.5">
|
|
215
|
+
{branch.divergence.ahead > 0 && (
|
|
216
|
+
<Badge variant="outline" className="text-xs">
|
|
217
|
+
↑ {branch.divergence.ahead}
|
|
218
|
+
</Badge>
|
|
219
|
+
)}
|
|
220
|
+
{branch.divergence.behind > 0 && (
|
|
221
|
+
<Badge variant="outline" className="text-xs">
|
|
222
|
+
↓ {branch.divergence.behind}
|
|
223
|
+
</Badge>
|
|
224
|
+
)}
|
|
225
|
+
<Badge
|
|
226
|
+
variant={branch.divergence.upToDate ? "success" : "warning"}
|
|
227
|
+
className="text-xs"
|
|
228
|
+
>
|
|
229
|
+
{branch.divergence.upToDate ? "Up to date" : "Needs sync"}
|
|
230
|
+
</Badge>
|
|
231
|
+
</div>
|
|
232
|
+
)}
|
|
233
|
+
</CardContent>
|
|
234
|
+
|
|
235
|
+
<CardFooter className="pt-0">
|
|
236
|
+
<Button variant="ghost" size="sm" asChild className="w-full">
|
|
237
|
+
<Link to={`/${encodeURIComponent(branch.name)}`}>View Details →</Link>
|
|
238
|
+
</Button>
|
|
239
|
+
</CardFooter>
|
|
240
|
+
</Card>
|
|
241
|
+
);
|
|
242
|
+
}
|