Repository navigation
Commit 8a12a17
refactor(ui)!: retire test-only barrel helpers,
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoSoxEEBsgSbf7fv9MkDm77d)_
Part of #25921 (items B1, B3, B4, B6 and B10 of the card thread's
ledger, claim 6553495326; the card's other open items stay on it)
Clause-②: no (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:从五个 ui 包的公共入口拿掉无人使用的面:core 的 `resetActionKeyWarnings`、react 的
`__resetVisibilityPredicateWarnings`、plugin-detail 的
`resetUnknownActivityTypeWarnings`(三个都是只给测试用的「清掉只警告一次的记忆」助手),types 的
`CommentSearchResult` 接口(唯一生产者早已退役),以及十个语言包里四个没有任何界面读取的 `publicForm.*`
文案。
- 为什么改:#25921 清理零消费者公开面;这几项在仓内、`examples/**` 与 hotcrm
中都没有非测试读者,留在入口上只会被当成公开 API 承诺。
- 风险与回滚:只删导出与文案,不改任何运行行为;跨包测试改为从声明模块直接引入助手。对外部 npm 使用者是破坏性变更,五个包各带一个 `!`
changeset 写明替代写法。回滚即 revert 本 PR。
- 先看:`ui/packages/core/src/actions/index.ts`(`export *` 改为具名列表,少了
reset);`ui/packages/types/src/__tests__/record-id-string-survivors-10078.test.ts`(钉子去掉一行);`.changeset/25921-*.md`
五个文件。
- 两分钟验证:`git grep -n -w -e resetActionKeyWarnings -e
__resetVisibilityPredicateWarnings -e resetUnknownActivityTypeWarnings
-- 'ui/packages/*/src/index.ts*'` 只剩三行「test-only and stays off the
barrel」注释;`git grep -w CommentSearchResult -- ui/packages` 无结果。
- 需要你做的:无,席位落地(收窄公开入口,席位先做一次契约档复核)。
## What changes
- **B1 `@object-ui/core`:** `actions/index.ts` re-exported
`./actionKeys.js` with `export *`, which put the test seam
`resetActionKeyWarnings` on the package entry. It now re-exports the
module's other ten names by name. Core's own tests already import the
helper from `../actionKeys`.
- **B3 `@object-ui/react`:** `__resetVisibilityPredicateWarnings` leaves
the entry. Nine cross-package tests imported it from `@object-ui/react`
(the ledger said five; the import scan on the branch found nine) and now
import it from `react/src/utils/visibilityDiagnostic`, the same module
the vitest alias resolves the entry to, so the reset still clears the
instance the code under test reads. Four app-shell tests already used
that path.
- **B4 `@object-ui/plugin-detail`:** `resetUnknownActivityTypeWarnings`
leaves the entry; its one cross-package test
(`RecordDetailView.activityUnmappedType-5896`) imports
`plugin-detail/src/renderers/recordActivityFeed`. The entry's docblock
sentence that justified exporting it goes with it.
- **B6 `@object-ui/types`:** `CommentSearchResult` is deleted from
`views.ts` and the entry. Its only producer, `useCommentSearch` in
collaboration, retired in #28385. The record-id pin
`record-id-string-survivors-10078` keeps its two other shapes
(`RecordSubscription.recordId`, `DataSourceMutationEvent.id`) with their
type rows, value controls and census rows.
- **B10 `@object-ui/i18n`:** `publicForm.consentRequired`,
`rateLimited`, `redirectBlocked` and `requiredHint` leave all ten packs
(40 lines). `ui/scripts/check-i18n-dead-keys.mjs` lists all four
CONFIRMED; the form page reads the nine sibling `publicForm` keys, none
of these.
- Five changesets, one per package, each `patch` with a **BREAKING**
banner, both declaration lines and an ADR-0087 disposition
(`runtime-export-retired` for the four exports,
`no-migration-prescription` for the keys).
Zero-consumer readings (ledger
`/mnt/project-files/ui-seat-1/r2026-10-31b/out/25921-ledger.md`,
objectstack `efb1620c`, hotcrm `a598256`, positive controls
`SchemaRenderer` 1,198 files and `useRecordPresence` 113): each name has
no non-test reader outside its package; every import of the four names
on this branch was re-read from the import statements themselves.
## Verification
Head `fef5795d` (branch point `eeec88d1`).
<details><summary>Tests</summary>
- `pnpm --dir ui exec vitest run packages/core/src/actions/
packages/react/ packages/plugin-detail/ packages/types/ packages/i18n/`
plus the ten edited cross-package test files: Test Files 1022 passed, 7
failed, 1 skipped (1030). All seven reds read `no module symbol for
packages/spec/dist/...d.mts` or the spec export probe: the closure had
been built with `OS_SKIP_DTS=1`. After `pnpm --filter @objectstack/spec
build` with declarations, the seven files rerun: 7 passed, 184 tests
passed.
- `pnpm turbo run type-check` for types, core, react, plugin-detail,
i18n, components, app-shell and console (each package's own `tsc
--noEmit` plus its `tsconfig.test.json`, so the pin's compile-time rows
and every repointed test are compiled): 78/78 tasks successful, lock
VERDICT command-exit 0.
- `pnpm --dir ui exec vitest run scripts/`: 169 files passed, 2 skipped;
4901 tests passed.
- No ablation: the diff removes exports and dead strings; no tested
behaviour changes.
</details>
<details><summary>Gates</summary>
- `dispatch-gates --commands`: 34 commands, all run with stdin closed,
each exit recorded before any pipe; `--ran`: 34 derived, 34 run, 0
NOT-MEASURED. All exit 0. `check:type-check-debt` first exited 3
(prerequisite: run during the build) and exits 0 on rerun (0 entries
above their recorded number).
- `check-adr-0087-registration --base origin/main`: 5 declared-breaking
changesets, each with a verified disposition.
- Outside the derived set: `check-sdui-manifest` exit 0;
`check-platform-checklist --changed-from origin/main` exit 0 (0 anchored
files); `ui` `check:new-line-citations` exit 0 (0 new).
- `dispatch-gates --tier`: no path-derived mandate; 194 changed lines
(+104 / -90), under the 3,000 threshold. No governed path.
</details>
## Acceptance notes
- The ledger counted five cross-package importers of
`__resetVisibilityPredicateWarnings`; it is nine (multi-line imports the
first scan missed). All nine are repointed here, same item, same file
class.
- Left on #25921 by the seat's pick: B2 (`clearSharedDiscoveryCache`),
B5 (`resetRetiredDashboardNodeTypeReports`, declared published on
purpose), B7 (S3/Azure upload adapters), B8 and B11 (governed), B9, B12,
B13.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind. (no names
added)
- [x] 3. No formatter ran; `pnpm lint` passes. (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: n/a.
- [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 (the 维护者速读 block is the
maintainer's channel).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L9qibzKqWksC1TiqsHCrrU
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibzKqWksC1TiqsHCrrU)_
---------
Co-authored-by: Claude <noreply@anthropic.com>CommentSearchResult and four dead publicForm keys (#28544)1 parent c658320 commit 8a12a17
32 files changed
Lines changed: 107 additions & 93 deletions
File tree
- .changeset
- ui
- apps/console/src/__tests__
- packages
- app-shell/src
- layout/__tests__
- providers
- __tests__
- views
- components/src/__tests__
- core/src/actions
- i18n/src/locales
- plugin-detail/src
- react/src
- types/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | 72 | | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments