@every-env/compound-plugin 2.34.6 → 2.34.7
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/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Release numbering now follows the repository `v*` tag line. Starting at `v2.34.0`, the root CLI package and this changelog stay on that shared version stream. Older entries below retain the previous `0.x` CLI numbering.
|
|
9
9
|
|
|
10
|
+
## [2.34.7](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.34.6...v2.34.7) (2026-03-10)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **test-browser:** detect dev server port from project config ([50cb89e](https://github.com/EveryInc/compound-engineering-plugin/commit/50cb89efde7cee7d6dcd42008e6060e1bec44fcc)), closes [#164](https://github.com/EveryInc/compound-engineering-plugin/issues/164)
|
|
16
|
+
|
|
10
17
|
## [2.34.6](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.34.5...v2.34.6) (2026-03-10)
|
|
11
18
|
|
|
12
19
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-browser
|
|
3
3
|
description: Run browser tests on pages affected by current PR or branch
|
|
4
|
-
argument-hint: "[PR number, branch name,
|
|
4
|
+
argument-hint: "[PR number, branch name, 'current', or --port PORT]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Browser Test Command
|
|
@@ -122,31 +122,82 @@ Build a list of URLs to test based on the mapping.
|
|
|
122
122
|
|
|
123
123
|
</file_to_route_mapping>
|
|
124
124
|
|
|
125
|
-
### 4.
|
|
125
|
+
### 4. Detect Dev Server Port
|
|
126
|
+
|
|
127
|
+
<detect_port>
|
|
128
|
+
|
|
129
|
+
Determine the dev server port using this priority order:
|
|
130
|
+
|
|
131
|
+
**Priority 1: Explicit argument**
|
|
132
|
+
If the user passed a port number (e.g., `/test-browser 5000` or `/test-browser --port 5000`), use that port directly.
|
|
133
|
+
|
|
134
|
+
**Priority 2: CLAUDE.md / project instructions**
|
|
135
|
+
```bash
|
|
136
|
+
# Check CLAUDE.md for port references
|
|
137
|
+
grep -Eio '(port\s*[:=]\s*|localhost:)([0-9]{4,5})' CLAUDE.md 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Priority 3: package.json scripts**
|
|
141
|
+
```bash
|
|
142
|
+
# Check dev/start scripts for --port flags
|
|
143
|
+
grep -Eo '\-\-port[= ]+[0-9]{4,5}' package.json 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Priority 4: Environment files**
|
|
147
|
+
```bash
|
|
148
|
+
# Check .env, .env.local, .env.development for PORT=
|
|
149
|
+
grep -h '^PORT=' .env .env.local .env.development 2>/dev/null | tail -1 | cut -d= -f2
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Priority 5: Default fallback**
|
|
153
|
+
If none of the above yields a port, default to `3000`.
|
|
154
|
+
|
|
155
|
+
Store the result in a `PORT` variable for use in all subsequent steps.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Combined detection (run this)
|
|
159
|
+
PORT="${EXPLICIT_PORT:-}"
|
|
160
|
+
if [ -z "$PORT" ]; then
|
|
161
|
+
PORT=$(grep -Eio '(port\s*[:=]\s*|localhost:)([0-9]{4,5})' CLAUDE.md 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1)
|
|
162
|
+
fi
|
|
163
|
+
if [ -z "$PORT" ]; then
|
|
164
|
+
PORT=$(grep -Eo '\-\-port[= ]+[0-9]{4,5}' package.json 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1)
|
|
165
|
+
fi
|
|
166
|
+
if [ -z "$PORT" ]; then
|
|
167
|
+
PORT=$(grep -h '^PORT=' .env .env.local .env.development 2>/dev/null | tail -1 | cut -d= -f2)
|
|
168
|
+
fi
|
|
169
|
+
PORT="${PORT:-3000}"
|
|
170
|
+
echo "Using dev server port: $PORT"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
</detect_port>
|
|
174
|
+
|
|
175
|
+
### 5. Verify Server is Running
|
|
126
176
|
|
|
127
177
|
<check_server>
|
|
128
178
|
|
|
129
|
-
Before testing, verify the local server is accessible:
|
|
179
|
+
Before testing, verify the local server is accessible using the detected port:
|
|
130
180
|
|
|
131
181
|
```bash
|
|
132
|
-
agent-browser open http://localhost
|
|
182
|
+
agent-browser open http://localhost:${PORT}
|
|
133
183
|
agent-browser snapshot -i
|
|
134
184
|
```
|
|
135
185
|
|
|
136
186
|
If server is not running, inform user:
|
|
137
187
|
```markdown
|
|
138
|
-
**Server not running**
|
|
188
|
+
**Server not running on port ${PORT}**
|
|
139
189
|
|
|
140
190
|
Please start your development server:
|
|
141
191
|
- Rails: `bin/dev` or `rails server`
|
|
142
192
|
- Node/Next.js: `npm run dev`
|
|
193
|
+
- Custom port: `/test-browser --port <your-port>`
|
|
143
194
|
|
|
144
195
|
Then run `/test-browser` again.
|
|
145
196
|
```
|
|
146
197
|
|
|
147
198
|
</check_server>
|
|
148
199
|
|
|
149
|
-
###
|
|
200
|
+
### 6. Test Each Affected Page
|
|
150
201
|
|
|
151
202
|
<test_pages>
|
|
152
203
|
|
|
@@ -154,13 +205,13 @@ For each affected route, use agent-browser CLI commands (NOT Chrome MCP):
|
|
|
154
205
|
|
|
155
206
|
**Step 1: Navigate and capture snapshot**
|
|
156
207
|
```bash
|
|
157
|
-
agent-browser open "http://localhost
|
|
208
|
+
agent-browser open "http://localhost:${PORT}/[route]"
|
|
158
209
|
agent-browser snapshot -i
|
|
159
210
|
```
|
|
160
211
|
|
|
161
212
|
**Step 2: For headed mode (visual debugging)**
|
|
162
213
|
```bash
|
|
163
|
-
agent-browser --headed open "http://localhost
|
|
214
|
+
agent-browser --headed open "http://localhost:${PORT}/[route]"
|
|
164
215
|
agent-browser --headed snapshot -i
|
|
165
216
|
```
|
|
166
217
|
|
|
@@ -185,7 +236,7 @@ agent-browser screenshot --full page-name-full.png # Full page
|
|
|
185
236
|
|
|
186
237
|
</test_pages>
|
|
187
238
|
|
|
188
|
-
###
|
|
239
|
+
### 7. Human Verification (When Required)
|
|
189
240
|
|
|
190
241
|
<human_verification>
|
|
191
242
|
|
|
@@ -214,7 +265,7 @@ Did it work correctly?
|
|
|
214
265
|
|
|
215
266
|
</human_verification>
|
|
216
267
|
|
|
217
|
-
###
|
|
268
|
+
### 8. Handle Failures
|
|
218
269
|
|
|
219
270
|
<failure_handling>
|
|
220
271
|
|
|
@@ -253,7 +304,7 @@ When a test fails:
|
|
|
253
304
|
|
|
254
305
|
</failure_handling>
|
|
255
306
|
|
|
256
|
-
###
|
|
307
|
+
### 9. Test Summary
|
|
257
308
|
|
|
258
309
|
<test_summary>
|
|
259
310
|
|
|
@@ -263,7 +314,7 @@ After all tests complete, present summary:
|
|
|
263
314
|
## Browser Test Results
|
|
264
315
|
|
|
265
316
|
**Test Scope:** PR #[number] / [branch name]
|
|
266
|
-
**Server:** http://localhost
|
|
317
|
+
**Server:** http://localhost:${PORT}
|
|
267
318
|
|
|
268
319
|
### Pages Tested: [count]
|
|
269
320
|
|
|
@@ -295,7 +346,7 @@ After all tests complete, present summary:
|
|
|
295
346
|
## Quick Usage Examples
|
|
296
347
|
|
|
297
348
|
```bash
|
|
298
|
-
# Test current branch changes
|
|
349
|
+
# Test current branch changes (auto-detects port)
|
|
299
350
|
/test-browser
|
|
300
351
|
|
|
301
352
|
# Test specific PR
|
|
@@ -303,6 +354,9 @@ After all tests complete, present summary:
|
|
|
303
354
|
|
|
304
355
|
# Test specific branch
|
|
305
356
|
/test-browser feature/new-dashboard
|
|
357
|
+
|
|
358
|
+
# Test on a specific port
|
|
359
|
+
/test-browser --port 5000
|
|
306
360
|
```
|
|
307
361
|
|
|
308
362
|
## agent-browser CLI Reference
|