feat(agent): frontend-console-debug-agent run (no errors)

- Installed @playwright/test
- Added scripts/agent/debug-frontend.mjs
- Verified dashboard has no console errors
- Logged completion in task-logs/weekly/

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-14 06:18:32 +00:00
1 parent 9891e9e632
commit 9bea7a6233
5 files changed
+158 -3

No files matched your search

+66
View File
@@ -10,6 +10,9 @@
"dependencies": {
"nostr-tools": "2.19.4",
"ws": "8.19.0"
},
"devDependencies": {
"@playwright/test": "^1.58.2"
}
},
"node_modules/@noble/ciphers": {
@@ -57,6 +60,22 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@playwright/test": {
"version": "1.58.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.2.tgz",
"integrity": "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.58.2"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@scure/base": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
@@ -108,6 +127,21 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/nostr-tools": {
"version": "2.19.4",
"resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.19.4.tgz",
@@ -137,6 +171,38 @@
"integrity": "sha512-78BTryCLcLYv96ONU8Ws3Q1JzjlAt+43pWQhIl86xZmWeegYCNLPml7yQ+gG3vR6V5h4XGj+TxO+SS5dsThQIA==",
"license": "MIT"
},
"node_modules/playwright": {
"version": "1.58.2",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz",
"integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.58.2"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=18"
},
"optionalDependencies": {
"fsevents": "2.3.2"
}
},
"node_modules/playwright-core": {
"version": "1.58.2",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz",
"integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=18"
}
},
"node_modules/ws": {
"version": "8.19.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
+3
View File
@@ -16,5 +16,8 @@
"dependencies": {
"nostr-tools": "2.19.4",
"ws": "8.19.0"
},
"devDependencies": {
"@playwright/test": "^1.58.2"
}
}
+71
View File
@@ -0,0 +1,71 @@
import { chromium } from '@playwright/test';
import fs from 'fs';
import path from 'path';
const LOG_FILE = 'artifacts/debug_frontend.log';
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
const errors = [];
const logStream = fs.createWriteStream(LOG_FILE, { flags: 'w' });
const log = (msg) => {
console.log(msg);
logStream.write(msg + '\n');
};
log(`[${new Date().toISOString()}] Starting debug session...`);
page.on('console', msg => {
const text = msg.text();
const type = msg.type();
const output = `[console:${type}] ${text}`;
if (type === 'error') {
log(output);
errors.push(output);
} else {
// Log non-errors only to file to reduce noise, or log everything?
// For debugging, everything is useful.
log(output);
}
});
page.on('pageerror', err => {
const output = `[pageerror] ${err.message}\n${err.stack}`;
log(output);
errors.push(output);
});
page.on('requestfailed', request => {
const failure = request.failure();
const errorText = failure ? failure.errorText : 'Unknown error';
const output = `[requestfailed] ${request.url()} - ${errorText}`;
log(output);
errors.push(output);
});
try {
log(`Navigating to http://localhost:4173/dashboard/...`);
await page.goto('http://localhost:4173/dashboard/', { waitUntil: 'networkidle', timeout: 10000 });
log(`Navigation complete.`);
// Give it a bit more time for any delayed errors
await page.waitForTimeout(2000);
} catch (e) {
log(`[script:error] Navigation failed or timeout: ${e.message}`);
errors.push(`Navigation failed: ${e.message}`);
}
await browser.close();
// Don't close stream immediately as logs might still be flushing? No, synchronous write.
await new Promise(resolve => logStream.end(resolve));
if (errors.length > 0) {
console.error(`\nFound ${errors.length} errors.`);
process.exit(1);
} else {
console.log(`\nNo errors found.`);
process.exit(0);
}
})();
-3
View File
@@ -1,3 +0,0 @@
127.0.0.1 - - [14/Feb/2026 05:24:39] "GET /dashboard/index.html HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2026 05:24:39] "GET /dashboard/styles.css HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2026 05:24:40] "GET /torch-config.json HTTP/1.1" 200 -
@@ -0,0 +1,18 @@
# Frontend Console Debug Agent - Weekly Run
**Timestamp:** 2026-02-14T06:16:09Z
**Status:** Completed
**Result:** No errors found.
## Summary
- Installed `@playwright/test` and browser binaries.
- Created `scripts/agent/debug-frontend.mjs` to capture console logs.
- Ran capture against `http://localhost:4173/dashboard/`.
- Found 0 console errors and 0 failed requests.
- Validated graceful handling of optional config loading.
## Artifacts
- `scripts/agent/debug-frontend.mjs` (Script created)
- `artifacts/debug_frontend.log` (Log file, not committed)