mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-10 06:42:21 +00:00
fix(dashboard): Allow access to src/constants.mjs and fix lock-ops
`frontend-console-debug-agent` run: - Fixed a 403 Forbidden error in `src/dashboard.mjs` preventing `src/constants.mjs` from loading by adding it to the `allowedPaths` whitelist. - Refactored `src/lock-ops.mjs` to fix a critical syntax error in `LockPublisher` class. - Fixed a typo in `src/cmd-check.mjs` (`queryLocksFn` -> `queryLocks`). - Added `@playwright/test` for frontend debugging. - Added `scripts/agent/debug_frontend.mjs` for reproduction. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
7f87c371fc
commit
2466c80af9
15 files changed
+321
-24
No files matched your search
@@ -0,0 +1,34 @@
|
||||
---
|
||||
agent: frontend-console-debug-agent
|
||||
status: completed
|
||||
date: 2026-02-17
|
||||
---
|
||||
|
||||
# Weekly Frontend Console Debug
|
||||
|
||||
## Summary
|
||||
Detected and resolved a `403 Forbidden` error preventing the dashboard from loading `src/constants.mjs`.
|
||||
|
||||
## Actions
|
||||
1. **Fixed Infrastructure**:
|
||||
- Refactored `src/lock-ops.mjs` to fix a critical syntax error in the `LockPublisher` class.
|
||||
- Verified the fix by successfully running `npm run lock:check:weekly`.
|
||||
|
||||
2. **Frontend Debugging**:
|
||||
- Installed `@playwright/test` to capture console errors.
|
||||
- Created `scripts/agent/debug_frontend.mjs` which launches a headless browser to inspect the dashboard.
|
||||
- Identified a blocking `403 Forbidden` error when the dashboard attempted to load `src/constants.mjs`.
|
||||
|
||||
3. **Remediation**:
|
||||
- Updated `src/dashboard.mjs` to explicitly allow serving `src/constants.mjs` by adding it to the `allowedPaths` whitelist. This allows the frontend to access shared constants while maintaining security restrictions on other source files.
|
||||
- Fixed a typo in `src/cmd-check.mjs` where `queryLocksFn` was referenced instead of `queryLocks`.
|
||||
|
||||
4. **Verification**:
|
||||
- Re-ran `scripts/agent/debug_frontend.mjs` and confirmed the dashboard loads with zero console errors.
|
||||
- Ran `npm run lint` (passed with warnings).
|
||||
- Ran `npm run build` (successful).
|
||||
- Ran `npm run test:unit:lock-backend` (all tests passed).
|
||||
|
||||
## Artifacts
|
||||
- `scripts/agent/debug_frontend.mjs`
|
||||
- `package.json` (added `@playwright/test`)
|
||||
Reference in new issue
Block a user