🧹 [code health improvement] Refactor architecture and migrate to HAR 1.2 export#22
🧹 [code health improvement] Refactor architecture and migrate to HAR 1.2 export#22Illhm wants to merge 2 commits into
Conversation
This commit addresses the issue of an unstructured root directory and replaces the non-standard ZIP export with a standardized HAR 1.2 format export. Changes: - Refactored folder structure: Created `ui/` for views/stylesheets, `scripts/` for JavaScript modules (`background`, `dashboard`, `helper`, `lib`), and moved tests to `tests/`. - Updated `manifest.json` correctly to reference the newly structured script and UI paths, including updating `web_accessible_resources`. - Built the HAR 1.2 builder logic (`scripts/lib/har_builder.js`) capturing request/response metadata, sizes, query parameters, base64 binary bodies, and timings. - Removed legacy ZIP builder, CRC hash computation, and CSV helper functions. - Adapted `dashboard.js` and `dashboard.html` to integrate the HAR export via the user interface. - Checked regression safety for prior XHR categorization logic and path traversal/CSV injection vulnerabilities. - Added README.md instructions for extension load and DevTools HAR import.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This commit resolves the issue of an unstructured root directory and replaces the non-standard ZIP export with a standardized HAR 1.2 format export. Changes: - Created new `ui/`, `scripts/`, and `tests/` directories to organize assets logically. - Removed legacy ZIP export code, CRC hash calculations, and custom `.csv` generation logic. - Built a standard ES module `har_builder.js` strictly adhering to the HAR 1.2 spec to encode and export requests correctly. - Updated `manifest.json` and all cross-file HTML imports to correctly map the new structure. - Removed stale testing artifacts like `server.log` and `reqres_readable.zip`.
🎯 What
Refactored the project's root folder structure to logically separate components and replaced the custom ZIP export feature with a standardized HTTP Archive (HAR 1.2) export.
💡 Why
✅ Verification
node -csyntax checks across all newly positioned JS files.verify_fix.js,bench_headers.js) were kept structurally intact and not disturbed by the file movements.✨ Result
A clean directory layout mimicking modern Extension architectures (
ui/,scripts/,tests/) coupled with a fully DevTools-compatible.harnetwork export format.PR created automatically by Jules for task 9652386175344335291 started by @Illhm