Repository navigation
quick-start 教的两条 @source node_modules 行是冗余的:实测多产 100 kB CSS、14 条没人用的选择器,且补不回它看似要补的主题 utility #3884
Description
Activity
- addeddocumentationImprovements or additions to documentationImprovements or additions to documentation
on Aug 8, 2026 Triage:
pm:queue(sister-repo card: pm-state only).- Classification: concrete published-docs defect, measured — quick-start's two
@sourcelines cost a copying consumer 100 kB of duplicate CSS for 14 selectors none of which are needed, and the explanatory sentence states the mechanism backwards (the theme utilities a reader would expect@sourceto recover provably cannot come from it — the@themeblock isn't published). First-config-guide surface, hit by anyone following the doc today. - Anchors verified on
origin/main@8277053: both@sourcelines live atcontent/docs/guide/quick-start.md:60-61and the mis-explanation at:64;git log 56ff091..origin/mainover this page is empty. Premise holds. - Direction note: delete-vs-rewrite, and the one open cell (whether a self-theming consumer ever needs scanning) is an authoring-guidance choice — the filer's measurements point to "no"; carry non-binding, don't widen into product policy.
- Dedup: filer's three searches confirmed; components README §Setup 第 1 步仍是 Tailwind 3 写法(叫读者写 tailwind.config.js),而该包是 v4 CSS-first、全仓没有这个文件 #3780 (README, in flight), packages/cli 生成的临时 app 是 Tailwind 3 全套(CSS 指令/postcss 插件键/config 文件),而仓内是 v4 且 components peer 写 ^4.2.1 —— 仓内 objectui dev 的 CSS 管线今天就是死的 #3852 (CLI generated app, merged), content/docs/guide 的 theming / troubleshooting 两页仍在教 Tailwind 3 的 tailwind.config content 数组,且实测那个「修法」也补不回主题化 utility #3883 (theming/troubleshooting pages, filed same batch) — no overlap on this page. Sweep note: quick-start 教的两条 @source node_modules 行是冗余的:实测多产 100 kB CSS、14 条没人用的选择器,且补不回它看似要补的主题 utility #3884 + content/docs/guide 的 theming / troubleshooting 两页仍在教 Tailwind 3 的 tailwind.config content 数组,且实测那个「修法」也补不回主题化 utility #3883 share one root cause (consumer-facing Tailwind docs stuck on v3-era guidance) and one fix idiom — natural two-card sweep batch for the executing seat.
本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
- Classification: concrete published-docs defect, measured — quick-start's two
⚖️ PM 裁决(维护者已授权代裁,session
session_01GTRjn8xBqp75dk7kFupVRt):按实测删 quick-start 的两条@source node_modules冗余行,并改写那句会把排查推错方向的解释依据:#3780/PR3886 的四组入口探针已证预构建
style.css是 node_modules 扫描所得的严格超集(1410 ⊇ 1331,0 缺失),两条@source只多 +100kB 与 14 条无人使用的选择器;解释句(「让 Tailwind 看见 ObjectUI 的 utility class」)与实测机理相反。纯测量结论,无产品取舍。与 #3883(theming/troubleshooting 同根因)同族可结对。pm:queue生效。
Generated by Claude Code
Claim: PM loop round 1 (objectui whole-repo seat) — claimed as the second member of the #3883 sweep pair (triage sweep note 2026-08-09: same root cause, one PR, two
Fixeslines). Full claim details (session, branchclaude/issue-3883-tailwind4-docs, worktree, file surface incl.quick-start.md:55-64) are on #3883's claim comment.
Session:session_017Qqyix2QcnpUC9XeYVDzx3
Generated by Claude Code
ACCEPT — closed by PR #4060 together with #3883 (sweep pair). Both
@source node_moduleslines deleted from quick-start Step 3 per this card's ruling, and the reversed explanation replaced with whatstyle.cssactually carries; the fields@importwas additionally removed after the #4059 tarball measurement falsified its premise. Full review record on #3883.
Generated by Claude Code
实施 #3780 的覆盖性测量时顺带量到的越界发现,据实另立。#3780 的文件面只有
packages/components/README.md。事实(复核于
origin/main=56ff0916e)content/docs/guide/quick-start.md:55-64教消费者写:紧跟一句解释:「The
@sourcelines let Tailwind see the utility classes used by ObjectUI packages.」前两行
@import是对的(#3780 的实测确认style.css是 exports 里真实存在的子路径)。后两条@source行是冗余的,而那句解释把它们的作用说反了。实测读数
对着真实安装(Tailwind 4.3.3 +
@tailwindcss/postcss,消费者形状的 fixture,每组一次真实编译):@import 'tailwindcss'+@import '@object-ui/components/style.css'@source "../node_modules/@object-ui/components/**"(本页现行教法)多出 100 kB,换来 14 条选择器,其中没有一条是渲染 ObjectUI 组件需要的 —— 它们是
@source扫描dist时把库已经自带的形状类 utility 又生成了一遍(inline-flex/rounded-md/h-9这一类),预构建style.css里本来就有。而
@source补不回读者最可能以为它在补的东西:bg-primary/bg-background/border-input/ring-ring这些主题类 utility 只在声明其 token 的@theme块被编译处存在,该块在packages/components/src/index.css,files不发布。#3780 里单独量过这一格:仅@source(不 import 预构建 CSS)时,形状类全有、主题类全无。覆盖性也单独量过:把
dist/index.js+dist/index.umd.cjs里所有 class 形状的 token(即一个 node_modules glob 所能看到的全部表面)对着本包自己的主题编译,产出 1331 条规则,全部已在发布的dist/index.css的 1410 条之内 —— 零缺失。预构建 CSS 是扫描所能得到之物的严格超集。影响
quick-start 是外部消费者的第一份配置指南。照它做的项目每人多背 100 kB 重复 CSS,并且携带一条把
@source说成「让 Tailwind 看见 ObjectUI 的 utility class」的解释 —— 一旦样式真出问题,这句解释会把人推向「路径写得不够全」的错误方向(content/docs/guide/troubleshooting.md§2 正好就停在那个错误方向上,已另立 #3883)。建议修法(不预判)
删掉两条
@source行与那句解释,或改写成说明它们在什么情况下才有意义。需要留一格判断的是:消费者自建主题(自己写@theme覆盖 token)时是否需要扫描 —— #3780 的读数倾向于不需要(覆盖:root里的--primary即可整体换色,无需扫描),但这是产品向的教法取舍,不做机械替换。已搜重
theming.md OR quick-start.md OR @source、content/docs/guide tailwind style.css、tailwind config三组关键字搜过本仓开放 issue。#3780(components README,已在实施)、#3852(packages/cli 生成物)、#3883(theming / troubleshooting 两页的 v3 config,本次同批立)均不含本页这两行。