Skip to content

fix: commit current minified assets for source installs and verify them in CI - #2026

Merged
superdav42 merged 1 commit into
mainfrom
fix/commit-missing-min-assets
Oct 26, 2026
Merged

superdav42 merged 1 commit into
mainfrom
fix/commit-missing-min-assets

Conversation

@superdav42

@superdav42 superdav42 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Source (Composer dev-main) installs serve the committed *.min.js/*.min.css files directly. On main, 12 minified scripts did not match their sources, so such installs loaded outdated or missing JavaScript (hosting deploy for superdav42/tgc.church#1255 stopped on this before activation):

Changes:

  • Regenerate them with the repository's own pnpm run uglify (uglify-js 3.19.3, -c -m). pnpm run cleancss produced no changes: all CSS is current. No source files change.
  • PR build: after the existing pnpm run build, fail if committed minified assets differ from the regenerated ones or are missing (vendored assets/js/lib/ excluded).
  • AGENTS.md: replace "do not commit min files on feature branches" with "commit regenerated min files with the source", matching the new check.

Verification

  • All 12 regenerated files are byte-identical to the files the production host currently serves (it minified the same locked sources at deploy time), so this changes no runtime behavior for that host. Sources are identical between the locked commit f829fdeb and main for all 12.
  • node --check passes for all regenerated scripts.
  • Freshness gate exercised locally: passes on a clean regenerate; fails on a real JS source change, a real CSS source change, and a deleted minified file; tree restored afterwards.
  • Release zips are unaffected: the release build still regenerates every minified file.

aidevops.sh v3.39.49 plugin for OpenCode

Summary by CodeRabbit

  • Chores
    • The build now checks that committed minified JavaScript and CSS match the source, helping ensure packaged assets are up to date.
    • Contributor guidance now explains how to regenerate and commit these assets. The check reports stale or missing files and excludes vendored JavaScript libraries.

@superdav42 superdav42 added the origin:interactive Created by interactive user session label Oct 26, 2026
@superdav42
superdav42 marked this pull request as ready for review October 26, 2026 19:21
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1649eda-f0ba-4f8e-bcf6-b8fd372631a9
Commits

Reviewing files that changed from the base of the PR and between 89f3d89 and d0702e4.

Files ignored due to path filters: 12
  • assets/js/activity-stream.min.js is excluded by !**/*.min.js
  • assets/js/checkout-provisioning.min.js is excluded by !**/*.min.js
  • assets/js/checkout.min.js is excluded by !**/*.min.js
  • assets/js/command-palette.min.js is excluded by !**/*.min.js
  • assets/js/coupon-code.min.js is excluded by !**/*.min.js
  • assets/js/money-mask.min.js is excluded by !**/*.min.js
  • assets/js/provisioning-progress.min.js is excluded by !**/*.min.js
  • assets/js/settings-loader.min.js is excluded by !**/*.min.js
  • assets/js/sso.min.js is excluded by !**/*.min.js
  • assets/js/thank-you.min.js is excluded by !**/*.min.js
  • assets/js/view-logs.min.js is excluded by !**/*.min.js
  • assets/js/wubox.min.js is excluded by !**/*.min.js
Files selected for processing: 2
  • .github/workflows/pr-build-test.yml
  • AGENTS.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

The PR updates guidance for committing minified JavaScript and CSS files. The PR build workflow checks generated minified assets after the build and fails when matching assets are changed or untracked.

Changes: Minified asset freshness

Layer / File(s) Summary
Document and enforce minified asset freshness
AGENTS.md, .github/workflows/pr-build-test.yml
The guidance specifies how to regenerate and commit minified JavaScript and CSS files. After the build, the workflow checks matching minified assets, excludes assets/js/lib/**, and reports changed or untracked files.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to d0702

The asset freshness documentation and CI check introduce no identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main changes: committing current minified assets for source installs and verifying them in CI.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42
superdav42 merged commit 956b1ac into main Oct 26, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:interactive Created by interactive user session

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant