Skip to content

feat(platform-objects): drop unused team kind from sys_business_unit (ADR-0057 D11)#2143

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/adr-0057-ps1-bu-kind
Jun 21, 2026
Merged

feat(platform-objects): drop unused team kind from sys_business_unit (ADR-0057 D11)#2143
xuyushun441-sys merged 1 commit into
mainfrom
feat/adr-0057-ps1-bu-kind

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

First implementation increment of the ADR-0057 addendum (#2141) — PS-1 / D11.

What

Drops the unused team value from sys_business_unit.kind:
company | division | department | ~~team~~ | office | cost_center.

Why

kind='team' collided head-on with the first-class sys_team object — a
kind='team' business unit walks the hierarchical BusinessUnitGraphService, while
sys_team is the flat better-auth collaboration grouping served by TeamGraphService.
Two "team" concepts with different semantics and no UI distinction; this was the single
largest source of the "teams vs business units feel redundant" ambiguity the addendum
set out to remove.

Safety

  • kind is a display-only categorisation hint ("does not change graph semantics").
  • Zero kind: 'team' usages anywhere in the repo (seeds, showcase, tests) → no data migration.
  • bu-rename-consistency.test.ts is scoped to labels and explicitly excludes kind, so it is unaffected.
  • The team picklist labels are removed from the 4 generated locale bundles (en/zh-CN/ja-JP/es-ES), matching what os i18n extract --merge produces.

Changeset: @objectstack/platform-objects minor (schema narrowing, non-breaking in practice).

Follow-ups (not in this PR)

  • PS-2 / D10 — relocate nav_business_units to the hierarchy-security capability + gate nav_organizations/nav_invitations on multiOrgEnabled (needs a visible/requiresFeature predicate on NavigationItem first; the nav-render side may touch the console repo).
  • PS-3 / D12sys_user.primary_business_unit_id projection for "pick people by BU".

🤖 Generated with Claude Code

…t (ADR-0057 addendum D11)

kind='team' collided head-on with the first-class sys_team object (hierarchical BusinessUnitGraphService vs flat TeamGraphService). kind is a display-only categorisation hint with zero repo usages, so narrow it to company|division|department|office|cost_center and drop the team picklist labels from the 4 generated locale bundles. No data migration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 3:54pm

Request Review

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/platform-objects.

3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/packages.mdx (via @objectstack/platform-objects)
  • content/docs/concepts/setup-app.mdx (via @objectstack/platform-objects)
  • content/docs/guides/packages.mdx (via @objectstack/platform-objects)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@xuyushun441-sys
xuyushun441-sys merged commit 7108ff3 into main Jun 21, 2026
16 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the feat/adr-0057-ps1-bu-kind branch June 21, 2026 15:58
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants