Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/39057-setup-platform-items-regrouped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@objectstack/platform-objects': patch
'@objectstack/service-settings': patch
---

Setup's platform-owned entries sit in their new groups, in the new order, under the new names; every old name stays searchable

Clause-②: no
Metadata-protocol: none

Setup's navigation was regrouped into ten groups (#39050). The entries `@objectstack/platform-objects` contributes now name the new group ids directly, so none of them draws the `nav_contribution_group_renamed` notice:

- **Users & Organization:** Company Information (first), Users, Invitations, Teams, Business Units, Organizations, then the active organization's page.
- **Access & Sharing:** Positions and Permissions. **Apps & AI:** Installed Apps, AI Model Service. **Audit & Data:** Recycle Bin, Data Retention, File Storage. **Company Settings:** Language & Region, Working Calendars, Holidays & Workday Swaps. **Currency & Units:** Exchange Rates, Units of Measure, Standard Unit Decimals. **Notifications:** Email Channel, SMS Channel, Delivery Log. **Login & Security:** Sign-in Methods, Access policy, Active Sessions. **Integrations & Developer:** API Keys, OAuth Applications, Public Forms.

Renamed, in every shipped locale: Packages → Installed Apps, Company → Company Information, Localization → Language & Region, Standard Unit Settings → Standard Unit Decimals, Calendar Exceptions → Holidays & Workday Swaps, Mail Delivery → Email Channel, SMS Delivery → SMS Channel, Authentication → Sign-in Methods, AI & Embedder → AI Model Service, Data Lifecycle → Data Retention, Notification Events → Delivery Log, Sessions → Active Sessions. The translated locales also rename four entries other packages contribute: Position Holders, Permission Set Assignment, Record Shares and Queues (their English label changes with each plugin's own entry).

Every renamed entry keeps its former name as a search alias (`keywords`): the source-language name on the entry, each locale's former name on that locale's bundle entry. Business Units carries Department / Organization Structure / Division (部门 / 组织架构 / 事业部), and each group that took a retired group over carries that group's former name.

The settings pages' own titles, and their cards on the settings hub, carry the same new names in every shipped locale (`@objectstack/service-settings`), so a page opens under the name its Setup entry shows: Mail Delivery → Email Channel, Localization → Language & Region, and likewise for Company, Authentication, SMS Delivery, AI & Embedder and Data Lifecycle.

"All Settings" (`nav_settings_hub`) left the navigation: every settings page has its own entry, and the command palette finds them. Its address, `/apps/setup/system/settings`, still opens the settings hub.

No action needed: nothing an app author writes changes. A third-party contribution that still names a retired group id keeps landing in the group that took it over.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ open/paid resolver seam). It did **not** settle how the three org-shaped objects
- `sys_team` (better-auth) — the **flat collaboration grouping**.

Left unaddressed, all three land flat in the Setup `group_people_org` menu
(`packages/platform-objects/src/apps/setup-nav.contributions.ts#group_people_org`) and read as three
(`packages/platform-objects/src/apps/setup.app.ts#group_people_org`) and read as three
competing "organisation" concepts — the ambiguity is sharpest in a single-tenant install,
where `sys_organization` is a single, un-creatable row. This addendum closes that gap. One
decision per gap (ADR-0049 discipline); no model change, only surfacing + one denormalised
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/test/connect-agent-both-halves-wire.pin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,9 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', (
// `branding` namespace, offered only where no organization wall stands,
// and this harness composes platform-objects and the MCP bundle alone.
expect(allowedIds).toContain('nav_packages');
// `group_apps` retired into `group_apps_ai` through `renamedFrom` (#39053).
expect(groupChildren(setupAllowed.body?.item, 'group_apps_ai')).toEqual(['nav_packages']);
// Apps & AI as this composition serves it: Installed Apps, then AI
// Model Service (#39057).
expect(groupChildren(setupAllowed.body?.item, 'group_apps_ai')).toEqual(['nav_packages', 'nav_settings_ai']);
expect(allowedIds).toContain('nav_public_forms');
// #37087 — the id is Setup's alone now: Studio's entry of the same id
// is retired with the console page it opened (`developer:public-forms`).
Expand Down
38 changes: 26 additions & 12 deletions packages/cli/test/setup-diagnostics-audience.pin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
//
// The gate moved off the group and onto the entries: Audit Log on
// `view_all_audit_log`, Sessions and Notification Events on the
// `manage_platform_settings` the group carried. Read over the wire, per caller:
// `manage_platform_settings` the group carried. Since Setup was regrouped
// (epic #39050, #39057) the three sit in three groups — Audit Log in Audit &
// Data, Active Sessions in Login & Security, Delivery Log in Notifications —
// and each still carries its own gate. Read over the wire, per caller:
//
// - `view_all_audit_log` alone → Diagnostics holds Audit Log, only;
// - `manage_platform_settings` alone → Sessions and Notification Events, and
// - `view_all_audit_log` alone → Audit Log, only, in Audit & Data;
// - `manage_platform_settings` alone → Active Sessions and Delivery Log, and
// NOT Audit Log (no entry reaches a
// member who lacks its own gate);
// - neither → no Diagnostics group at all;
// - neither → none of the three;
// - the platform administrator → all three, as before.
//
// ---------------------------------------------------------------------------
Expand All @@ -44,10 +47,13 @@ import { ADMIN_FULL_ACCESS_CAPABILITIES } from '@objectstack/spec';

type AnyRec = Record<string, any>;

// [#39053] The served anchor: `group_diagnostics` retired into it through
// `renamedFrom`, and the contributions below still name the old id.
// [#39053] The served anchor `group_diagnostics` retired into; the Audit Log
// entry lands here. The two platform-settings entries moved out (#39057).
const GROUP = 'group_audit_data';

/** The three entries the retired Diagnostics group held. */
const FORMER_DIAGNOSTICS = ['nav_audit_logs', 'nav_notifications', 'nav_sessions'] as const;

/**
* The manifests a plugin registers from `init()`, captured off a context that
* serves exactly the `manifest` service, with inert stand-ins for the rest of
Expand Down Expand Up @@ -152,27 +158,35 @@ function allIds(items: AnyRec[] | undefined): string[] {
return (items ?? []).flatMap((i) => [String(i?.id), ...allIds(i?.children)]);
}

/** Which of the former Diagnostics entries the caller is served, anywhere in Setup. */
function servedFormerDiagnostics(app: AnyRec): string[] {
const ids = new Set(allIds(app?.navigation));
return FORMER_DIAGNOSTICS.filter((id) => ids.has(id));
}

describe('Setup → Diagnostics: each entry is served to the holders of its own gate', () => {
it('a member holding view_all_audit_log, and no platform-settings power, is served the Audit Log entry', async () => {
const setup = await servedSetup(['setup.access', 'view_all_audit_log']);
expect(diagnostics(setup)).toEqual(['nav_audit_logs']);
expect(servedFormerDiagnostics(setup)).toEqual(['nav_audit_logs']);
// First in Audit & Data; the ungated Recycle Bin follows it.
expect(diagnostics(setup)?.[0]).toBe('nav_audit_logs');
});

it('a member without view_all_audit_log is not served the Audit Log entry, anywhere in Setup', async () => {
const settingsOnly = await servedSetup(['setup.access', 'manage_platform_settings']);
expect(diagnostics(settingsOnly)?.sort()).toEqual(['nav_notifications', 'nav_sessions']);
expect(allIds(settingsOnly.navigation)).not.toContain('nav_audit_logs');
expect(servedFormerDiagnostics(settingsOnly)).toEqual(['nav_notifications', 'nav_sessions']);
expect(diagnostics(settingsOnly)).not.toContain('nav_audit_logs');

const neither = await servedSetup(['setup.access']);
expect(diagnostics(neither)).toBeUndefined();
expect(allIds(neither.navigation)).not.toContain('nav_audit_logs');
expect(servedFormerDiagnostics(neither)).toEqual([]);
// Control: the app itself is served to this member, so the absence above
// is the entry's gate and not a withheld app.
expect(allIds(neither.navigation).length).toBeGreaterThan(0);
});

it('the platform administrator is served all three entries, as before', async () => {
const admin = await servedSetup(ADMIN_FULL_ACCESS_CAPABILITIES.systemPermissions ?? []);
expect(diagnostics(admin)?.sort()).toEqual(['nav_audit_logs', 'nav_notifications', 'nav_sessions']);
expect(servedFormerDiagnostics(admin)).toEqual(['nav_audit_logs', 'nav_notifications', 'nav_sessions']);
expect(diagnostics(admin)?.[0]).toBe('nav_audit_logs');
});
});
Loading
Loading