Repository navigation
Commit 48b3ae6
refactor(plugin-dashboard, plugin-list)!: retire eight zero-consumer entry exports (#30541)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuDadpmv8nuw2HbLjjF77YBK)_
Part of #25921. The umbrella stays open; this is one barrel batch of it
(claim 6660204183, amended 6660498263, seat `domain:ui#6`).
Clause-②: no (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:`@object-ui/plugin-dashboard` 的包入口不再导出 5
个名字(配置面板的默认英文表与翻译钩子、已退役节点类型的墓碑组件及其上报/重置函数),`@object-ui/plugin-list` 不再导出
3 个名字(视图切换下拉、标签栏下拉、条件格式包装函数)。模块本身全部保留。
- 为什么改:这 8 个名字在仓内(包外)与 hotcrm 均零引用,只是让公开面看起来比实际大;本卡逐包清理无人使用的 barrel 导出。
- 风险与回滚:对外是 breaking 收窄,只影响直接从包入口 import 这些名字的外部宿主;控制台与所有 `@object-ui/*`
包不受影响,退役节点仍按名拒绝。回滚即 revert 本 PR。
-
先看:`ui/packages/plugin-dashboard/src/index.tsx`(两段导出改写)、`.changeset/25921-plugin-dashboard-zero-consumer-exports.md`(迁移说明)、`ui/packages/plugin-list/src/index.tsx`。
- 两分钟验证:`git grep -n -w -e ViewSwitcherDropdown -e TabBarSelect -e
evaluateConditionalFormatting -e useConfigPanelTranslation -e
RetiredDashboardNodeTombstone -- ':!ui/packages/plugin-list'
':!ui/packages/plugin-dashboard' ':!**/CHANGELOG.md'` 应只命中两份新 changeset。
- 需要你做的:无,席位落地。
## What changes
- `ui/packages/plugin-dashboard/src/index.tsx`: the entry stops
exporting `CONFIG_PANEL_DEFAULT_TRANSLATIONS`,
`useConfigPanelTranslation`, `RetiredDashboardNodeTombstone`,
`reportRetiredDashboardNodeType` and
`resetRetiredDashboardNodeTypeReports`. `ConfigPanelTranslate` (the
README teaches it) and `RETIRED_DASHBOARD_NODE_TYPES` stay. The two
comments that justified the old exports are rewritten: the
defaults-vs-pack mirror gate (`defaults-maps-mirror-en-pack.test.tsx`)
discovers every defaults table from source through `scanDefaultsTables`,
so it needs no import from this entry.
-
`ui/packages/plugin-dashboard/src/__tests__/dashboardBareKeyOwnership.test.tsx`:
imports `RetiredDashboardNodeTombstone` and
`resetRetiredDashboardNodeTypeReports` from `../retired-node-types`
instead of `../index`. Same objects, so the identity comparison is
unchanged; the entry import still performs the registrations.
- `ui/packages/plugin-list/src/index.tsx`: the entry stops exporting
`ViewSwitcherDropdown`, `TabBarSelect` and
`evaluateConditionalFormatting`.
- Two new changesets,
`.changeset/25921-plugin-dashboard-zero-consumer-exports.md` and
`.changeset/25921-plugin-list-zero-consumer-exports.md`: patch level,
`!` title, BREAKING paragraph, one FROM/TO line per retired name,
ADR-0087 marker `not-required (runtime-export-retired …)` naming every
operand.
- No module file is deleted. Every retired name keeps an in-package
reader (`ListView` renders `ViewSwitcherDropdown`; the config panels use
the hook; `index.tsx` registers the tombstone; the rest are read by
their own tests).
## Tests
Census on `origin/main` fa9c0aa with the #28385 / #29388 method: the
entry export list from the TypeScript checker; per name `git grep -o -w
-F` over the whole tree minus the package directory, `**/CHANGELOG.md`,
lockfiles and `.changeset/**`; the package README, SKILL.md and demo;
keep rule 3 (a name a kept export's declared signature reaches, walked
with the checker); hotcrm `6961ab1` `git grep -l -w -F`.
| Package | Name | Hits outside the package | hotcrm | Verdict |
|:--|:--|--:|--:|:--|
| plugin-dashboard | `CONFIG_PANEL_DEFAULT_TRANSLATIONS` | 0 | 0 |
retired |
| plugin-dashboard | `useConfigPanelTranslation` | 0 | 0 | retired |
| plugin-dashboard | `RetiredDashboardNodeTombstone` | 0 | 0 | retired |
| plugin-dashboard | `reportRetiredDashboardNodeType` | 0 | 0 | retired
|
| plugin-dashboard | `resetRetiredDashboardNodeTypeReports` | 0 | 0 |
retired |
| plugin-dashboard | `ConfigPanelTranslate` | 0 | | kept: README
"TypeScript Support" teaches it |
| plugin-dashboard | `WidgetDatasetCatalogEntry`,
`WidgetDatasetDimension`, `WidgetDatasetMeasure` | 0 | | kept: rule 3,
via `WidgetConfigPanelProps` |
| plugin-dashboard | `DashboardMetricNodeSchema` | 0 | | kept: its entry
line is what loads `widgetDispatch`'s `CustomNodeRegistry` augmentation
into consumers' programs |
| plugin-list | `ViewSwitcherDropdown` | 0 | 0 | retired |
| plugin-list | `TabBarSelect` | 0 | 0 | retired |
| plugin-list | `evaluateConditionalFormatting` | 0 | 0 | retired |
| plugin-list | `TabBarProps`, `UserFiltersHandle`, `ListViewRowGroup` |
0 | | kept: rule 3, via `TabBar`, `UserFiltersProps`, `ListViewProps` |
| controls | `DashboardRenderer` 76, `RETIRED_DASHBOARD_NODE_TYPES` 2,
`ViewSwitcher` 29, `TabBar` 11, `normalizeFilterCondition` 9, `ListView`
621; hotcrm `ListView` 7 | | | |
Readings at head 14d4c82:
- `turbo run type-check` for `@object-ui/plugin-dashboard`,
`@object-ui/plugin-list`, `@object-ui/app-shell`, `@object-ui/console`
with their `^build` closure: 77 of 77 tasks successful (lock VERDICT
command-exit 0, 8m39s).
- `pnpm --dir ui exec vitest run --maxWorkers=2
packages/plugin-dashboard/ packages/plugin-list/`: Test Files 391 passed
(391); Tests 3741 passed, 6 skipped (3747); VERDICT command-exit 0.
- Reverse check on the rebuilt `.d.ts`: a temporary probe in app-shell
importing all eight retired names plus four kept controls gave exactly
eight errors, one per retired name (`TS2305` / `TS2724 … has no exported
member`), while `RETIRED_DASHBOARD_NODE_TYPES`, `DashboardRenderer`,
`TabBar` and `ViewSwitcher` resolved. Probe deleted; `git status` clean.
- `pnpm --dir ui run check:readme-exports`: `0 fabricated, 0 stale
omission(s)`; exit 1 only on the known prerequisite (`packages/cli` dist
unbuilt, its two self-imports unjudged).
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: exit 0, 0 anchored files.
- No ablation: export lines removed, no tested behaviour changed.
## Acceptance notes
- `TabBarSelect` and `evaluateConditionalFormatting` now have no reader
in the package's non-test code either: only their own tests import them
from the module. `evaluateConditionalFormatting` is a one-line wrapper
over `@object-ui/core`'s `resolveConditionalFormatting`. Retiring the
bodies (and their tests) is a later pass on this card, not filed
separately.
- `ui/packages/plugin-dashboard/README.md` says the package's "whole
type export surface is `WidgetConfigPanelProps`, `ConfigPanelTranslate`
and the three `WidgetDataset*` catalog types";
`DashboardMetricNodeSchema` has been on the entry since an earlier
release, so that sentence was already incomplete before this PR.
Untouched here (README not on the claim's surface).
- Branch name is the platform-assigned `claude/project-thread-h719zv`,
not `claude/issue-25921-*`.
- A contract-review-tier review is owed before the queue (narrowing
batch); the seat runs it.
## Verification
Derived gates, dogfood battery and the final-head readings are in the
os-dev-report comment on #25921; CI check-runs on this PR are the record
for every family CI runs.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgTj6bWX8Rq5fpUGNv7)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent b6f4c0e commit 48b3ae6
5 files changed
Lines changed: 56 additions & 26 deletions
File tree
- .changeset
- ui/packages
- plugin-dashboard/src
- __tests__
- plugin-list/src
| 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 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | | - | |
72 | | - | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
62 | 54 | | |
63 | 55 | | |
64 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
0 commit comments