From 1a4ca6d04bd7050fdd88ee29d50e92beebe28480 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 26 Mar 2026 13:47:20 +0100 Subject: [PATCH] :books: Update frontend/AGENTS.md file --- frontend/AGENTS.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/frontend/AGENTS.md b/frontend/AGENTS.md index b4ad811522..0e33a32f30 100644 --- a/frontend/AGENTS.md +++ b/frontend/AGENTS.md @@ -5,10 +5,6 @@ architectural pieces. ## General Guidelines -To ensure consistency across the Penpot stack, all contributions must adhere to -these criteria: - - ### 1. Testing & Validation #### Unit Tests @@ -71,6 +67,29 @@ Ensure everything is installed before executing tests with the `./scripts/setup` function in the same namespace if it is only used locally, or look for a helper namespace to make it unit-testable. +### 4. Stack Trace Analysis + +When analyzing production stack traces (minified code), you can generate a +production bundle locally to map the minified code back to the source. + +**To build the production bundle:** + +Run: `pnpm run build:app` + +The compiled files and their corresponding source maps will be generated in +`resources/public/js`. + +**Analysis Tips:** + +- **Source Maps:** Use the `.map` files generated in `resources/public/js` with + tools like `source-map-lookup` or browser dev tools to resolve minified + locations. +- **Bundle Inspection:** If the issue is related to bundle size or unexpected + code inclusion, inspect the generated modules in `resources/public/js`. +- **Shadow-CLJS Reports:** For more detailed analysis of what is included in the + bundle, you can run shadow-cljs build reports (consult `shadow-cljs.edn` for + build IDs like `main` or `worker`). + ## Code Conventions