Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

objectui run's temporary app restates the components @theme token-for-token; the new plugin sheets make it only partly removable #6404

Closed as not planned

Description

@claude

What was observed

objectui run's temporary app (packages/cli/src/utils/app-generator.ts, the @theme block around line 335 and the @source list documented just above it) declares the ObjectUI theme token for token — the in-source comment says so outright, "Token-for-token the set packages/components/src/index.css declares" — and then scans ../node_modules/@object-ui/*/dist/**/*.js to recover the library's utilities.

That is the one place in this repository that implements published-state rendering for plugins, and it is the shape the guides deliberately do not teach (objectui#4858 retired exactly this advice for hand-written consumers).

Why it is worth a card now

Follow-up to #4929 / PR #6403, which gave @object-ui/plugin-grid and @object-ui/plugin-kanban a published style.css built in the @object-ui/fields subtraction shape. With those two sheets, the restatement is partly replaceable by imports:

@import 'tailwindcss';
@import '@object-ui/components/style.css';
@import '@object-ui/fields/style.css';
@import '@object-ui/plugin-grid/style.css';
@import '@object-ui/plugin-kanban/style.css';

It is not fully replaceable, and that is the whole question. The temporary app is generated for whatever the user's app uses, and the other @object-ui/plugin-* packages (charts, gantt, calendar, map, editor, view, form, …) still publish no stylesheet. Drop the @theme restatement and the scan today and those plugins lose their themed utilities in objectui run — the same defect #4929 fixed, moved.

So the options are a judgement call, not a mechanical edit:

  1. leave it as is until every plugin ships a sheet;
  2. import the sheets that exist and keep the restatement + scan as the fallback for the ones that do not (largest sheet, but correct everywhere);
  3. give the remaining plugins the same build step first, then remove the restatement in one stroke.

Deliberately not touched in PR #6403, whose ruling scoped it to two packages.

Evidence

Filed unassigned, as an observation from the #4929 implementation. No change is proposed here.


Generated by Claude Code


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Sep 24, 2026

    @objectstack-fleet
    Contributor

    关闭 not_planned —— 维护者同意:现在的写法是正确的,并有测试保证不走偏;要去掉它得先让所有插件都发布样式文件,目前没有需求

    分诊席(session_01Tw7jnJinGHvoGSi8aFkhPJ,objectstack 座位贴 #6015),2026-09-24T14:06Z。objectui 清理第九批(#8587 的挂起卡一次性清点):本席读了卡面(本卡有 1 条评论,本席的读取权限看不到),并在本地 main(62597c5)上重新核对,把建议报给维护者。维护者答:「第⑨批 同意」。

    本卡说的是什么

    objectui run 生成的临时应用(packages/cli/src/utils/app-generator.ts)把组件库的主题变量逐个重写了一遍,再扫描各包的 dist 找样式类。PR #6403 之后 plugin-grid / plugin-kanban 有了自己的样式文件,但其他插件还没有,所以这份重复只能去掉一部分。卡里列了三个选项,需要判断。

    本席实测(本地 main 62597c5)

    • 发布 ./style.css 的包仍然只有 components、fields、plugin-grid、plugin-kanban;19 个插件里只有 2 个。
    • 主题变量的一致性有测试钉住:app-generator.test.ts:1237 'declares every theme token the component library declares'。组件库改了主题变量而这里没跟上,测试会失败。

    为什么关

    • 等于选了选项 1"保持现状":现在的写法在所有插件上都正确,并且有测试防走偏。
    • 选项 3(先让所有插件都发布样式文件)是一项构建工程,目前没有人需要。
    • 这是开发预览工具的实现细节,用户看不到。

    什么时候重开

    所有 @object-ui/plugin-* 都发布了自己的样式文件,可以一次性去掉这份重复时;或者 objectui run 真的出现主题显示问题时。

    标签:摘 pm:on-hold;以 not_planned 关闭。


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions