claudedesk 4.4.0 → 4.5.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.
Files changed (86) hide show
  1. package/.github/workflows/ci.yml +2 -33
  2. package/CHANGELOG.md +67 -4
  3. package/CLAUDE.md +6 -7
  4. package/README.md +161 -224
  5. package/dist/main/built-in-playbooks.js +231 -0
  6. package/dist/main/cli-manager.js +21 -9
  7. package/dist/main/git-manager.js +272 -0
  8. package/dist/main/index.js +25 -2
  9. package/dist/main/ipc-handlers.js +192 -2
  10. package/dist/main/playbook-executor.js +321 -0
  11. package/dist/main/playbook-manager.js +271 -0
  12. package/dist/main/quota-service.js +35 -6
  13. package/dist/main/session-manager.js +92 -2
  14. package/dist/main/session-pool.js +19 -0
  15. package/dist/main/settings-persistence.js +76 -0
  16. package/dist/renderer/assets/{index-D5O5Ljoo.js → index-DPk5RtXR.js} +4297 -2226
  17. package/dist/renderer/assets/{index-BNeYLqV4.css → index-DTGEErZK.css} +1 -1
  18. package/dist/renderer/index.html +2 -2
  19. package/dist/shared/ipc-contract.js +56 -1
  20. package/dist/shared/types/playbook-types.js +3 -0
  21. package/docs/agent-teams.png +0 -0
  22. package/docs/create-session.png +0 -0
  23. package/docs/fuel-status-popup.png +0 -0
  24. package/docs/fuel-status-side-panel.png +0 -0
  25. package/docs/git-panel.png +0 -0
  26. package/docs/main-screen.png +0 -0
  27. package/docs/repo-index.md +37 -11
  28. package/docs/settings-workspace.png +0 -0
  29. package/docs/work-space-layout.png +0 -0
  30. package/package.json +1 -1
  31. package/src/main/built-in-playbooks.ts +232 -0
  32. package/src/main/cli-manager.ts +23 -9
  33. package/src/main/git-manager.ts +288 -0
  34. package/src/main/index.ts +29 -2
  35. package/src/main/ipc-handlers.test.ts +126 -0
  36. package/src/main/ipc-handlers.ts +147 -3
  37. package/src/main/playbook-executor.ts +385 -0
  38. package/src/main/playbook-manager.ts +264 -0
  39. package/src/main/quota-service.test.ts +133 -0
  40. package/src/main/quota-service.ts +40 -7
  41. package/src/main/session-manager.ts +104 -2
  42. package/src/main/session-pool.ts +20 -0
  43. package/src/main/settings-persistence.ts +85 -0
  44. package/src/renderer/App.tsx +144 -17
  45. package/src/renderer/components/DiffContentArea.tsx +128 -0
  46. package/src/renderer/components/DiffFileNav.tsx +109 -0
  47. package/src/renderer/components/DiffViewer.tsx +478 -0
  48. package/src/renderer/components/DiffViewerHeader.tsx +76 -0
  49. package/src/renderer/components/GitPanel.tsx +51 -166
  50. package/src/renderer/components/PaneHeader.tsx +27 -0
  51. package/src/renderer/components/PlaybookEditor.tsx +749 -0
  52. package/src/renderer/components/PlaybookPanel.tsx +442 -0
  53. package/src/renderer/components/PlaybookParameterDialog.tsx +497 -0
  54. package/src/renderer/components/PlaybookPicker.tsx +319 -0
  55. package/src/renderer/components/PlaybookProgressPanel.tsx +271 -0
  56. package/src/renderer/components/TeamPanel.tsx +1 -1
  57. package/src/renderer/components/WorktreeCleanupDialog.tsx +312 -0
  58. package/src/renderer/components/WorktreePanel.tsx +519 -0
  59. package/src/renderer/components/ui/CommitDialog.tsx +7 -1
  60. package/src/renderer/components/ui/ContextMenu.tsx +1 -0
  61. package/src/renderer/components/ui/FuelStatusIndicator.tsx +28 -0
  62. package/src/renderer/components/ui/FuelTooltip.tsx +11 -0
  63. package/src/renderer/components/ui/NewSessionDialog.tsx +417 -2
  64. package/src/renderer/components/ui/SettingsDialog.tsx +25 -1
  65. package/src/renderer/components/ui/ShortcutsPanel.tsx +1 -0
  66. package/src/renderer/components/ui/Tab.tsx +31 -0
  67. package/src/renderer/components/ui/TabBar.tsx +11 -2
  68. package/src/renderer/components/ui/ToolsDropdown.tsx +39 -0
  69. package/src/renderer/hooks/useAgentTeams.ts +23 -5
  70. package/src/renderer/hooks/useDiffViewer.ts +145 -0
  71. package/src/renderer/hooks/useGit.ts +105 -1
  72. package/src/renderer/hooks/usePlaybooks.ts +267 -0
  73. package/src/renderer/hooks/useSessionManager.ts +5 -2
  74. package/src/renderer/styles/globals.css +56 -6
  75. package/src/renderer/utils/diff-parser.ts +125 -0
  76. package/src/shared/ipc-contract.ts +108 -1
  77. package/src/shared/ipc-types.ts +10 -0
  78. package/src/shared/types/git-types.ts +50 -0
  79. package/src/shared/types/playbook-types.ts +149 -0
  80. package/docs/AGENT_TEAMS.md +0 -166
  81. package/docs/QUICKSTART_AGENT_TEAMS.md +0 -69
  82. package/docs/REPO_ATLAS_EVALUATION.md +0 -228
  83. package/docs/atlas-ui-prototype.html +0 -1377
  84. package/docs/git-integration-implementation-tasks.md +0 -974
  85. package/docs/git-integration-product-spec.md +0 -916
  86. package/docs/git-integration-ui-spec.md +0 -1464
@@ -45,39 +45,8 @@ jobs:
45
45
  path: coverage/
46
46
  if-no-files-found: warn
47
47
 
48
- e2e:
49
- name: E2E Tests
50
- needs: build
51
- runs-on: ubuntu-latest
52
-
53
- steps:
54
- - uses: actions/checkout@v4
55
-
56
- - name: Setup Node.js
57
- uses: actions/setup-node@v4
58
- with:
59
- node-version: '20.x'
60
- cache: 'npm'
61
-
62
- - name: Install dependencies
63
- run: npm ci
64
-
65
- - name: Install Playwright
66
- run: npx playwright install --with-deps chromium
67
-
68
- - name: Build app
69
- run: npm run build && npm run build:electron
70
-
71
- - name: Run E2E tests
72
- run: xvfb-run --auto-servernum npm run test:e2e
73
-
74
- - name: Upload Playwright report
75
- if: failure()
76
- uses: actions/upload-artifact@v4
77
- with:
78
- name: playwright-report
79
- path: playwright-report/
80
- if-no-files-found: warn
48
+ # E2E tests require Electron + node-pty native module which can't launch in CI.
49
+ # Run locally with: npm run test:e2e
81
50
 
82
51
  package:
83
52
  name: Package Electron App
package/CHANGELOG.md CHANGED
@@ -8,13 +8,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  ## [Unreleased]
9
9
 
10
10
  ### Planned
11
- - Screenshot capture for README documentation
12
- - Automated tests with Jest/Vitest
13
11
  - Homebrew/Chocolatey packaging for easier installation
14
12
  - Development dependency security updates (electron v40+, vite v7+)
15
13
 
16
14
  ---
17
15
 
16
+ ## [4.5.0] - 2026-02-17
17
+
18
+ ### Added
19
+ - **Testing infrastructure** — Vitest 4 + @testing-library/react + Playwright for Electron
20
+ - 250 tests across 20 test files, 3 workspace projects (shared/main/renderer)
21
+ - Auto-derived electronAPI mock from IPC contract
22
+ - E2E tests with Playwright for Electron (app launch, sessions, split view, keyboard shortcuts)
23
+ - CI workflow with coverage artifacts
24
+ - **Git integration** — Full Git panel with staging, commits, branches, and real-time status
25
+ - `GitManager` with `child_process.execFile` (shell injection safe), per-directory mutex, `.git` fs.watch()
26
+ - File staging/unstaging (individual + bulk), branch display, commit history log
27
+ - AI commit message generation (heuristic-based conventional commits format)
28
+ - Optional checkpoint creation on commit
29
+ - Ctrl+Shift+G keyboard shortcut, ToolsDropdown entry with staged count badge
30
+ - 30 IPC methods (`git:*`): 26 invoke + 4 events
31
+ - **Diff viewer** — Full-screen diff overlay with syntax-highlighted unified diffs
32
+ - Categorized file navigation (staged/unstaged/untracked/conflicted)
33
+ - Dual gutter line numbers, colored add/remove/context lines
34
+ - Keyboard navigation (J/K between files), stage/unstage/discard actions from diff view
35
+ - Unified diff parser (`diff-parser.ts`) with old/new line number tracking
36
+ - **Git worktrees** — Worktree management panel with create, remove, and prune operations
37
+ - `WorktreePanel` for listing and managing worktrees
38
+ - `WorktreeCleanupDialog` for cleanup prompts when closing managed worktree sessions
39
+ - **Session playbooks** — Automated multi-step prompt sequences (13th domain)
40
+ - `PlaybookManager` (CRUD + persistence), `PlaybookExecutor` (execution engine)
41
+ - 5 built-in playbooks: API endpoint, bug investigation, code review, component creation, refactor
42
+ - Silence-based step completion (3s no output = done), confirmation gates between steps
43
+ - Dynamic parameter forms (text/multiline/select/filepath), variable interpolation
44
+ - PlaybookPicker (fuzzy search), PlaybookEditor (3-tab slide-in), PlaybookProgressPanel (bottom-docked)
45
+ - Import/export playbooks as JSON, library browser for built-in + custom playbooks
46
+ - Persistence: `~/.claudedesk/playbooks.json`
47
+ - Ctrl+Shift+B keyboard shortcut, ToolsDropdown entry
48
+ - 15 IPC methods (`playbook:*`): 12 invoke + 3 events
49
+ - **Repository Atlas Engine (RAE)** — Automated CLAUDE.md + repo-index.md generation
50
+ - File enumeration via `git ls-files`, regex import analysis, 3-tier domain inference
51
+ - AtlasPanel UI with idle/scanning/preview states
52
+ - 6 IPC methods (`atlas:*`)
53
+
54
+ ### Fixed
55
+ - **Git generate button** — Action bar Generate now auto-opens CommitDialog with the generated message
56
+ - **CommitDialog generate button** — Directly sets title from return value instead of relying on fragile useEffect prop chain
57
+ - **Silent null guard in useGit** — `generateMessage()` now shows error toast when no project directory is available instead of silently returning
58
+ - **Stale generated message** — Generated commit message state is cleared after successful commit
59
+
60
+ ### Changed
61
+ - **IPC contract** — Expanded from 102 to 149 methods (118 invoke + 8 send + 23 event)
62
+ - **Project scale** — 138 source files, ~45,800 LOC, 13 domains, 13 managers
63
+
64
+ ---
65
+
66
+ ## [4.4.1] - 2026-02-13
67
+
68
+ ### Fixed
69
+ - **Burn rate calculation** — Now filters out samples from before quota resets; negative rates clamped to 0
70
+
71
+ ### Added
72
+ - **Quota service tests** — Unit tests for `quota-service.ts` covering burn rate calculation, quota reset handling, and edge cases
73
+
74
+ ### Changed
75
+ - **Documentation cleanup** — Removed deleted documentation files (agent teams guides, git integration specs, atlas evaluation, atlas UI prototype) and cleaned up dead references in CLAUDE.md and README.md
76
+
77
+ ---
78
+
18
79
  ## [4.3.1] - 2026-02-10
19
80
 
20
81
  ### Fixed
@@ -22,7 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
83
  - Updated `CLAUDE.md` to reflect simplified shell setup (cmd.exe on Windows, user shell on Unix)
23
84
  - Updated `SESSION_POOLING_IMPLEMENTATION.md` to remove directory locking references
24
85
  - Updated `CHANGELOG.md` to accurately describe current shell implementation
25
- - Updated `docs/repo-index.md` and `docs/atlas-ui-prototype.html`
86
+ - Updated `docs/repo-index.md`
26
87
 
27
88
  ### Changed
28
89
  - **Shell implementation** - Simplified to use cmd.exe on Windows and user's default shell on Unix
@@ -190,7 +251,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on suggesting changes and
190
251
 
191
252
  ---
192
253
 
193
- [Unreleased]: https://github.com/carloluisito/claudedesk/compare/v4.3.1...HEAD
254
+ [Unreleased]: https://github.com/carloluisito/claudedesk/compare/v4.5.0...HEAD
255
+ [4.5.0]: https://github.com/carloluisito/claudedesk/compare/v4.4.1...v4.5.0
256
+ [4.4.1]: https://github.com/carloluisito/claudedesk/compare/v4.3.1...v4.4.1
194
257
  [4.3.1]: https://github.com/carloluisito/claudedesk/compare/v4.3.0...v4.3.1
195
258
  [4.3.0]: https://github.com/carloluisito/claudedesk/compare/v4.1.1...v4.3.0
196
259
  [4.1.1]: https://github.com/carloluisito/claudedesk/compare/v4.1.0...v4.1.1
package/CLAUDE.md CHANGED
@@ -11,9 +11,9 @@ Electron 28 | React 18 | TypeScript | xterm.js | node-pty | Tailwind CSS | react
11
11
  ```
12
12
  ┌─────────────────────────────────────────────┐
13
13
  │ Main Process (Node.js) │
14
- 9 managers + IPC handlers + session pool
14
+ 13 managers + IPC handlers + session pool
15
15
  └──────────────────┬──────────────────────────┘
16
- │ IPC (102 methods)
16
+ │ IPC (149 methods)
17
17
  ┌──────────────────┴──────────────────────────┐
18
18
  │ Preload (auto-derived context bridge) │
19
19
  └──────────────────┬──────────────────────────┘
@@ -26,7 +26,7 @@ Electron 28 | React 18 | TypeScript | xterm.js | node-pty | Tailwind CSS | react
26
26
 
27
27
  **3-layer pattern per domain:** Manager (main) → Hook (renderer) → Components (renderer)
28
28
 
29
- **IPC contract** (`src/shared/ipc-contract.ts`) is the single source of truth — 102 methods. The preload bridge and `ElectronAPI` type are auto-derived from it.
29
+ **IPC contract** (`src/shared/ipc-contract.ts`) is the single source of truth — 149 methods. The preload bridge and `ElectronAPI` type are auto-derived from it.
30
30
 
31
31
  ## Domain Map
32
32
 
@@ -42,7 +42,8 @@ Electron 28 | React 18 | TypeScript | xterm.js | node-pty | Tailwind CSS | react
42
42
  | Drag-Drop | file-dragdrop-handler, file-utils | useDragDrop, DragDropOverlay, DragDropContextMenu, DragDropSettings | ipc-types.ts | `dragdrop:*` |
43
43
  | Workspaces | settings-persistence | SettingsDialog | ipc-types.ts | `workspace:*` |
44
44
  | Atlas | atlas-manager | useAtlas, AtlasPanel | types/atlas-types.ts | `atlas:*` |
45
- | Git | git-manager | useGit, GitPanel, CommitDialog | types/git-types.ts | `git:*` |
45
+ | Git | git-manager | useGit, useDiffViewer, GitPanel, DiffViewer, DiffFileNav, DiffViewerHeader, DiffContentArea, CommitDialog, WorktreePanel, WorktreeCleanupDialog, diff-parser | types/git-types.ts | `git:*` |
46
+ | Playbooks | playbook-manager, playbook-executor, built-in-playbooks | usePlaybooks, PlaybookPicker, PlaybookParameterDialog, PlaybookProgressPanel, PlaybookPanel, PlaybookEditor | types/playbook-types.ts | `playbook:*` |
46
47
  | Window | index.ts | ConfirmDialog, SettingsDialog, AboutDialog, TitleBarBranding | ipc-types.ts | `window:*`, `dialog:*` |
47
48
 
48
49
  ## Adding a New IPC Method
@@ -72,6 +73,7 @@ That's it. The preload bridge and types auto-derive.
72
73
  - **Split view**: `useSplitView` manages a tree of leaf/branch nodes. Max 4 panes. State persisted in settings.
73
74
  - **Agent team detection**: `AgentTeamManager` watches `~/.claude/teams/` and `~/.claude/tasks/` via `fs.watch()`. Auto-links sessions within 30s of team creation.
74
75
  - **Git integration**: `GitManager` uses `child_process.execFile` (not `exec` — prevents shell injection). Per-directory mutex serializes operations. `.git` directory watching with 500ms debounce for real-time status. Heuristic-based AI commit message generation (conventional commits format).
76
+ - **Playbook execution**: `PlaybookExecutor` writes prompts to PTY and uses silence-based detection (3s no output = step done) for step completion. Never sends Ctrl+C on cancel (just stops sending further steps). One execution per session, confirmation gates pause between steps.
75
77
 
76
78
  ## Testing
77
79
 
@@ -122,7 +124,4 @@ Font: JetBrains Mono. Monospace everywhere.
122
124
  ## Docs
123
125
 
124
126
  - [Repo Index](docs/repo-index.md) — detailed domain-to-file mapping
125
- - [Agent Teams Guide](docs/AGENT_TEAMS.md)
126
- - [Quick Start: Agent Teams](docs/QUICKSTART_AGENT_TEAMS.md)
127
127
  - [Contributing](CONTRIBUTING.md)
128
- - [Repository Atlas Evaluation](docs/REPO_ATLAS_EVALUATION.md)