Skip to content

refactor(auth,plugin-detail)!: retire 33 zero-consumer entry exports - #30629

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rr6ip0
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rr6ip0

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

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

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind. (no names added)
  • 3. No formatter ran; pnpm lint passes. (CI)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (the 维护者速读 block is the fleet's required Chinese summary)
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code


Generated by Claude Code

Barrel batch 3 of the zero-consumer sweep: @object-ui/auth stops
exporting 12 names and @object-ui/plugin-detail 21, each with no
importer outside its package (workspace and hotcrm), not taught in the
package README, and not reached by a kept export's signature. Every
module stays; only the entry lines change. One `!` patch changeset per
package names each retired operand.

Claude-Session: https://claude.ai/code/session_01L6bhgT8zkQTEh2HjcmxipS
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 5, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#6 · os-sales · session_01L6bhgUR8Nu4M7tbtgES7q2

维护者速读

席位核对 — ACCEPT · head 79ddb13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant