From 3c5ccffd10b5ad89f30cb23ac13f962a98afb898 Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Wed, 5 Aug 2026 15:19:23 +0200 Subject: [PATCH 1/2] Serve minified static assets and stop blocking HTML parsing - Add minified counterparts (redturtle_chefcookie.min.js, redturtle_chefcookie_tech.min.js, styles.min.css) for the assets that were previously served unminified, and point the viewlet at them. - Add `defer` to the injected + diff --git a/src/redturtle/chefcookie/browser/viewlets.py b/src/redturtle/chefcookie/browser/viewlets.py index 3820407..504c83f 100644 --- a/src/redturtle/chefcookie/browser/viewlets.py +++ b/src/redturtle/chefcookie/browser/viewlets.py @@ -16,7 +16,7 @@ CHEFCOOKIE_URL = "{portal_url}/++resource++redturtle.chefcookie/chefcookie/chefcookie.min.js?v={version}" RT_CHEFCOOKIE_URL = ( - "{portal_url}/++resource++redturtle.chefcookie/{type}.js?v={version}" + "{portal_url}/++resource++redturtle.chefcookie/{type}.min.js?v={version}" ) CONFIG_URL = "{portal_url}/{name}?v={version}" @@ -71,7 +71,7 @@ def get_js_urls(self): ) def get_css_link(self): - return "{portal_url}/++resource++redturtle.chefcookie/styles.css?v={version}".format( + return "{portal_url}/++resource++redturtle.chefcookie/styles.min.css?v={version}".format( portal_url=api.portal.get().portal_url(), version=self.get_version(), ) From a0d05f447b1af613a9d676c81edc239d2b6be3e2 Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Wed, 5 Aug 2026 15:20:52 +0200 Subject: [PATCH 2/2] Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/minified-assets.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/minified-assets.yml b/.github/workflows/minified-assets.yml index 4d3e869..99366fd 100644 --- a/.github/workflows/minified-assets.yml +++ b/.github/workflows/minified-assets.yml @@ -1,5 +1,7 @@ name: Minified assets on: [push] +permissions: + contents: read jobs: build: runs-on: ubuntu-latest