Skip to content

fix: [ENG-2274] correct Tailwind @source glob for installed shared UI package#513

Merged
wzlng merged 1 commit intomainfrom
fix/webui-package-mode-tailwind-source
Apr 22, 2026
Merged

fix: [ENG-2274] correct Tailwind @source glob for installed shared UI package#513
wzlng merged 1 commit intomainfrom
fix/webui-package-mode-tailwind-source

Conversation

@wzlng
Copy link
Copy Markdown
Collaborator

@wzlng wzlng commented Apr 22, 2026

The @source path pointed to node_modules/@campfirein/byterover-packages/src but the installed package places components under ui/src. In BRV_UI_SOURCE package mode Tailwind v4 scanned nothing from the shared UI library, so classes used only there (Sheet's fixed/z-50/bg-clip-padding, data-[side=*] variants, etc.) were stripped from the built CSS and components rendered unstyled. Submodule mode was unaffected because the submodule @source path was already correct.

… package

The @source path pointed to node_modules/@campfirein/byterover-packages/src
but the installed package places components under ui/src. In BRV_UI_SOURCE
package mode Tailwind v4 scanned nothing from the shared UI library, so
classes used only there (Sheet's fixed/z-50/bg-clip-padding, data-[side=*]
variants, etc.) were stripped from the built CSS and components rendered
unstyled. Submodule mode was unaffected because the submodule @source path
was already correct.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Claude finished @wzlng's task in 1m 27s —— View job


PR Review: fix/webui-package-mode-tailwind-source

Tasks

  • Read changed files and gather context
  • Verify fix correctness against vite.config.ts
  • Review cosmetic/style changes
  • Post full review

Summary

Overall score: 4/5

The core fix is correct and well-targeted. vite.config.ts (line 13) defines:

const installedSharedUiSrc = resolve(repoRoot, 'node_modules/@campfirein/byterover-packages/ui/src')

The old @source pointed at .../byterover-packages/src/** (which doesn't exist in the installed layout), so Tailwind scanned nothing from the shared library in package mode. The corrected path .../byterover-packages/ui/src/** now exactly mirrors the Vite alias target and will pick up all component class names (Sheet variants, data-[side=*], etc.).

What changed:

Change Type Assessment
@source path src/ui/src/ (line 7) Bug fix ✅ Correct
Both @source lines always active Pre-existing design ℹ️ Harmless — Tailwind v4 silently skips missing globs
Keyframe rules expanded to multi-line Cosmetic ✅ Improves readability
Attribute selector "' quotes Style consistency ✅ Valid CSS

One non-blocking suggestion: adding brief comments to each @source line indicating which mode it covers (package vs submodule) would help future maintainers. See inline comment.

The cosmetic/formatting changes are bundled with the bug fix, which is fine given their triviality, but worth noting for commit history clarity.

Comment thread src/webui/styles/index.css
Comment thread src/webui/styles/index.css
Comment thread src/webui/styles/index.css
@wzlng wzlng merged commit a620f21 into main Apr 22, 2026
6 checks passed
@wzlng wzlng deleted the fix/webui-package-mode-tailwind-source branch April 22, 2026 03:56
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.

2 participants