From af150fdfe1d8abd113bd870ddcf5d8b67f71206a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 18:15:14 +0000 Subject: [PATCH] =?UTF-8?q?fix(ai):=20frontend=20console=20error=20?= =?UTF-8?q?=E2=80=94=20ensure=20CSS=20build=20on=20install=20(agent)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- package.json | 1 + scripts/agent/debug_frontend.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a548f38d..bf0550bf 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "scripts": { "start": "npm run build && npx serve dist", + "prepare": "npm run build:css", "serve": "npx serve", "build": "node scripts/build-dist.mjs && npm run verify:dist:deploy-artifact", "build:css": "postcss css/tailwind.source.css -o css/tailwind.generated.css", diff --git a/scripts/agent/debug_frontend.py b/scripts/agent/debug_frontend.py index 0441d740..8b06bc50 100644 --- a/scripts/agent/debug_frontend.py +++ b/scripts/agent/debug_frontend.py @@ -6,16 +6,22 @@ def run(): browser = p.chromium.launch() page = browser.new_page() - page.on("console", lambda msg: print(f"console:{msg.type}: {msg.text}")) - page.on("pageerror", lambda exc: print(f"pageerror: {exc}")) - page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} - {req.failure}")) + # Print all console messages + page.on("console", lambda msg: print(f"CONSOLE [{msg.type}]: {msg.text}")) + + # Print all uncaught exceptions + page.on("pageerror", lambda exc: print(f"PAGE ERROR: {exc}")) + + # Print failed network requests + page.on("requestfailed", lambda req: print(f"REQUEST FAILED: {req.url} {req.failure}")) try: + print("Navigating to http://localhost:8000...") page.goto("http://localhost:8000") - # Wait a bit for JS to execute and errors to appear + # Wait a few seconds to capture initialization errors page.wait_for_timeout(5000) except Exception as e: - print(f"Error navigating: {e}") + print(f"SCRIPT ERROR: {e}") finally: browser.close()