Skip to content

packages/fields/scripts/build-css.mjs duplicates the shared plugin stylesheet builder added for #4929 #6405

Description

@claude

What was observed

PR #6403 (for #4929) added scripts/build-plugin-stylesheet.mjs — the components-sheet subtraction, its normalisation of Tailwind's inlined var() fallbacks, its at-rule context keys and its four write-time assertions — as shared code, so @object-ui/plugin-grid and @object-ui/plugin-kanban each need only a wrapper naming their sentinels and ceiling.

packages/fields/scripts/build-css.mjs still carries its own copy of that logic. It came first and is where the reasoning was worked out (objectui#4059); the shared module is that file generalised over packageRoot. There are now two implementations of one subtraction, and a fix to either can silently not reach the other.

Why it was not done in PR #6403

@object-ui/fields is a published package and its stylesheet is a published artifact. Rewriting its build belongs in a change that verifies the output byte for byte against the current one, which is a different piece of work from adding two new sheets — and the 2026-08-17 ruling scoped that card to plugin-grid + plugin-kanban.

What a fix looks like

  1. Point packages/fields/scripts/build-css.mjs at createPluginStylesheetBuilder from scripts/build-plugin-stylesheet.mjs, keeping its own MUST_SURVIVE, its CLASS_CEILING of 600 and its header rationale.
  2. Prove the emitted packages/fields/dist/index.css is byte-identical before and after (the current build prints 22.22 kB, 167 rules kept (163 classes) on this tree, which is the reading to reproduce).
  3. Keep whatever fields does that the shared module does not model — if anything survives that check, it belongs in the shared module or in a documented per-package hook, not in a second copy.

Filed unassigned, as an observation from the #4929 implementation.


Generated by Claude Code


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopm:dispatched

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions