Repository navigation
Commit 80f267d
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao7EJRrpBukNTDcMt2XiXQX1)_
Part of #25712 (item 3 = 2g, PR 2 of 3: rewrite the importers onto
`@objectstack/sdui-parser` and delete `ui/packages/sdui-parser`; Tier H:
over 3000 lines, and `skills/**`).
Part of #25677.
Clause-②: yes (narrowing: a `type-mismatch` or `member-type-mismatch`
the html-tier compile used to grade `warning` is now an `error`, so a
page that carried one now refuses to compile instead of rendering with
the value dropped)
Metadata-protocol: none
## 维护者速读(草稿)
- **改了什么:**
- 按 2g 裁定(6418729849,E+B),ui 里所有对 `@object-ui/sdui-parser` 的引用改为
`@objectstack/sdui-parser`,包括 import、`package.json` 依赖、vite/vitest 别名和
tsconfig 路径。
- 删除 `ui/packages/sdui-parser`(不发转发版本),并把它移出 changesets 的 fixed 组。
- `gen-manifest.ts` 移到 `ui/apps/console/scripts/`。PR 1 留下的 5
个测试搬到各自归属的包。
- ui 里按包数计数的几个门禁同步减一。manifest 记录不再包含这个包。
- **哪些原来能渲染的现在会报错:** 渲染器原来那份解析器只在 enum 旁把类型不符判为 error,其他情况只给
warning。现在统一按保存门的规则判为 error。所以 html 层页面里属性类型写错(例如
`columns='["name","amount"]'`,而 `columns`
声明为数组)会显示编译错误块,不再静默丢掉这个值。保存门本来就拒绝这种页面,所以经保存门保存的页面不受影响。
- **为什么改:** 两份解析器只剩一份,渲染器和保存门跑同一套代码。PR 3(#26221)和 PR 1(#26211)已经合入。
- **风险与代价(含回滚):** 约 8400 行变更,其中约 7000 行是删除(被删的包和锁文件)。回滚 = revert 本
PR。合入后 npm 上的 `@object-ui/sdui-parser` 停在 18.1,18.2 之后由维护者执行 npm
deprecate。
- **需要你确认的一件事:** 两个待发布的
changeset(`25831-object-ui-18-1-to-merge.md`、`26276-ui-package-test-vitest.md`)原本列着
`@object-ui/sdui-parser`。包删掉后,`changeset version` 遇到不存在的包会失败,所以本 PR
删掉了这两行。`check-empty-changeset` 把这种改动当作需要人确认的「主动更正」,会一直是红的,直到你确认。
- **你要做的:** 确认上面两行删除,然后批准(Tier H)。
## 席位核对
(left for the dispatch seat)
## Why
Ruling 6418729849 on #25712 keeps `@objectstack/sdui-parser` as the one
parser, deletes `ui/packages/sdui-parser` with no forwarding release,
and takes `@object-ui/sdui-parser` out of the fixed group. The
maintainer deprecates the npm package after 18.2. PR 3 (#26221, lockstep
gate retired) and PR 1 (#26211, one body in `@objectstack/sdui-parser`)
are on main. This PR moves the renderer onto that body and deletes the
second copy.
## What changes
**Importers (no behaviour of their own).**
- Every `@object-ui/sdui-parser` import, `package.json` dependency key,
vite alias (console, console-starter, plugin-editor, plugin-markdown,
runner), the `ui/vitest.config.mts` alias and the `ui/tsconfig.json`
paths now name `@objectstack/sdui-parser`, which resolves to the root
`packages/sdui-parser`.
- No importer uses the deprecated `SchemaNode` / `ValidationResult`
aliases.
- Kept on purpose:
- the `Symbol.for('@object-ui/sdui-parser.html-tier-node')` registry
key, which is the cross-instance contract;
- the MIT "moved in from `@object-ui/sdui-parser`" notices;
- CHANGELOGs and dated QA notes.
**Deleted:** `ui/packages/sdui-parser` (32 files).
**Moved:**
| From | To |
|---|---|
| `ui/packages/sdui-parser/scripts/gen-manifest.ts` |
`ui/apps/console/scripts/gen-manifest.ts` (its only caller is
`emit-sdui-manifest.ts`) |
| `…/__tests__/render.test.tsx`, `inline-whitespace.test.tsx`,
`injected-component-input-6950.test.ts` |
`ui/packages/react/src/__tests__/sdui-*` (they import
`../SchemaRenderer`, not `@object-ui/react`, per
`check-package-self-import`) |
| `…/__tests__/spec-symbol-batch7.test.ts` |
`packages/lint/src/sdui-spec-symbol-batch7.test.ts` |
| `…/__tests__/dashboard-widget-options-census.test.ts` |
`ui/packages/plugin-dashboard/src/__tests__/` (leg 4 no longer counts
the ui copy) |
`@object-ui/react` gains `@objectstack/sdui-parser` as a devDependency
for the re-homed tests.
**Guards that counted the package:**
- package floors drop by one:
- `package-files-exist`: owing floor 38→37;
- `side-effects-declaration-consistency`: 29→28 and `false` 12→11;
- `check-dist-completeness`: tsc floor 12→11;
- `QUICK_REFERENCE.md`: 37→36 published packages;
- `check:lockstep-package-count`: 111→110 in
`backward-compatibility.mdx` and `publish-smoke-pack.mjs`.
- `turbo.objectui.json` drops the 10 build inputs that pointed at the
deleted package.
- `select-type-check-scope`'s fixture now uses a live file.
- `check-type-check-coverage` drops the deleted scripts directory.
- The cli `workspace-vite` alias list drops the package.
- `ui/.github/labeler.yml` drops its rule.
- `.changeset/config.json` removes it from the fixed group.
**Relative reads re-rooted** to the root parser:
- `designerRegistrationInputs-11434`;
- `body-dialect-children-arm-7181`;
- `component-input-retired-keys-7493`;
- `unconsumed-widget-option-claim-6186`;
- the `ui/README.md` link, which is now a GitHub URL because
`check-doc-links` treats `ui/` as its root.
**Severity pin.** `htmlTierColumnSpellings-6598` form 2 (a JSON string
where `columns` is declared `array`) moves from "the block's defaults
render" to "fails loudly". The page now shows the compile error naming
`columns`. The test's invariant, "never the reported state", holds
either way.
**Manifest record.** `node scripts/gen-sdui-manifest-node.mjs` drops
`scripts/sdui-manifest.sources/sdui-parser.json` ("no longer reached")
and re-records components, core, plugin-dashboard and types.
`sdui.manifest.json` is byte-unchanged (106 components, sha256
`1f6e1ccb925a…`).
**Pending changesets.** `25831-object-ui-18-1-to-merge.md` and
`26276-ui-package-test-vitest.md` each lose their
`'@object-ui/sdui-parser'` line, and nothing else changes. Without the
edit, `changeset version` fails on a package that is not in the
workspace. This is the DELIBERATE CORRECTION class of
`check-empty-changeset`, so that gate is red until a maintainer confirms
the two deletions.
## Verification
Head `7fd87174` on main `62941574`. 185 paths: +1182 / −7242 lines
(8424), of which the deleted package and the lockfile account for −7007.
Governed: `skills/**` ×1 (`skills/objectui/README.md`, one line) and
over the 3000 human-merge line.
- **Derived gates:** `node scripts/pm/dispatch-gates.mjs --commands`
derives 137. All 137 ran:
- 136 exit 0;
- `check-empty-changeset` exits 1 for the reason above;
- 119 ran on `90f44cec`. The 18 families added by the
`check:lockstep-package-count --fix` commit, plus that gate, ran on
`0b13f123`, whose tree equals `7fd87174`. Only the commit message was
reworded.
- `--ran` reconciles 137 derived, 137 run, 0 NOT-MEASURED, 0 UNRUN.
- **ui vitest:**
- On this head: the 83 changed or importing test files, 1663 tests, all
pass.
- On the pre-rebase tree (the same change on PR 1's head), the whole
`unit` project ran: 1643 files and 31054 tests. Every red was fixed in
this diff, except the 47→48 `ObjectSchema` key pin, which main already
carries.
- Also on the pre-rebase tree: `dom-heavy` passed 35 of 35 files, and
`dom` shards 1–3 of 4 passed 2914 files. Shard 4 was cut off by the
local time limit, and CI's 16 shards cover it.
- **Push battery** (`GITHUB_ACTIONS=true GITHUB_EVENT_NAME=push node
scripts/pm/check-dispatch-gates.mjs`) on `7fd87174`: `✓ dispatch-gates
self-test: 2164 cases pass`, exit 0.
- **2i overlap:** 2i PR A (#26315) touches the ui filter and the
manifest prose, so whichever lands second rebases.
## Changeset
`.changeset/25712-renderer-runs-one-sdui-parser.md`: a `patch` for the
13 published `@object-ui/*` packages whose dependency moved, with the
Clause-② narrowing above and an ADR-0087 `not-required
(no-migration-prescription)` marker.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a66c9ff commit 80f267d
181 files changed
Lines changed: 390 additions & 6437 deletions
File tree
- .changeset
- content/docs/protocol
- packages
- lint/src
- sdui-parser/src
- __tests__
- spec/liveness
- scripts
- skills/objectui
- ui
- .github
- apps/console
- dev
- scripts
- src/__tests__
- content/docs
- api
- plugins
- examples
- console-starter
- schema-catalog
- test
- packages
- app-shell/src/views/metadata-admin/previews/simulator
- cli/src
- __tests__
- commands
- components
- src
- __tests__
- renderers
- __tests__
- action/__tests__
- basic
- __tests__
- layout
- core/src/registry
- layout
- src/__tests__
- plugin-calendar
- src/__tests__
- plugin-dashboard
- src
- __tests__
- plugin-designer/src/__tests__
- plugin-detail
- src/__tests__
- plugin-editor
- plugin-gantt
- src/__tests__
- plugin-grid
- src/__tests__
- plugin-kanban
- src/__tests__
- plugin-list/src/__tests__
- plugin-map
- src
- __tests__
- plugin-markdown
- plugin-timeline
- src/__tests__
- plugin-tree
- src/__tests__
- react-runtime
- react
- src/__tests__
- runner
- sdui-parser
- src
- __tests__
- types/src
- __tests__
- zod
- vscode-extension/src/__tests__
- scripts/__tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
59 | 57 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
63 | 61 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
104 | 104 | | |
105 | | - | |
106 | 105 | | |
107 | | - | |
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
| |||
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
158 | | - | |
159 | | - | |
| 156 | + | |
| 157 | + | |
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
163 | 177 | | |
164 | 178 | | |
165 | 179 | | |
| |||
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
188 | | - | |
| 202 | + | |
189 | 203 | | |
190 | 204 | | |
191 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
44 | 57 | | |
45 | 58 | | |
46 | 59 | | |
| |||
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
54 | | - | |
| 67 | + | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
0 commit comments