@kendoo.agentdesk/agentdesk 0.4.6 → 0.4.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/package.json +1 -1
- package/prompts/team.md +64 -32
package/package.json
CHANGED
package/prompts/team.md
CHANGED
|
@@ -121,38 +121,70 @@ When a task involves UI changes, the team MUST capture screenshots of the affect
|
|
|
121
121
|
|
|
122
122
|
**How to capture screenshots:**
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
124
|
+
Bart writes and executes a project-specific puppeteer script for each screenshot session. This handles auth, navigation, and viewport sizing in one shot.
|
|
125
|
+
|
|
126
|
+
**Step 1 — Prepare:** Before writing the script, Bart MUST:
|
|
127
|
+
- Read the project's login/auth flow (check auth pages, middleware, `.env` for test credentials)
|
|
128
|
+
- Identify the dev server port (from `package.json` scripts, `.env`, or framework defaults)
|
|
129
|
+
- Get the list of routes and viewports from Luna's screenshot plan
|
|
130
|
+
|
|
131
|
+
**Step 2 — Start the dev server:**
|
|
132
|
+
```bash
|
|
133
|
+
echo "Starting dev server for screenshots..."
|
|
134
|
+
npm run dev &
|
|
135
|
+
DEV_PID=$!
|
|
136
|
+
sleep 8 # Wait for server to start
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Step 3 — Write and run a puppeteer script** that handles the project's auth and captures all required views:
|
|
140
|
+
```bash
|
|
141
|
+
npx --yes puppeteer@latest node -e "
|
|
142
|
+
const puppeteer = require('puppeteer');
|
|
143
|
+
(async () => {
|
|
144
|
+
const browser = await puppeteer.launch({ headless: 'new' });
|
|
145
|
+
const page = await browser.newPage();
|
|
146
|
+
|
|
147
|
+
// --- AUTH: Adapt this to the project's login flow ---
|
|
148
|
+
// Read .env or config for test credentials
|
|
149
|
+
// Navigate to login page, fill form, submit
|
|
150
|
+
// Example:
|
|
151
|
+
// await page.goto('http://localhost:3000/login');
|
|
152
|
+
// await page.type('input[name=email]', process.env.TEST_EMAIL || 'test@example.com');
|
|
153
|
+
// await page.type('input[name=password]', process.env.TEST_PASSWORD || 'password');
|
|
154
|
+
// await page.click('button[type=submit]');
|
|
155
|
+
// await page.waitForNavigation();
|
|
156
|
+
|
|
157
|
+
// --- CAPTURE: Take screenshots per Luna's plan ---
|
|
158
|
+
const routes = ['/affected-route']; // From Luna's plan
|
|
159
|
+
const viewports = [
|
|
160
|
+
{ name: 'desktop', width: 1280, height: 800 },
|
|
161
|
+
{ name: 'mobile', width: 375, height: 812 },
|
|
162
|
+
];
|
|
163
|
+
|
|
164
|
+
for (const route of routes) {
|
|
165
|
+
for (const vp of viewports) {
|
|
166
|
+
await page.setViewport({ width: vp.width, height: vp.height });
|
|
167
|
+
await page.goto('http://localhost:3000' + route, { waitUntil: 'networkidle0' });
|
|
168
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
169
|
+
const filename = 'screenshots/' + route.replace(/\\//g, '-').slice(1) + '-' + vp.name + '.png';
|
|
170
|
+
await page.screenshot({ path: filename, fullPage: true });
|
|
171
|
+
console.log('Captured: ' + filename);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
await browser.close();
|
|
176
|
+
})();
|
|
177
|
+
"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
IMPORTANT: Bart MUST adapt the auth section to the specific project. Do NOT use a generic/placeholder login — read the actual auth code, find real dev/test credentials from `.env`, seed files, or test fixtures, and write the login flow to match the project's actual login page (selectors, fields, OAuth flow, etc.). If the project uses OAuth only and has no test credentials, Bart should note this and skip screenshots with an explanation.
|
|
181
|
+
|
|
182
|
+
**Step 4 — Stop the dev server:**
|
|
183
|
+
```bash
|
|
184
|
+
kill $DEV_PID 2>/dev/null
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Step 5 — Upload** screenshots to the task tracker (see upload instructions below).
|
|
156
188
|
|
|
157
189
|
**When to capture:**
|
|
158
190
|
- After ALL code changes, reviews, and fixes are complete (during Bart's review step)
|