Skip to content

fix(ui): fail the build if Tailwind emits a utility-less stylesheet#74

Merged
ersinkoc merged 1 commit into
mainfrom
fix/ui-css-size-build-guard
Jun 5, 2026
Merged

fix(ui): fail the build if Tailwind emits a utility-less stylesheet#74
ersinkoc merged 1 commit into
mainfrom
fix/ui-css-size-build-guard

Conversation

@ersinkoc

@ersinkoc ersinkoc commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Tailwind v4 scans sources with the native @tailwindcss/oxide addon. When that native binary fails to load (corrupt platform package on Windows), oxide silently falls back to its WASM build, which scans nothing and emits a utility-less ~13 KB stylesheet instead of ~250 KB — with no error, shipping an entirely unstyled UI (including Docker images).

Adds a build-only css-size-guard Vite plugin that throws if total emitted CSS is under 80 KB. Verified: passes on the healthy 247 KB build, fails (exit 1) with a clear message on a small one.

🤖 Generated with Claude Code

Tailwind v4 scans sources with the native @tailwindcss/oxide addon. When that
native binary fails to load (e.g. a corrupt platform package on Windows), oxide
silently falls back to its WASM build, which scans nothing and emits a
utility-less ~13 KB stylesheet instead of ~250 KB — with no error. That ships
an entirely unstyled UI, including in Docker images.

Add a small build-only Vite plugin (css-size-guard) that throws if the total
emitted CSS is under 80 KB, well above the broken case and far below any
legitimate output, so the failure is loud instead of silent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ersinkoc ersinkoc merged commit 4b911a4 into main Jun 5, 2026
2 checks passed
@ersinkoc ersinkoc deleted the fix/ui-css-size-build-guard branch June 5, 2026 09:02
HoneyAdam pushed a commit to HoneyAdam/OwnPilot that referenced this pull request Jun 5, 2026
Document the work merged since v0.6.0 (PRs ownpilot#58-ownpilot#74): the Tailwind oxide
WASM-fallback build guard, skills hard-delete on uninstall, the vite.config
shadowing fix, and the internal maintainability sweep (dead-code removal,
cycle breaking, god-file modularization).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant