Repository navigation
Commit 3bfb357
refactor(components)!: retire the unused ViewSkeleton dispatcher and ShimmerSkeleton (#27388)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8MCjwDfBRBbh1qJBm2tbXAr)_
Fixes #25915
Clause-②: no (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:从 `@object-ui/components` 的发布入口删掉两个没人用的组件:`ViewSkeleton`(按
variant 分发的骨架屏包装,连同它的两个类型)和 `ShimmerSkeleton`(连同其 props 类型)。
- 为什么改:裁决 B 收尾本卡;两者在整个工作区零导入,只是挂在公开面上的死导出。
- 风险与回滚:对外是破坏性变更(外部宿主若导入会编译失败),changeset 带 BREAKING 说明与逐个 FROM → TO
迁移;仓内零调用方。回滚即恢复两处导出。`GridSkeleton` 等其余骨架屏照常导出。
-
先看:`ui/packages/components/src/custom/view-skeleton.tsx`(只删分发器);`.changeset/25915-retire-view-and-shimmer-skeleton.md`(迁移说明与
ADR-0087 标记)。
- 两分钟验证:`git grep -nwE "ViewSkeleton|ShimmerSkeleton" -- ui
':!*CHANGELOG.md'`,预期零命中。
- 需要你做的:无,席位落地(合并前需 `CONTRACT_REVIEW_TIER` 契约复核,席位转交分诊)。
## What changes
- `ui/packages/components/src/custom/view-skeleton.tsx`: the
`ViewSkeleton` variant dispatcher leaves, with `ViewSkeletonVariant` and
`ViewSkeletonDispatchProps`. The file stays and keeps exporting
`GridSkeleton`, `KanbanSkeleton`, `FormSkeleton`, `ListSkeleton`,
`ChartSkeleton` and the `ViewSkeletonProps` / `GridSkeletonProps` /
`KanbanSkeletonProps` types. `GridSkeleton` and `ChartSkeleton` have
live importers (`plugin-dashboard`, `plugin-charts`).
- `ui/packages/components/src/custom/shimmer-skeleton.tsx` is deleted
(`ShimmerSkeleton`, `ShimmerSkeletonProps`), and so is its
`custom/index.ts` line.
- `ui/packages/app-shell/src/styles.css`: the `animate-shimmer` usage
comment no longer points at `ShimmerSkeleton`. The keyframe and utility
stay.
- Changeset `@object-ui/components` `patch`: a BREAKING note, a FROM →
TO line for each of the five retired exports, and an `adr-0087:
not-required (runtime-export-retired …)` marker naming all five. `patch`
because `Metadata-protocol: none` (AGENTS.md Post-Task Checklist step 3:
a non-protocol change, breaking included, ships `patch` and keeps its
BREAKING banner).
Not touched, per ruling B (6486367718): `KanbanSkeleton`, `FormSkeleton`
and `ListSkeleton` lose their only caller (the dispatcher) but stay
exported. The Studio empty states and `DataEmptyState` are not touched
either.
## Tests
No new test. The removal is proven once on the built package (below),
not pinned by a permanent file. The claim's file surface names no test
file.
## Acceptance notes
- Owes one `CONTRACT_REVIEW_TIER` contract review of the whole non-prose
diff before the queue: `pm-dispatch` `references/contract-review.md`
puts a `Clause-②: no (narrowing)` declaration at that tier. The seat
hands it to triage. It is not Tier H, because no governed path is
touched.
- ADR-0145 does not govern this: it covers `?: never` tombstones on the
ui authoring face, not React runtime exports.
## Verification
All readings at head `8e055464` (base `c4c515ad`, #27366's merge).
<details><summary>Build, type-check, tests and the removal
proof</summary>
- `pnpm --filter @object-ui/components build` under `os-verify-lock`:
VERDICT command-exit 0. `pnpm --filter @object-ui/components
type-check`: VERDICT command-exit 0, 0 `error TS`.
- `pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/`
under the lock: VERDICT command-exit 0, Test Files 447 passed | 1
skipped (448), Tests 4327 passed | 24 skipped. This includes
`chart-primitives-removed-7397.test.ts`, which reads the package barrel
and requires `ChartSkeleton` to stay exported.
- Removal proof on the built `dist/`: `grep -cw` reads 0 for each of
`ViewSkeleton`, `ViewSkeletonVariant`, `ViewSkeletonDispatchProps`,
`ShimmerSkeleton` and `ShimmerSkeletonProps`, in `index.js` and in
`custom/view-skeleton.d.ts`. `custom/shimmer-skeleton.d.ts` is not
emitted, and `custom/index.d.ts` has no shimmer line. Control:
`GridSkeleton` reads 2 in `custom/view-skeleton.d.ts` and 1 in
`index.js`.
- Importers before the change, `git grep -w` over `ui`, `packages`,
`apps` and `examples` (CHANGELOGs and the two files themselves
excluded): 0 for all five. The only other hit was the `styles.css`
comment this PR rewords.
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: exit 0, with no anchored file in the change set.
</details>
<details><summary>Gates and dogfood</summary>
- `dispatch-gates --commands --repo objectstack-ai/objectstack` derived
28 families. All 28 ran, each with its exit code captured before any
pipe, and all exited 0. `check-adr-0087-registration --base origin/main`
verified the `runtime-export-retired` marker for all five operands.
`--ran` reconciliation: 28 derived, 28 run, 0 NOT-MEASURED.
- `pnpm --dir ui exec vitest run scripts/` first read 1 failed. The
failure was `quick-reference-commands-4149` naming `apps/site`: a
leftover `ui/apps/site` directory holding only ignored files from this
worktree's install, before #27329 retired the site on `main`. With the
directory removed, the rerun gave VERDICT command-exit 0, Test Files 169
passed | 2 skipped.
- `dispatch-gates --tier`: no path-derived mandate. Changed lines: 111
(+21 / -90).
- Full dogfood, required because the title carries `!` and Clause-② has
the `(narrowing)` arm. The closure was built with `pnpm --filter
'@objectstack/dogfood^...' build` (VERDICT 0), then `pnpm --filter
@objectstack/dogfood test` ran under the lock with no shard and no path:
VERDICT command-exit 0, Test Files 348 passed | 3 skipped (351), Tests
2806 passed | 20 skipped (2826).
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbZK9w6fe2Y6mGQjj6L)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent c5d4634 commit 3bfb357
5 files changed
Lines changed: 21 additions & 90 deletions
File tree
- .changeset
- ui/packages
- app-shell/src
- components/src/custom
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | 207 | | |
237 | | - | |
238 | 208 | | |
239 | 209 | | |
240 | 210 | | |
| |||
0 commit comments