Repository navigation
fix: module page styles, WebP in the image, demo-only tenant pruning - #341
Conversation
Three unrelated fixes found while running OpenMES with a compiled-in module on the Docker image. Pages of a compiled-in module had none of their own styles. Pages under modules/<Name>/resources/js/Pages are compiled into the bundle when they are present at build time, but Tailwind takes what to scan from .gitignore, which lists modules/. An ignored directory is only scanned when it is named outright; a glob across it is skipped all the same. The build now writes one @source per module that ships pages (openmesModuleSources() in @openmes/module) into a generated stylesheet that app.css imports. The Docker image built GD without WebP, so re-encoding an uploaded image/webp failed on an undefined imagewebp(). The suite runs on the CI runner's PHP, not in the image, so nothing caught it. GD is now configured with WebP and the build fails if a format the application accepts is missing. tenants:prune ran every minute on every installation. It was written for the public demo; nothing else sets a tenant's expires_at, so it found nothing, but a tenant given an expiry by hand would have been deleted with everything cascading from it within a minute. It is now scheduled only when DEMO_MODE=true and can still be run by hand.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (11)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe changes add generated Tailwind source directives for module pages, add Docker build checks for GD image formats, and schedule ChangesTailwind module scanning
GD image format support
Demo-mode tenant pruning
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant ViteBuild
participant openmesModuleSources
participant GeneratedCSS
participant TailwindBuild
ViteBuild->>openmesModuleSources: Generate module source CSS
openmesModuleSources->>GeneratedCSS: Write @source directives
TailwindBuild->>GeneratedCSS: Read imported source directives
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No specific issue blocks merging; run the normal build and test checks before release. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 6 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
fix: module page styles, WebP in the image, demo-only tenant pruning
Three unrelated fixes found while running OpenMES with a compiled-in
module on the Docker image.
Pages of a compiled-in module had none of their own styles. Pages under
modules//resources/js/Pages are compiled into the bundle when they
are present at build time, but Tailwind takes what to scan from
.gitignore, which lists modules/. An ignored directory is only scanned
when it is named outright; a glob across it is skipped all the same. The
build now writes one @source per module that ships pages
(openmesModuleSources() in @openmes/module) into a generated stylesheet
that app.css imports.
The Docker image built GD without WebP, so re-encoding an uploaded
image/webp failed on an undefined imagewebp(). The suite runs on the CI
runner's PHP, not in the image, so nothing caught it. GD is now
configured with WebP and the build fails if a format the application
accepts is missing.
tenants:prune ran every minute on every installation. It was written
for the public demo; nothing else sets a tenant's expires_at, so it
found nothing, but a tenant given an expiry by hand would have been
deleted with everything cascading from it within a minute. It is now
scheduled only when DEMO_MODE=true and can still be run by hand.
Type of change
Related issue
Closes #
Testing
php artisan testpassesChecklist
.envsecrets committed$fillableupdated if new model columns addedcomposer auditcleanSummary by CodeRabbit