Skip to content

Feat/cn helper - #418

Open
shakurt wants to merge 6 commits into
mainfrom
feat/cn-helper
Open

Feat/cn helper#418
shakurt wants to merge 6 commits into
mainfrom
feat/cn-helper

Conversation

@shakurt

@shakurt shakurt commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator
  • src/common/utils/cn.ts: cn() wraps clsx + a configured tailwind-merge instance. The config is required, not cosmetic — without it, tailwind-merge doesn't know about this app's custom classes (bg-glass, rounded-widget, elevation*, z-*, etc.) and gets them wrong: bg-glass would silently delete bg-content wherever both are used together, and several custom utilities would lose override fights based on CSS emission order rather than call-site intent. Comments in the file lay out each failure mode.
  • Ignore the local .claude/ directory (Claude Code session config) in .gitignore.

Local Claude Code session config shouldn't be tracked.
cn.ts imports clsx directly, but it was never added to package.json —
it only worked locally because it happened to already be present in
node_modules from an unrelated install. A clean install (e.g. CI)
can't resolve it. Adding it explicitly and regenerating the lockfile.
bun compile (tsc --noEmit) failed on CI with exit code 2 —
reproduced locally: tsconfig.json extends the gitignored,
auto-generated .wxt/tsconfig.json, which only existed via bun
install's postinstall hook. That's implicit and apparently not
reliable in the CI environment. `bun run build` masked this locally
since `wxt build` regenerates .wxt internally, but a bare `tsc` does
not.

Adding an explicit `wxt prepare` step guarantees the file exists
before type-checking runs, regardless of postinstall timing.
Every new component under components/ui/ imports cva from
class-variance-authority, but it was never added to package.json —
same class of bug as the earlier clsx fix. It only resolved locally
from a stray leftover in node_modules that nothing in the actual
dependency tree references; a clean install (CI, or anyone cloning
fresh) doesn't have it at all, which is what produced the CI type
errors (Property 'size'/'selected' does not exist on ...Props) once
the wxt-prepare fix got tsc past the earlier config-loading failure.

Verified by wiping node_modules and .wxt entirely and reinstalling
from scratch: bun run compile and bun run build both pass clean.
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