Skip to content

Commit 96b5dab

Browse files
refactor(collaboration, components)!: retire CollaborationTranslate and MobileDialogContentProps from the entries (#31387)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XYXcmMqaNb1kURUHriN8ZqN)_ Part of #25921 Clause-②: no (narrowing) Metadata-protocol: none Skills-docs: none (neither name appears under `skills/**` or `content/docs/**`) ## 维护者速读 - 改了什么:`@object-ui/collaboration` 的根入口不再导出类型 `CollaborationTranslate`,`@object-ui/components` 的根入口不再导出类型 `MobileDialogContentProps`;这是 #25921 的第 17 批。 - 为什么改:两个仓库里包外没有任何代码、文档或技能提到这两个名字,也没有保留导出的类型声明引用它们。派发令原定的另外两个名字 `parseHHMM`、`Minimap` 被各自 README 当作公开 import 教授,按规则保留。 - 风险与回滚:只删两行再导出,两个类型声明仍留在原模块供包内使用,运行时代码零变化(纯类型)。外部 npm 宿主若从入口 import 这两个类型会编译失败(未实测,changeset 写了 BREAKING 与替代写法)。`!` patch,回滚即 revert 本 PR。 - 先看:`ui/packages/collaboration/src/index.ts`、`ui/packages/components/src/custom/index.ts`、`.changeset/25921-collaboration-components-leftover-types.md`。 - 两分钟验证:`node scripts/check-adr-0087-registration.mjs --base origin/main`,预期两个名字都 `verified`、退出 0。 - 需要你做的:无,席位落地。 ## What changes Batch 17 as named in the seat's amendment 6717181444 on claim 6717134663 (census `/mnt/project-files/pm-orders/ui/25921-b17-census.md`, `origin/main` `8b904420`, hotcrm `6961ab1`). - **`ui/packages/collaboration/src/index.ts`**: `type CollaborationTranslate` leaves the named re-export from `./useCollaborationTranslation.js`. The declaration keeps its module `export`; `CommentThread.tsx` and `PresenceAvatars.tsx` import it from that module directly. - **`ui/packages/components/src/custom/index.ts`** (unpublished sub-barrel, reached by the entry's `export * from './custom'`): the named list from `./mobile-dialog-content` keeps only `MobileDialogContent`. `MobileDialogContentProps` stays exported from its module as the `forwardRef` props type. `components/src/ui/` is untouched. - **Changeset** `.changeset/25921-collaboration-components-leftover-types.md`: `!` patch for both packages, BREAKING, FROM/TO for each name, `runtime-export-retired` ×2 (FROM spans 1:1), both declaration lines. The census dropped two of the four expected names: `parseHHMM` (`ui/packages/plugin-gantt/README.md:200`, in the "Public exports" import list) and `Minimap` (`ui/packages/plugin-designer/README.md:138`, `import { ConfirmDialog, Minimap } from '@object-ui/plugin-designer'`) are README-taught, so they stay (order fence; seat ruling in 6717181444). ## Tests - Census (one `rg -w -F` pass per repo over each entry's names): both names have zero hits outside their package, in objectstack and in hotcrm. Positive controls in the same modules (`git grep -l -w -F` on `origin/main` outside the package, files): `useCollaborationTranslation` 9, `COLLAB_DEFAULT_TRANSLATIONS` 9, `MobileDialogContent` 12. Rule 3: no kept export's emitted declaration names either (the emitted `MobileDialogContent` declaration spells its props out inline). - Reverse probe of the entries (TypeScript checker export list): collaboration 31 → 30, components 354 → 353; exactly these two gone, none added. A probe file compiled against the built `dist/index.d.ts` of both packages answers TS2724 for `CollaborationTranslate` and `MobileDialogContentProps` and nothing on the control line (`useCollaborationTranslation`, `COLLAB_DEFAULT_TRANSLATIONS`, `MobileDialogContent`). - `pnpm --workspace-concurrency=2 --filter '@object-ui/collaboration...' --filter '@object-ui/components...' build` then `type-check` of both packages under the lock: VERDICT command-exit 0. - `pnpm --dir ui exec vitest run --maxWorkers=2 packages/collaboration/ packages/components/` under the lock: VERDICT command-exit 0, Test Files 484 passed | 1 skipped (485), Tests 4656 passed | 24 skipped (4680). - No test added or removed, and no ablation: the diff stops re-exporting two type aliases; no tested behaviour changes. ## Acceptance notes - After this batch, plugin-gantt and plugin-designer hold no free untaught name (`parseHHMM`, `Minimap` README-taught), and collaboration and components hold none either under the current rules (every other zero-hit name is a Props/Result type a kept export names). - The b14 census's "homonym-only" label for `parseHHMM` and `Minimap` counted outside hits only; their README lines sit inside the package directory. ## Verification <details><summary>Derived gates on HEAD 94d09d5 (30/30, all exit 0, --ran reconciled)</summary> `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran` → "30 derived famil(ies) accounted for — 30 run, 0 NOT-MEASURED". - `node scripts/check-adr-0087-registration.mjs --base origin/main` exit 0: both operands verified for `.changeset/25921-collaboration-components-leftover-types.md`; `--self-test` exit 0 - `node scripts/check-changeset-no-major.mjs --base origin/main` exit 0 - `node scripts/check-empty-changeset.mjs --base origin/main` exit 0; `--self-test` exit 0 - `node scripts/check-closing-keyword-parity.mjs` exit 0; `--self-test` exit 0 - `node scripts/check-comment-mask-corpus.mjs`, `check-sdui-manifest.mjs` (+ `--self-test`), `ci/snapshot-next.mjs --self-test`, `pm/release-rehearsal-clone.mjs --self-test`, `release-pending-publish.mjs --self-test`: exit 0 - `pnpm --dir ui exec vitest run scripts/` under the lock → Test Files 170 passed | 2 skipped (172), Tests 4996 passed | 2 skipped (4998) - `pnpm --filter @objectstack/spec run check:duration-unit-keys`; `pnpm check:changeset-gate-self-tests`, `check:closed-ceremony-text`, `check:dispatcher-error-vocabulary`, `check:driver-memory-census`, `check:gitlink-declared`, `check:nul-bytes`, `check:published-files`, `check:refd-timer-probe`, `check:registry-log-declared`, `check:rest-log-spy-declared`, `check:skill-identifier-liveness`, `check:test-source-alias`, `check:tier-file-adoption`, `check:undeclared-dep-imports`, `check:watch-hint-literal`: exit 0 Outside the derivation: `node scripts/check-platform-checklist.mjs --changed-from origin/main` exit 0 (no anchored file); `pnpm --dir ui run check:new-line-citations` exit 0 (0 new citations). </details> <details><summary>Full dogfood battery on HEAD 94d09d5</summary> `bash scripts/pm/os-verify-lock.sh -c "pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test"` → `os-verify-lock: VERDICT command-exit 0` (held 31m45s) · Test Files 437 passed | 3 skipped (440) · Tests 3618 passed | 41 skipped (3659) · no failure. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5nWyzhAwmEiL7EqVPH)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5nWyzhAwmEiL7EqVPH --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 71d094c commit 96b5dab

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@object-ui/collaboration': patch
3+
'@object-ui/components': patch
4+
---
5+
6+
refactor(collaboration, components)!: retire two zero-consumer type exports from the package entries (`CollaborationTranslate`, `MobileDialogContentProps`)
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/collaboration#CollaborationTranslate, @object-ui/components#MobileDialogContentProps) the retired operands are two TypeScript type aliases, the translate-function type of the collaboration package's i18n hook and the props type of the components package's mobile dialog content; nothing in the workspace or in hotcrm imports or names either outside its package, and no packages/spec schema, registered node type, conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
12+
13+
**BREAKING** for a host that imports `CollaborationTranslate` from `@object-ui/collaboration` or `MobileDialogContentProps` from `@object-ui/components`. Neither had an importer or a mention anywhere outside its package, in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Nothing renders differently.
14+
15+
Both stay in their modules, which their package's own code still reads; only the entries stop publishing them:
16+
17+
- `CollaborationTranslate` types the `t` that `CommentThread` and `PresenceAvatars` pass to their timestamp and status helpers.
18+
- `MobileDialogContentProps` is the props type of `MobileDialogContent`, and the props stay recoverable as `React.ComponentPropsWithoutRef<typeof MobileDialogContent>`.
19+
20+
Every other name the two entries exported stays exported unchanged, among them `useCollaborationTranslation`, `COLLAB_DEFAULT_TRANSLATIONS`, `CommentThread`, `PresenceAvatars` and `MobileDialogContent`.
21+
22+
What leaves, and what to write instead:
23+
24+
- FROM `CollaborationTranslate` TO `ReturnType<typeof useCollaborationTranslation>['t']`, the expression the type was defined as.
25+
- FROM `MobileDialogContentProps` TO `React.ComponentPropsWithoutRef<typeof MobileDialogContent>`.

‎ui/packages/collaboration/src/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export { isCommentAuthor } from './commentAuthorship.js';
5959
export {
6060
useCollaborationTranslation,
6161
COLLAB_DEFAULT_TRANSLATIONS,
62-
type CollaborationTranslate,
6362
} from './useCollaborationTranslation.js';
6463

6564
export {

‎ui/packages/components/src/custom/index.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ export {
6464
type DataErrorStateProps,
6565
} from './view-states';
6666
export * from './empty-state-link';
67-
export {
68-
MobileDialogContent,
69-
type MobileDialogContentProps,
70-
} from './mobile-dialog-content';
67+
export { MobileDialogContent } from './mobile-dialog-content';
7168
export * from './dialog-viewport-gutter';
7269
export { HorizontalOverflowBox, type HorizontalOverflowBoxProps } from './horizontal-overflow';
7370
export { PINNED_RIGHT_SEAM_SHADOW_CLASSES } from './use-horizontal-overflow';

0 commit comments

Comments
 (0)