You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ffeda13
Browse filesBrowse the repository at this point in the historyBrowse files
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuR2u8D9HqGFpUSa4p5Pj9Jc)_
Part of #25921. The umbrella stays open; this is barrel batch 3, claim
6665091931 (seat `domain:ui#6`, batch amendment from the seat after the
census). Earlier batches: #30541, #30576.
Clause-②: no (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:`@object-ui/auth` 的包入口不再导出 12 个名字(Turnstile
脚本地址、两个手机号识别函数、一个无人使用的 options
类型、组织角色清单、邀请状态清单与判定函数、五个表单样式件);`@object-ui/plugin-detail` 的包入口不再导出 21
个名字(记录页合成、布局、相关卡片与时间线的内部辅助函数,一个 hook,三个类型)。模块全部保留,行为不变。
- 为什么改:这 33 个名字在仓内(包外,含测试与文档)与 hotcrm 均零引用,README
未教,也不被保留导出的签名用到;本卡逐包收窄无人使用的公开导出。
- 风险与回滚:对外是 breaking 收窄,只影响直接从包入口 import 这些名字的外部宿主;控制台与所有 `@object-ui/*`
包不受影响。回滚即 revert 本 PR。
-
先看:`ui/packages/plugin-detail/src/index.tsx`(十处导出改写)、`ui/packages/auth/src/index.ts`(六处)、两份
`.changeset/25921-*-zero-consumer-exports.md`(迁移说明)。
- 两分钟验证:`git grep -l -w -e looksLikePhoneIdentifier -e AuthDivider -e
editRelatedArrangement -e useDefaultRecordPage -- ':!ui/packages/auth'
':!ui/packages/plugin-detail' ':!**/CHANGELOG.md'` 应只命中本 PR 的两份
changeset。
- 需要你做的:无,席位落地。
## What changes
- `ui/packages/auth/src/index.ts`: the entry stops exporting
`TURNSTILE_SCRIPT_URL`, `normalizePhoneIdentifier`,
`looksLikePhoneIdentifier`, the type `AuthenticatedAdapterOptions`,
`ORG_ROLES`, `AUTH_INVITATION_STATUSES`, `isAuthInvitationStatus`,
`AUTH_FIELD_LABEL_CLASS`, `AUTH_INPUT_CLASS`, `AuthCheckIcon`,
`AuthDivider`, `AuthMailIcon`. The invitation block keeps `export type {
AuthInvitationStatus }` and its comment now says the list and guard stay
in `invitation-status.ts`. The `phone-identifier` export line goes
entirely.
- `ui/packages/plugin-detail/src/index.tsx`: the entry stops exporting
`queueClaimAdmitted`, `extractLookupId`, `TEXTUAL_REF_FALLBACK_TYPES`,
`inferDetailColumns`, `applyAutoSpan`, `applyDetailAutoLayout`, the type
`DetailTabsProps` (`DetailTabs` itself was never on the entry),
`buildDefaultDiscussion`, `buildDefaultTimeline`, `deriveStages`,
`RECORD_PAGE_WIDE_MIN_WIDTH`, `recordPageColumnOfTab`, the type
`RecordPageColumn`, `useDefaultRecordPage`, `relatedCountTargetOf`,
`filterTimelineStream`, `RELATED_CARD_NEW_BADGE_MS`,
`editRelatedArrangement`, `relatedCardId`, `relatedDefaultOrderHash`,
the type `RelatedArrangementEdit`.
- Two new changesets, `.changeset/25921-auth-zero-consumer-exports.md`
and `.changeset/25921-plugin-detail-zero-consumer-exports.md`: patch
level, `!` title, BREAKING paragraph, FROM/TO lines for every retired
name, ADR-0087 marker `not-required (runtime-export-retired …)` naming
every operand.
- No module file is deleted and no test moves: every retired name keeps
1 to 7 in-package readers, and no test imports one from the entry (the
only entry-importing test, `ownerChangeReport-10193.test.tsx`, reads two
kept names).
## Why
Card #25921 narrows `ui/packages` barrels to names someone imports. The
checker export list after this PR is exactly the census list minus these
33 (auth 90 to 78, plugin-detail 162 to 141), nothing added.
## Tests
Census on `origin/main` 4831d50 with the method of batches 1 and 2:
entry export names from the TypeScript checker; per name `git grep -o -w
-F` outside the package, minus `**/CHANGELOG.md`, `pnpm-lock.yaml` and
`.changeset/**` (test files count); the package README, other `*.md` and
`demo/`; keep rule 3 (reached from a kept export's declared signature,
checker walk); hotcrm `6961ab1`. Full table: project file
`issue-25921-seat6/census-b3.md`.
| Package | Entry names | Zero outside hits | Kept (README or rule 3) |
Retired |
|:--|--:|--:|--:|--:|
| `@object-ui/auth` | 90 | 35 | 23 (Props, Labels, auth types,
`ORG_ROLE_OWNER`) | 12 |
| `@object-ui/plugin-detail` | 162 | 56 | 35 (README-taught, or Props
and types reached by kept exports) | 21 |
Controls (outside hits): `createAuthenticatedFetch` 311, `orgRoleGrade`
12, `ORG_ROLE_LABELS` 4, `AUTH_LINK_CLASS` 3, `TurnstileWidget` 1;
`isWideFieldType` 10, `InlineFieldInput` 7, `recordSitsInQueue` 1,
`DefaultRecordPageContext` 1, `prefetchRelatedCounts` 1; hotcrm
`ListView` 7. Packages swept and not chosen: `plugin-grid` and
`plugin-form` (their README "Exports" block lists every entry name, so 0
after the README rule), `data-objectstack` (zero-hit values are mostly
error classes the adapter throws), `components` / `core` / `react` /
`fields` (larger, left for later batches).
Readings at 79ddb13:
- Build: `turbo run build --filter=@object-ui/console...
--filter='./packages/**' --filter='@objectstack/dogfood^...'` VERDICT
command-exit 0; then `turbo run build --force` for the two packages (52
of 52) and `type-check` for both (`tsc --noEmit && tsc -p
tsconfig.test.json`), VERDICT command-exit 0.
- `pnpm --filter @object-ui/auth test`: Test Files 45 passed (45), Tests
398 passed (398). `pnpm --filter @object-ui/plugin-detail test`: Test
Files 373 passed, 1 skipped (374), Tests 3338 passed, 18 skipped (3356).
One lock VERDICT command-exit 0.
- `vitest run scripts/` (ui): Test Files 170 passed, 2 skipped (172);
Tests 4970 passed, 2 skipped (4972); VERDICT command-exit 0.
- `check:readme-exports`: `0 fabricated, 0 stale omission(s)`; exit 1
only on the known unbuilt `packages/cli` prerequisite (`serve`, `init`).
`check-platform-checklist --changed-from origin/main`: exit 0, 0
anchored files.
- Reverse check on the rebuilt `.d.ts`: a temporary `app-shell` probe
importing the 33 retired names plus 10 kept controls, `tsc --noEmit -p
tsconfig.json` in `ui/packages/app-shell`: exactly 33 errors (`TS2305` /
`TS2724 … has no exported member`), one per retired name, all in the
probe; 0 errors elsewhere in `app-shell`; the controls resolved. Probe
deleted; `git diff HEAD` empty.
- Dogfood battery (closure above plus `pnpm --filter
@objectstack/dogfood test` under the lock): Test Files 420 passed, 3
skipped (423); Tests 3496 passed, 36 skipped (3532); VERDICT
command-exit 0 (20m47s, shared box).
- No ablation: export lines removed, no tested behaviour changed.
## Acceptance notes
- Branch name is the platform-assigned `claude/project-thread-rr6ip0`,
not `claude/issue-25921-*`.
- The auth entry comment says the form primitives are "exposed so
consumers can build custom forms"; five of the eleven had no consumer
and leave, the six with consumers stay. A host that wants the full kit
can ask for them back.
- A contract-review-tier review is owed before the queue (narrowing
batch); the seat runs it.
- Left for later batches: `components` (about 65 zero-hit shadcn
sub-parts), `core` (about 47), `react` (about 25), `fields` (9),
`layout` / `plugin-editor` / `permissions` (1 each).
## Verification
Derived gates (`dispatch-gates --commands`, 29 families) all exit 0;
`--ran` reconciliation: 29 derived, 29 run, 0 NOT-MEASURED (a derived
zero, every line with an exit code). CI check-runs on this PR are the
record for every family CI runs.
## 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. (CI)
- [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. (the 维护者速读 block is
the fleet's required Chinese summary)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgT8zkQTEh2HjcmxipS)_
Co-authored-by: Claude <noreply@anthropic.com>
refactor(auth)!: retire twelve zero-consumer exports (the Turnstile script URL, the two phone-identifier helpers, the authenticated-fetch options type, the org-role list, the invitation-status list and guard, and five form primitives)
6
+
7
+
Clause-②: no (narrowing)
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/auth#TURNSTILE_SCRIPT_URL, @object-ui/auth#normalizePhoneIdentifier, @object-ui/auth#looksLikePhoneIdentifier, @object-ui/auth#AuthenticatedAdapterOptions, @object-ui/auth#ORG_ROLES, @object-ui/auth#AUTH_INVITATION_STATUSES, @object-ui/auth#isAuthInvitationStatus, @object-ui/auth#AUTH_FIELD_LABEL_CLASS, @object-ui/auth#AUTH_INPUT_CLASS, @object-ui/auth#AuthCheckIcon, @object-ui/auth#AuthDivider, @object-ui/auth#AuthMailIcon) the retired operands are a script URL constant, two sign-in identifier helpers, an options interface, two closed vocabulary lists with one narrowing guard, two class-name strings and three presentational components; nothing in the workspace or in hotcrm imports any of them from the package entry, 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 -->
11
+
12
+
**BREAKING** for a host that imports any of these twelve names from `@object-ui/auth`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package: `TurnstileWidget` keeps loading its script, `LoginForm` keeps reading phone identifiers, `createAuthClient` keeps narrowing invitation statuses, `org-roles.ts` keeps building its pickers from the role list, and `LoginForm` / `RegisterForm` / `ForgotPasswordForm` keep drawing with the form primitives. Only the entry stops publishing them. `TurnstileWidget`, `createAuthenticatedFetch`, `ORG_ROLE_OWNER` / `ORG_ROLE_ADMIN` / `ORG_ROLE_DELEGATED_ADMIN` / `ORG_ROLE_MEMBER`, `ORG_ROLE_LABELS`, `orgRoleGrade`, `invitableOrgRoles`, `assignableOrgRoles`, the `OrgRole` and `AuthInvitationStatus` types, `AUTH_LINK_CLASS`, `AUTH_PRIMARY_BUTTON_CLASS`, `AuthAlertIcon`, `AuthErrorBanner`, `AuthFormHeader` and `AuthSpinner` stay exported unchanged.
13
+
14
+
What leaves, and what to write instead:
15
+
16
+
- FROM `TURNSTILE_SCRIPT_URL` TO `TurnstileWidget`, which loads the Cloudflare Turnstile script itself.
17
+
- FROM `normalizePhoneIdentifier`, `looksLikePhoneIdentifier` TO `LoginForm`, which accepts a phone number as the identifier and normalizes it; keep a local copy if your own sign-in form needs them.
18
+
- FROM `AuthenticatedAdapterOptions` TO a local interface: no function in the package takes it (`createAuthenticatedFetch` has its own options).
19
+
- FROM `ORG_ROLES` TO `invitableOrgRoles` / `assignableOrgRoles` for the roles a picker offers, or the four `ORG_ROLE_*` constants.
20
+
- FROM `AUTH_INVITATION_STATUSES`, `isAuthInvitationStatus` TO the `AuthInvitationStatus` type; `AuthInvitation.status` already arrives narrowed from `createAuthClient`.
21
+
- FROM `AUTH_FIELD_LABEL_CLASS`, `AUTH_INPUT_CLASS`, `AuthCheckIcon`, `AuthDivider`, `AuthMailIcon` TO no replacement: the built-in forms apply them themselves; copy the class strings or icons if a custom form needs the same look.
refactor(plugin-detail)!: retire twenty-one zero-consumer exports (record-page synthesis, layout, related-card and timeline helpers, one hook and three types)
6
+
7
+
Clause-②: no (narrowing)
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-detail#queueClaimAdmitted, @object-ui/plugin-detail#extractLookupId, @object-ui/plugin-detail#TEXTUAL_REF_FALLBACK_TYPES, @object-ui/plugin-detail#inferDetailColumns, @object-ui/plugin-detail#applyAutoSpan, @object-ui/plugin-detail#applyDetailAutoLayout, @object-ui/plugin-detail#DetailTabsProps, @object-ui/plugin-detail#buildDefaultDiscussion, @object-ui/plugin-detail#buildDefaultTimeline, @object-ui/plugin-detail#deriveStages, @object-ui/plugin-detail#RECORD_PAGE_WIDE_MIN_WIDTH, @object-ui/plugin-detail#recordPageColumnOfTab, @object-ui/plugin-detail#RecordPageColumn, @object-ui/plugin-detail#useDefaultRecordPage, @object-ui/plugin-detail#relatedCountTargetOf, @object-ui/plugin-detail#filterTimelineStream, @object-ui/plugin-detail#RELATED_CARD_NEW_BADGE_MS, @object-ui/plugin-detail#editRelatedArrangement, @object-ui/plugin-detail#relatedCardId, @object-ui/plugin-detail#relatedDefaultOrderHash, @object-ui/plugin-detail#RelatedArrangementEdit) the retired operands are pure helpers of the synthesized record page, its layout and its related cards, one React context hook, and three TypeScript types; nothing in the workspace or in hotcrm imports any of them from the package entry, 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 -->
11
+
12
+
**BREAKING** for a host that imports any of these twenty-one names from `@object-ui/plugin-detail`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package and keeps its in-package readers (the record page synthesizer, `DetailView`, `RecordPageColumns`, the related cards and the timeline stream); only the entry stops publishing them. Everything else on the entry, including `buildDefaultPageSchema`, `buildDefaultTabs`, `isWideFieldType`, `InlineFieldInput`, `recordSitsInQueue`, `DefaultRecordPageContext`, `prefetchRelatedCounts`, `relatedCountTargetsIn`, `mergeTimelineStream`, `resolveRelatedArrangement` and the `RelatedArrangement` / `RecordPageTier` / `DefaultPageColumns` types, stays exported unchanged.
13
+
14
+
What leaves, and what to write instead:
15
+
16
+
- FROM `buildDefaultDiscussion`, `buildDefaultTimeline`, `deriveStages` TO `buildDefaultPageSchema`, which builds the whole default record page including its discussion, timeline and stage path.
17
+
- FROM `RECORD_PAGE_WIDE_MIN_WIDTH`, `recordPageColumnOfTab`, `RecordPageColumn` TO `recordPageTierFor` and `buildDefaultPageColumns`, which place the page's tabs into columns for a width.
18
+
- FROM `inferDetailColumns`, `applyAutoSpan`, `applyDetailAutoLayout` TO `DetailView`, which lays out its sections itself; `isWideFieldType` stays.
19
+
- FROM `extractLookupId`, `TEXTUAL_REF_FALLBACK_TYPES` TO `InlineFieldInput`, which reads lookup values itself.
20
+
- FROM `queueClaimAdmitted` TO `useQueueClaimOffered`, which answers whether the Claim button shows.
21
+
- FROM `useDefaultRecordPage` TO `DefaultRecordPageContext` with `useContext`.
22
+
- FROM `relatedCountTargetOf` TO `relatedCountTargetsIn`.
23
+
- FROM `filterTimelineStream` TO `mergeTimelineStream`; the timeline panel applies its filter chips itself.
24
+
- FROM `RELATED_CARD_NEW_BADGE_MS`, `editRelatedArrangement`, `relatedCardId`, `relatedDefaultOrderHash`, `RelatedArrangementEdit` TO `resolveRelatedArrangement` with `relatedArrangementFromRecord` / `relatedArrangementToRecord`; the related cards edit and badge the arrangement themselves.
25
+
- FROM `DetailTabsProps` TO `DetailViewProps`: `DetailTabs` is not on the entry, `DetailView` renders it.
0 commit comments