fix(dashboard): explicit @source for Tailwind v4 (fixes #179)#186
Merged
Conversation
Tailwind v4's default source detection walks the nearest .git and collects tracked files via git ls-files. When the dashboard sources sit inside a gitignored subtree of an ancestor repo (e.g. the default marketplace install path ~/.claude/plugins/cache/, which is ignored by ~/.claude/.gitignore), detection returns 0 files and the Oxide engine skips all utility generation — the dashboard renders unstyled. Adding explicit @source directives is the supported Tailwind v4 escape hatch and is a no-op for installs where automatic detection works. Verified: built CSS bundle jumps from ~9 KB to ~55 KB and utility classes (.flex, .grid, .absolute, .w-full, .h-full) are present. Fixes Lum1104#179
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #179 — dashboard renders unstyled when the plugin is installed in a gitignored directory (which is the default marketplace install path:
~/.claude/plugins/cache/..., ignored by~/.claude/.gitignore).Root cause
Tailwind v4 source detection walks the nearest
.gitviagit ls-files. When the dashboard sources are inside a gitignored subtree of an ancestor repo, detection returns 0 files and the Oxide engine skips all utility generation — so the dashboard ships with@theme/@layer baseonly, and every element collapses to default block flow.Fix
Add explicit
@sourcedirectives inpackages/dashboard/src/index.css. Per the Tailwind v4 docs, this is the supported escape hatch and is a no-op when automatic detection already works.Verification
~9 KB → 55.68 KB.flex,.grid,.absolute,.w-full,.h-fullpnpm --filter @understand-anything/dashboard buildsucceedsTest plan
pnpm installpnpm --filter @understand-anything/dashboard buildsucceeds/understandthen/understand-dashboard, and confirm the dashboard renders styled