Commit 1628bfc
perf(frontend): migrate cn to cnfast (#2527)
* perf(frontend): migrate cn to cnfast
Swap the vendored `cn` (redpanda-ui/lib/utils.tsx) from `twMerge(clsx(...))`
to cnfast — an optimized adaptation of clsx + tailwind-merge with
byte-identical output and the same `(...inputs: ClassValue[])` signature.
No call site changes.
- json-view: switch its direct `import clsx from 'clsx'` to cnfast's `clsx`
export so clsx can be dropped as a direct dependency
- deps: drop clsx + tailwind-merge, add cnfast (class-variance-authority unchanged)
- bunfig: temporarily exclude cnfast from the 72h release-age gate
(0.0.8 published 2026-06-22; remove the exclude once it ages past the gate)
- vendored redpanda-ui/lib/utils.tsx marked [upstream]; mirrors ui-registry #220
and reconciles on the next registry sync
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* build(frontend): pin cnfast to exact 0.0.8
Address PR review: drop the caret so the intent is explicit. `^0.0.8`
already resolves to only 0.0.8 under semver (caret locks the patch on
0.0.x), so this is a no-op in resolution — just clearer for a pre-1.0
dependency.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 22b4352 commit 1628bfc
6 files changed
Lines changed: 202 additions & 88 deletions
File tree
- frontend
- src/components
- redpanda-ui/lib
- ui/json
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | | - | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments