Repository navigation
Commit d93acbb
refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer (#29388)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbEi5wvRAxyvWna4gbUTJroF)_
Part of #25921 — the zero-consumer barrel batch for
`@object-ui/plugin-gantt` and `@object-ui/plugin-designer` (claim
6576816381), the item landings 6542309053 and 6543370760 left open. The
card stays open: every other item it lists is untouched.
Clause-②: yes (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:`@object-ui/plugin-gantt` 入口不再导出 19
个名字(快速筛选栏、资源负载网格、负载计算、班次带工具及其类型、`normalizeDependencies`);`@object-ui/plugin-designer`
入口不再导出 6
个值(`CollaborationProvider`、`ConnectionStatusIndicator`、`useClipboard`、`useMultiSelect`、`useCanvasPanZoom`、`PropertyEditor`)。模块文件全部保留,两个
README 不再教这些名字,每包一个 `!` changeset。
- 为什么改:这 25 个名字在全仓(含 examples、文档、技能、测试)和 hotcrm
中,除自己包外零引用;甘特图和设计器内部照常使用它们,只是不再作为没人用的公开面发布。
- 风险与回滚:仓内无消费者,Console 与其它 `@object-ui/*` 包不受影响;外部 npm
用户若导入会在升级时编译报错,changeset 写明每个名字改用的写法(多数是在 `gantt` 块里声明 `quickFilters` /
`resourceView` / `timeSegments`)。回滚即 revert 本 PR。
-
先看:`ui/packages/plugin-gantt/src/index.tsx`、`ui/packages/plugin-designer/src/index.tsx`、`.changeset/25921-plugin-designer-internal-helpers-off-entry.md`(协作入口退出后,设计器里的协作分支在包外不可达)。
- 两分钟验证:`git grep -n -w -e QuickFilterBar -e computeWorkload -e
CollaborationProvider -e useCanvasPanZoom --
ui/packages/plugin-gantt/src/index.tsx
ui/packages/plugin-designer/src/index.tsx
ui/packages/plugin-gantt/README.md
ui/packages/plugin-designer/README.md`,预期无输出(退出码 1):两个入口和两个 README
都不再出现这些名字。
- 需要你做的:无,席位落地(入队前欠一次契约复审档的复审,由席位转总监)。
## What changes
- `@object-ui/plugin-gantt` (`src/index.tsx`): the entry stops exporting
`QuickFilterBar`, `QuickFilterBarProps`, `QuickFilterField`,
`QuickFilterOption`, `QuickFilterLabels`, `QuickFilterDef`,
`ResourceWorkload`, `ResourceWorkloadProps`, `computeWorkload`,
`WorkloadColumn`, `WorkloadOptions`, `ResourceCell`, `ResourceLoad`,
`normalizeDependencies`, `normalizeShiftSegments`, `shiftDayStart`,
`bandAt`, `ShiftSegmentsConfig` and `ShiftBandConfig`. Every module
stays: `ObjectGantt` still imports the bar, the grid and the shift
helpers, and `ResourceWorkload` still imports the workload math.
- `@object-ui/plugin-designer` (`src/index.tsx`): the entry stops
exporting `CollaborationProvider`, `ConnectionStatusIndicator`,
`useClipboard`, `useMultiSelect`, `useCanvasPanZoom` and
`PropertyEditor`. Every module stays: the four designers import the
hooks, `PropertyEditor` and `useCollaboration` from them.
- Both `README.md` files stop teaching the retired names
(`check-readme-exports` binds every README self-import to a real
export). The gantt README now says the bar, the workload grid and the
shift bands are configured through the `gantt` block; the designer
README drops the collaboration feature bullet, its section and the Quick
Start wrapper.
- Two changesets, `patch` with the `**BREAKING**` banner, both
declaration lines, the ADR-0087 `not-required (runtime-export-retired
…)` marker naming every operand, and a FROM → TO "no replacement" line
with the one-line fix per group. New file names, distinct from the
`25921-*` changesets #26517 still holds.
## Why
How the set was chosen, the #28385 method re-run at `origin/main`
`738971d2` (hotcrm `d4ffe99`): every name each barrel exports was listed
from the barrel's AST (35 / 38), then `git grep -l -w -F` ran for each
over the whole tree minus the package's own directory,
`**/CHANGELOG.md`, the lockfiles, `.changeset/**` and
`ui/.changeset/**`; the brief's cut (`ui/`, `packages/`, `apps/`,
`examples/`, `content/`, tests excluded) and hotcrm were counted beside
it. Positive controls, same command: `ObjectGantt` 108 files (the #28385
reading), `CreateAppPage` 48, `SchemaRenderer` 1157 (hotcrm 3). A name
was retired only when all three hold:
1. zero hits outside its package on every cut (any hit, prose included,
keeps the name);
2. no in-package module loses its last importer (no module file is
deleted);
3. no export that stays needs it, measured with the TypeScript checker
over the declared signatures of every kept export.
| package | barrel names | zero hits outside | of those, needed by a
kept export | retired here |
|:--|--:|--:|--:|--:|
| `@object-ui/plugin-gantt` | 35 | 24 | 5 | 19 |
| `@object-ui/plugin-designer` | 38 | 15 | 9 | 6 |
Kept by rule 3: `GanttViewProps` (props of `GanttView`),
`GanttDependency` and `GanttDependencyObject`
(`GanttTask.dependencies`), `NormShiftSegments` and `NormShiftBand`
(`GanttViewProps.shiftSegments`); the nine designer `…Props` types of
components that stay.
## Tests
- Code head `641e44d3`; `bb4ab640` merges 21 `origin/main` commits, none
under either package (branch delta re-read: the same 6 files, +71 /
-107).
- `turbo run type-check --filter=@object-ui/plugin-gantt
--filter=@object-ui/plugin-designer --filter=@object-ui/app-shell
--filter=@object-ui/console` → 74/74 tasks successful (os-verify-lock
`VERDICT command-exit 0`). app-shell (the lazy designer pages) and the
Console are the importers of either package.
- `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-gantt/
packages/plugin-designer/` → Test Files 156 passed, 1 skipped (157);
Tests 1248 passed, 114 skipped (`VERDICT command-exit 0`).
- `pnpm --dir ui exec vitest run scripts/` (includes
`check-readme-exports`) → Test Files 169 passed, 2 skipped; Tests 4903
passed (`VERDICT command-exit 0`).
- Full dogfood battery (the title carries `!`) on `bb4ab640`: closure
`turbo run build --filter=@objectstack/dogfood^...` 68/68, then `pnpm
--filter @objectstack/dogfood test` → Test Files 393 passed, 3 skipped
(396); Tests 3243 passed, 28 skipped (3271); `VERDICT command-exit 0`,
held the lock 2236 s.
- Head `d0ee5c76` merges 29 more `origin/main` commits, none under
either package; the census re-run on it still reads zero for all 25
retired names (control `ObjectGantt` 108). The suites above were not
re-run on it.
- No ablation: export lines and README text removed; no tested behaviour
changed.
## Acceptance notes
- With `CollaborationProvider` off the entry, nothing outside the
package can mount it, so the collaboration branches in `PageDesigner`,
`DataModelDesigner`, `ProcessDesigner` and `ReportDesigner`
(`useCollaboration()` is now always `null` for a host) and the provider
and indicator bodies in `CollaborationProvider.tsx` are dead code.
Deleting them edits modules this claim does not cover; same card family,
left for a next pass.
- `useConfirmDialog` and `VersionHistory` have zero hits once tests are
excluded; their only outside hits are comments in
`ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts`
naming their module files. Kept under rule 1 here.
- Gantt names kept with outside hits: `ObjectGantt`, `ObjectGanttProps`,
`ObjectGanttRenderer`, `GanttView`, `GanttTask`, `GanttTaskType`,
`GanttViewMode`, `GanttLinkType`, `GanttMarker`, `normalizeTaskType`,
`parseHHMM` (several are prose or same-name hits, for example
`parseHHMM` in `service-messaging`; rule 1 keeps them all).
- A `CONTRACT_REVIEW_TIER` review is owed before the queue (barrel
narrowing); the seat routes it to the director.
## Verification
<details><summary>Derived gates — 28/28 run, 0 NOT-MEASURED</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `641e44d3`: 28 commands; `--ran`: "28
derived famil(ies) accounted for — 28 run, 0 NOT-MEASURED". Every
command exit 0, among them `check-adr-0087-registration --base
origin/main`, `check-empty-changeset --base origin/main`,
`check-changeset-no-major --base origin/main`, `check-sdui-manifest` and
its `--self-test`, `check:published-files`,
`check:undeclared-dep-imports`, `check:nul-bytes` and `vitest run
scripts/`. `check-comment-mask-corpus` first timed out at 300 s beside
the closure build, then exit 0 alone (20050 files, 0 disagree, 284 s).
Outside the derived set: `check-platform-checklist --changed-from
origin/main` exit 0 (0 anchored files) at `bb4ab640`. `dispatch-gates`:
178 changed lines, under the 3000 threshold; no governed path.
</details>
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `eslint` on the two changed barrels exits 0
(7 warnings, 0 errors: `react-refresh/only-export-components` on the
kept helper exports and one `no-explicit-any`, all present on `main`
before this diff); the repo-wide `pnpm lint` is CI's run.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jTqpZ1sWR3BcpiFGa3)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent d68d129 commit d93acbb
6 files changed
Lines changed: 71 additions & 107 deletions
File tree
- .changeset
- ui/packages
- plugin-designer
- src
- plugin-gantt
- 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 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 32 | + | |
| 33 | + | |
41 | 34 | | |
42 | 35 | | |
43 | 36 | | |
| |||
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
61 | 52 | | |
62 | 53 | | |
63 | 54 | | |
| |||
131 | 122 | | |
132 | 123 | | |
133 | 124 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 125 | | |
155 | 126 | | |
156 | 127 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 128 | + | |
164 | 129 | | |
165 | 130 | | |
166 | 131 | | |
167 | 132 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 133 | | |
172 | 134 | | |
173 | 135 | | |
174 | 136 | | |
175 | 137 | | |
176 | 138 | | |
177 | | - | |
| 139 | + | |
178 | 140 | | |
179 | 141 | | |
180 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
61 | | - | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 199 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 200 | + | |
208 | 201 | | |
209 | 202 | | |
210 | 203 | | |
| |||
217 | 210 | | |
218 | 211 | | |
219 | 212 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 213 | + | |
228 | 214 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | 215 | | |
235 | 216 | | |
236 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
237 | 222 | | |
238 | 223 | | |
239 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 25 | + | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
| 38 | + | |
42 | 39 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
60 | 44 | | |
61 | 45 | | |
62 | 46 | | |
| |||
0 commit comments