You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add integration and E2E test suites using tmux
- Add automatic tmux detection in .bin/bun wrapper
- Add test utilities for checking dependencies
- Add comprehensive testing documentation
- Update CLI to use strip-ansi for output cleaning
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+44-19Lines changed: 44 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,35 +114,35 @@ Before you begin, you'll need to install a few tools:
114
114
115
115
10.**Running in other directories**:
116
116
117
-
In order to run the CLI from other directories, you need to first publish the agents to the database.
117
+
In order to run the CLI from other directories, you need to first publish the agents to the database.
118
118
119
-
- First, create a publisher profile at http://localhost:3000/publishers. Make sure the `publisher_id` is `codebuff`.
119
+
- First, create a publisher profile at http://localhost:3000/publishers. Make sure the `publisher_id` is `codebuff`.
120
120
121
-
- Run:
121
+
- Run:
122
122
123
-
```bash
124
-
bun run start-bin publish base
125
-
```
123
+
```bash
124
+
bun run start-bin publish base
125
+
```
126
126
127
-
- It will give you an error along the lines of `Invalid agent ID: [some agent ID]`, e.g. `Invalid agent ID: context-pruner`. You need to publish that agent at the same time, e.g.:
127
+
- It will give you an error along the lines of `Invalid agent ID: [some agent ID]`, e.g. `Invalid agent ID: context-pruner`. You need to publish that agent at the same time, e.g.:
128
128
129
-
```bash
130
-
bun run start-bin publish base context-pruner
131
-
```
129
+
```bash
130
+
bun run start-bin publish base context-pruner
131
+
```
132
132
133
-
- Repeat this until there are no more errors.
133
+
- Repeat this until there are no more errors.
134
134
135
-
- As of the time of writing, the command required is:
135
+
- As of the time of writing, the command required is:
136
136
137
-
```bash
138
-
bun start-bin publish base context-pruner file-explorer file-picker researcher thinker reviewer
139
-
```
137
+
```bash
138
+
bun start-bin publish base context-pruner file-explorer file-picker researcher thinker reviewer
139
+
```
140
140
141
-
- Now, you can start the CLI in any directory by running:
141
+
- Now, you can start the CLI in any directory by running:
142
142
143
-
```bash
144
-
bun run start-bin --cwd [some/other/directory]
145
-
```
143
+
```bash
144
+
bun run start-bin --cwd [some/other/directory]
145
+
```
146
146
147
147
## Understanding the Codebase
148
148
@@ -204,6 +204,31 @@ bun test specific.test.ts # Run just one test file
204
204
205
205
**Writing tests:** Use `spyOn()` for mocking functions (it's cleaner than `mock.module()`), and always clean up with `mock.restore()` in your `afterEach()` blocks.
206
206
207
+
#### Interactive CLI Testing
208
+
209
+
For testing interactive CLI features (user input, real-time responses), install tmux:
210
+
211
+
```bash
212
+
# macOS
213
+
brew install tmux
214
+
215
+
# Ubuntu/Debian
216
+
sudo apt-get install tmux
217
+
218
+
# Windows (via WSL)
219
+
wsl --install
220
+
sudo apt-get install tmux
221
+
```
222
+
223
+
Run the proof-of-concept to validate your setup:
224
+
225
+
```bash
226
+
cd cli
227
+
bun run test:tmux-poc
228
+
```
229
+
230
+
See [cli/src/__tests__/README.md](cli/src/__tests__/README.md) for comprehensive interactive testing documentation.
**Why?** The `.bin/bun` wrapper detects files matching `*integration*.test.ts` or `*e2e*.test.ts` patterns and automatically checks for tmux availability. If tmux is missing, it shows installation instructions but lets tests continue (they skip gracefully).
12
+
13
+
**Benefits:**
14
+
15
+
- Project-wide convention (not CLI-specific)
16
+
- No hardcoded directory paths
17
+
- Automatic dependency validation
18
+
- Clear test categorization
19
+
3
20
## Migration from Custom OpenTUI Fork
4
21
5
22
**October 2024**: Migrated from custom `CodebuffAI/opentui#codebuff/custom` fork to official `@opentui/react@^0.1.27` and `@opentui/core@^0.1.27` packages.
0 commit comments