From 44341fba4395c4f0fb6ca71ac6fe2fbc2967f52b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 12:33:51 +0000 Subject: [PATCH 01/10] feat(studio): permissions page speaks business wording, bulk strip always shown Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- .../metadata-admin/PermissionMatrixEditor.tsx | 76 ++++++++++------ .../studio-design/StudioDesignSurface.tsx | 27 ++++-- ui/packages/i18n/src/locales/en.ts | 2 +- ui/packages/i18n/src/locales/zh-Hans.ts | 2 +- ui/packages/i18n/src/locales/zh-Hant.ts | 2 +- ui/packages/i18n/src/namespaces/studio/en.ts | 91 +++++++++---------- ui/packages/i18n/src/namespaces/studio/zh.ts | 89 +++++++++--------- 7 files changed, 157 insertions(+), 132 deletions(-) diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx index ec1c853867f..ee6587432ab 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx @@ -105,7 +105,6 @@ import { import { useDraftAutoSave, type DraftSend } from '../studio-design/useDraftAutoSave.js'; // objectui#12456 — the Studio Access pillar's presentation draws the shared item header. import { StudioItemHeader, StudioTab } from '../studio-design/StudioItemHeader.js'; -import { STUDIO_KIND_CHIP } from '../studio-design/studio-tokens.js'; import type { CustomizationMarkKind } from '../studio-design/customizationMarks.js'; import { useDisplayLocale } from '@object-ui/i18n'; import { @@ -535,6 +534,11 @@ export interface PermissionStudioChrome { chips?: React.ReactNode; /** Before History in the header's actions (the pillar's Explain access). */ actions?: React.ReactNode; + /** + * objectstack#34795 — the open app's name. The header's title reads + * "app · set label"; without it, the set's label alone. + */ + appLabel?: string; /** * objectstack#32774 — told, for the set `name` this editor shows, the * package the clone door must name to copy it (`holdingPackage` of the @@ -2308,26 +2312,35 @@ export function PermissionMatrixEditPage({ type, name, packageId, onDraftSaved, const chipButton = 'inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md border px-2.5 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground'; const facetTab = chrome.tab === 'rls' || chrome.tab === 'tabs' || chrome.tab === 'admin' ? chrome.tab : null; + // objectstack#34795 — the title is "app · set label", in the title row + // alone, so it is not cut: the set's machine name is the title's tooltip, + // and the provenance, default and lock labels are the line under it. + const setLabel = headerLabel || name; + const studioTitle = chrome.appLabel ? `${chrome.appLabel} · ${setLabel}` : setLabel; return (
- {/* The provenance chip in the artboard's kind-chip look; same - test id and the same answer as the page's badge. */} - + title={studioTitle} + titleProps={{ title: name, 'data-testid': 'perm-studio-title' }} + note={ + + {/* Same test id and the same answer as the page's badge. */} + {shippedByPackage ? t('perm.badge.package') : t('perm.badge.custom')} - {!!draft.isDefault && {t('perm.badge.default')}} + {!!draft.isDefault && ( + <> + + {t('perm.badge.default')} + + )} {/* A host-locked package says so in the pillar's note; the other gates (type, artifact, wall) keep their own badge. */} {!readOnly && lockBadgeEl} - + } meta={meta} actions={ @@ -2442,11 +2455,6 @@ export function PermissionMatrixEditPage({ type, name, packageId, onDraftSaved, onOpenOwd={onOpenOwd} /> - {writable && ( -

- {t('engine.studio.access.bulkHint')} -

- )}
diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.artifactTier.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.artifactTier.test.tsx index 8b64ca9625a..7a4fcd9343d 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.artifactTier.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.artifactTier.test.tsx @@ -51,6 +51,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, render, screen, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -185,7 +189,7 @@ describe('PermissionMatrixEditPage — the ARTIFACT tier locks an env-scope over expect(screen.getByLabelText('a_account Read')).toBeDisabled(); for (const box of screen.getAllByRole('checkbox')) expect(box).toBeDisabled(); const row = screen.getByText('Account').closest('tr')!; - for (const n of ['R', 'CRUD', 'All', 'None']) { + for (const n of ['Read only', 'Read & write', 'All', 'None']) { expect(within(row).getByRole('button', { name: n })).toBeDisabled(); } }); @@ -276,7 +280,7 @@ describe('PermissionMatrixEditPage — MUST NOT CHANGE: what the artifact tier m expect(screen.queryByRole('button', { name: /^Save$/ })).toBeNull(); expect(screen.getByLabelText('a_account Read')).toBeEnabled(); const row = screen.getByText('Account').closest('tr')!; - for (const n of ['R', 'CRUD', 'All', 'None']) { + for (const n of ['Read only', 'Read & write', 'All', 'None']) { expect(within(row).getByRole('button', { name: n })).toBeEnabled(); } expect(lockBadge()).toBeNull(); @@ -399,7 +403,7 @@ describe('PermissionMatrixEditPage — the artifact verdict asks ADR-0010 proven expect(screen.getByRole('button', { name: /^Save$/ })).toBeEnabled(); expect(screen.getByLabelText('a_account Read')).toBeEnabled(); const row = screen.getByText('Account').closest('tr')!; - for (const n of ['R', 'CRUD', 'All', 'None']) { + for (const n of ['Read only', 'Read & write', 'All', 'None']) { expect(within(row).getByRole('button', { name: n })).toBeEnabled(); } expect(lockBadge()).toBeNull(); diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.bulkMergeKeys.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.bulkMergeKeys.test.tsx index 61bcce22fa0..518350de8a6 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.bulkMergeKeys.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.bulkMergeKeys.test.tsx @@ -50,6 +50,10 @@ */ import { describe, it, expect, vi, afterEach } from 'vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { render, screen, cleanup, fireEvent, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -193,7 +197,7 @@ describe('PermissionMatrixEditor · bulk buttons vs unmodelled keys (objectui#66 }, }); - fireEvent.click(bulkButton('a_account', 'CRUD')); + fireEvent.click(bulkButton('a_account', 'Read & write')); const payload = await save(server); const row = payload.objects.a_account; @@ -221,7 +225,7 @@ describe('PermissionMatrixEditor · bulk buttons vs unmodelled keys (objectui#66 }, }); - fireEvent.click(bulkButton('a_account', 'R')); + fireEvent.click(bulkButton('a_account', 'Read only')); const payload = await save(server); const row = payload.objects.a_account; diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.columnHeaders-29729.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.columnHeaders-29729.test.tsx index cc1d8c3556c..5b5c0aec911 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.columnHeaders-29729.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.columnHeaders-29729.test.tsx @@ -24,6 +24,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import * as React from 'react'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, render, screen, within } from '@testing-library/react'; @@ -144,6 +148,6 @@ describe("Setup's sharing-model chip reads through the catalogue (objectstack#29 it('CONTROL — en keeps "OWD {value}"', async () => { mount('en', 'setup'); - expect(await screen.findByText('OWD Private (default)')).toBeInTheDocument(); + expect(await screen.findByText('OWD Only the owner can see (default)')).toBeInTheDocument(); }); }); diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.exportColumn-26885.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.exportColumn-26885.test.tsx index c9a2a0b7a0c..563c9917f30 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.exportColumn-26885.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.exportColumn-26885.test.tsx @@ -20,6 +20,10 @@ */ import { describe, it, expect, vi, afterEach } from 'vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { render, screen, cleanup, fireEvent, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -161,7 +165,7 @@ describe('the bulk buttons leave Export as it is (objectstack#26885)', () => { }); }); - for (const label of ['R', 'CRUD', 'All']) { + for (const label of ['Read only', 'Read & write', 'All']) { it(`"${label}" keeps a granted Export ticked`, async () => { const server = await renderSet({ crm_case: { allowRead: true, allowExport: true } }); fireEvent.click(bulk(label)); diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.gridChrome-27866.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.gridChrome-27866.test.tsx index c656aa67cc0..5dd4adbaaaa 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.gridChrome-27866.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.gridChrome-27866.test.tsx @@ -16,6 +16,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -88,8 +92,11 @@ async function renderPage(studio = false) { await screen.findByRole('button', { name: objectButton('a_project') }, { timeout: 5000 }); } -/** An object row's expand button: its label, then its API name. */ -const objectButton = (name: string) => new RegExp(`^${name === 'a_project' ? 'Project' : 'Task'}\\W*${name}\\W*$`); +/** + * An object row's expand button: its label, then its API name — on the Studio + * Objects tab the label alone, the API name its tooltip (objectstack#34795). + */ +const objectButton = (name: string) => new RegExp(`^${name === 'a_project' ? 'Project' : 'Task'}(\\W*${name}\\W*)?$`); async function expand() { fireEvent.click(screen.getByRole('button', { name: objectButton('a_project') })); diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.objectGrantInherited-27010.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.objectGrantInherited-27010.test.tsx index f4bcefdf746..83dbc839214 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.objectGrantInherited-27010.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.objectGrantInherited-27010.test.tsx @@ -14,6 +14,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -257,7 +261,7 @@ describe('every object-row control writes only what the admin sees change (objec it('the R shortcut on an inherited row merges from the `*` entry; None writes an empty entry of its own', async () => { const server = await renderSet({ '*': { ...CRUD, allowExport: true } }); const projectRow = rowOf('a_project'); - fireEvent.click(within(projectRow).getByRole('button', { name: 'R' })); + fireEvent.click(within(projectRow).getByRole('button', { name: 'Read only' })); const taskRow = rowOf('a_task'); fireEvent.click(within(taskRow).getByRole('button', { name: 'None' })); // On screen: a_task now draws its own empty entry, nothing checked. diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.packageDoorFacets.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.packageDoorFacets.test.tsx index 1c7027f8051..9b36ae5e137 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.packageDoorFacets.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.packageDoorFacets.test.tsx @@ -21,6 +21,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -135,7 +139,7 @@ function openFacet(title: string) { * through the real facet editors — the card's reproduction, minus the browser. */ async function authorEveryFacet() { - openFacet('Row-Level Security'); + openFacet('Record Scope Rules'); fireEvent.click(await screen.findByRole('button', { name: /Add policy/ })); fireEvent.change(await screen.findByPlaceholderText('Policy name'), { target: { value: 'qa_st2_rls' }, @@ -145,7 +149,7 @@ async function authorEveryFacet() { }); fireEvent.change(screen.getByPlaceholderText(USING_PLACEHOLDER), { target: { value: USING } }); - openFacet('Tab Visibility'); + openFacet('Menu Visibility'); // The visibility picker is the shared Select (objectui#11865): open it and pick, as a user does. fireEvent.keyDown(await screen.findByTestId('tab-visibility-a_account'), { key: 'ArrowDown' }); fireEvent.click(within(await screen.findByRole('listbox')).getByRole('option', { name: 'Hidden' })); diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.readonly.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.readonly.test.tsx index 3ee88e115c9..0c3683a2fca 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.readonly.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.readonly.test.tsx @@ -49,6 +49,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -176,7 +180,7 @@ describe('PermissionMatrixEditPage — read-only package gate (host readOnly)', } // …and so are the row bulk-set buttons. const row = screen.getByText('Account').closest('tr')!; - for (const name of ['R', 'CRUD', 'All', 'None']) { + for (const name of ['Read only', 'Read & write', 'All', 'None']) { expect(within(row).getByRole('button', { name })).toBeDisabled(); } @@ -265,7 +269,7 @@ describe('PermissionMatrixEditPage — type-level gate keeps its own wording', ( // Row bulk-set buttons are live too — `writable` drives all of them. const row = screen.getByText('Account').closest('tr')!; - for (const name of ['R', 'CRUD', 'All', 'None']) { + for (const name of ['Read only', 'Read & write', 'All', 'None']) { expect(within(row).getByRole('button', { name })).toBeEnabled(); } diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.scope.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.scope.test.tsx index bb6c19c8861..8dfc93e7d2d 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.scope.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.scope.test.tsx @@ -17,6 +17,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdict-26858.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdict-26858.test.tsx index 09ebf5c1be3..bbaea513391 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdict-26858.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdict-26858.test.tsx @@ -15,6 +15,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -96,7 +100,7 @@ async function openPackageDoor(server: Server) { , ); await screen.findByText('a_account'); - fireEvent.click(screen.getByRole('button', { name: /Row-Level Security/ })); + fireEvent.click(screen.getByRole('button', { name: /Record Scope Rules/ })); } const policy = (using: string) => ({ diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdictHold-27482.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdictHold-27482.test.tsx index 254bc93c609..773abfb9692 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdictHold-27482.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.serverVerdictHold-27482.test.tsx @@ -14,6 +14,10 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/formula'; +import '@objectstack/lint'; +import '@objectstack/spec/identity'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -112,7 +116,7 @@ async function openPackageDoor(server: Server) { , ); await screen.findByText('a_account'); - fireEvent.click(screen.getByRole('button', { name: /Row-Level Security/ })); + fireEvent.click(screen.getByRole('button', { name: /Record Scope Rules/ })); } const edit = (placeholder: string, value: string) => diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectSettingsPanel.test.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectSettingsPanel.test.tsx index fa5553aab3d..d634cfada62 100644 --- a/ui/packages/app-shell/src/views/studio-design/ObjectSettingsPanel.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/ObjectSettingsPanel.test.tsx @@ -69,7 +69,7 @@ describe('ObjectSettingsPanel — record sharing (OWD)', () => { expect(desc.textContent).toMatch(/security-owd-unset/); // The runtime fallback is still stated — it is what makes `private` the // safe pick — but as context, not as an all-clear. - expect(desc.textContent).toMatch(/Private/); + expect(desc.textContent).toMatch(/Only the owner can see/); // Styled as a problem. expect(desc.className).toMatch(/amber/); }); diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessCreateTaken-26836.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessCreateTaken-26836.test.tsx index 4b5eac18929..713d0aede49 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessCreateTaken-26836.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessCreateTaken-26836.test.tsx @@ -26,6 +26,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -256,8 +258,8 @@ describe('objectstack#26836 — "+ New" over a taken identifier', () => { expect(opts).toMatchObject({ mode: 'draft', packageId: PKG, ifNoneMatch: '*', surface: 'studio' }); expect(toast.success).toHaveBeenCalledWith(tFormat('engine.studio.access.created', 'en', { label: 'Project Viewer' })); await waitFor(() => expect(screen.queryByRole('dialog')).toBeNull()); - expect(await rail().findByText('project_viewer')).toBeInTheDocument(); - await waitFor(() => expect(header().getByText('project_viewer')).toBeInTheDocument()); + expect(await rail().findByTitle('project_viewer')).toBeInTheDocument(); + await waitFor(() => expect(header().getByTitle('project_viewer')).toBeInTheDocument()); }); }); @@ -281,7 +283,7 @@ describe('objectstack#26836 — discarding a set\'s pending draft', () => { expect(toast.success).toHaveBeenCalledWith(tFormat('engine.edit.draftDiscarded', 'en', { item: 'Project Editor' })); expect(await screen.findByText('1 object granted · 0 field overrides')).toBeInTheDocument(); - expect(rail().getByText('project_editor')).toBeInTheDocument(); + expect(rail().getByTitle('project_editor')).toBeInTheDocument(); await waitFor(() => expect(screen.queryByTestId('access-discard-draft')).toBeNull()); expect(clientImpl.save).not.toHaveBeenCalled(); }); @@ -292,12 +294,12 @@ describe('objectstack#26836 — discarding a set\'s pending draft', () => { drafts: { project_viewer: { pkg: PKG, body: { name: 'project_viewer', label: 'Project Viewer', objects: {} } } }, }); renderAccess(); - fireEvent.click(await rail().findByText('project_viewer', undefined, { timeout: 8000 })); + fireEvent.click(await rail().findByTitle('project_viewer', undefined, { timeout: 8000 })); fireEvent.click(await header().findByTestId('access-discard-draft')); expect(window.confirm).toHaveBeenCalledWith( tFormat('engine.studio.access.discardConfirmUnpublished', 'en', { item: 'Project Viewer' }), ); - await waitFor(() => expect(rail().queryByText('project_viewer')).toBeNull()); + await waitFor(() => expect(rail().queryByTitle('project_viewer')).toBeNull()); expect(clientImpl.reset.mock.calls[0].slice(0, 3)).toEqual(['permission', 'project_viewer', { state: 'draft', packageId: PKG }]); // The rail's remaining set opens in its place. expect(await screen.findByText('1 object granted · 0 field overrides')).toBeInTheDocument(); diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessGuard.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessGuard.test.tsx index c73ed8ffb1a..9de8104f72c 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessGuard.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessGuard.test.tsx @@ -21,6 +21,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, within, waitFor } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -158,7 +160,7 @@ async function renderPillarOnSetA() { const inSetHeader = () => within(screen.getByTestId('access-item-header')); // The header is re-queried on each retry: the pillar's own header stands in // while no set is open, and the set's header replaces it once the page loads. -const findInSetHeader = (text: string) => waitFor(() => inSetHeader().getByText(text)); +const findInSetHeader = (name: string) => waitFor(() => inSetHeader().getByTitle(name)); /** Flip a cell in the open matrix so the editor reports dirty. */ function dirtyTheMatrix() { @@ -179,7 +181,7 @@ describe('AccessPillar — unsaved matrix edits guard', () => { expect(confirmSpy).toHaveBeenCalledTimes(1); // Still on set A, and the edit survived (row "None" left Read unchecked — // a remount would have reloaded allowRead: true). - expect(inSetHeader().getByText('set_a')).toBeInTheDocument(); + expect(inSetHeader().getByTitle('set_a')).toBeInTheDocument(); const row = screen.getByText('a_account').closest('tr')!; expect(within(row).getByRole('checkbox', { name: 'a_account Read' })).not.toBeChecked(); diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessPairCopy-29674.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessPairCopy-29674.test.tsx index cb39968c806..ebd2602dc1b 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessPairCopy-29674.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessPairCopy-29674.test.tsx @@ -27,6 +27,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; @@ -224,7 +226,7 @@ const objectListReads = () => .map((r) => new URL(r, 'http://localhost').searchParams.get('package')); async function copyOpen(): Promise { - await waitFor(() => expect(within(header()).getByText('My contributor')).toBeInTheDocument(), { timeout: 8000 }); + await waitFor(() => expect(within(header()).getByText(/(^|· )My contributor$/)).toBeInTheDocument(), { timeout: 8000 }); await waitFor(() => expect(within(matrix()).getByText('Showcase account')).toBeInTheDocument(), { timeout: 8000 }); } @@ -269,7 +271,7 @@ describe('a "New similar" copy in the pair shows the grants it holds on the base describe('CONTROL: the base’s own set (objectstack#29674)', () => { it('lists the base’s objects, reads no pair object list, and keeps the base’s note', async () => { renderAccess(BASE_SET.name); - await waitFor(() => expect(within(header()).getByText('Contributor')).toBeInTheDocument(), { timeout: 8000 }); + await waitFor(() => expect(within(header()).getByText(/(^|· )Contributor$/)).toBeInTheDocument(), { timeout: 8000 }); await waitFor(() => expect(within(matrix()).getByText('Showcase account')).toBeInTheDocument(), { timeout: 8000 }); await waitFor(() => expect(header()).toHaveTextContent(countsText(8, 3))); expect(objectListReads().filter((p) => p === PAIR)).toEqual([]); @@ -307,14 +309,14 @@ describe('the header’s provenance chip follows the rail’s mark (objectstack# it('a set created in the pair: Custom in the header, Added in the rail', async () => { srv.pairDrafts.set(`permission/${CREATED}`, { name: CREATED, label: 'Pair auditor', objects: {}, fields: {} }); renderAccess(CREATED); - await waitFor(() => expect(within(header()).getAllByText(CREATED).length).toBeGreaterThan(0), { timeout: 8000 }); + await waitFor(() => expect(within(header()).getAllByTitle(CREATED).length).toBeGreaterThan(0), { timeout: 8000 }); await waitFor(() => expect(railMarkOf(CREATED)).toBe('added'), { timeout: 8000 }); expect(chip()).toHaveTextContent(t('perm.badge.custom', 'en')); }); it('CONTROL: the base’s own set reads Package, and its rail row carries no mark', async () => { renderAccess(BASE_SET.name); - await waitFor(() => expect(within(header()).getByText('Contributor')).toBeInTheDocument(), { timeout: 8000 }); + await waitFor(() => expect(within(header()).getByText(/(^|· )Contributor$/)).toBeInTheDocument(), { timeout: 8000 }); // The read has answered: the copy's row is marked, the base set's is not. await waitFor(() => expect(railMarkOf('My contributor')).toBe('added'), { timeout: 8000 }); expect(railMarkOf('Contributor')).toBeNull(); diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessRailLabels-11862.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessRailLabels-11862.test.tsx index 9bf9fd03632..7c06ba99f9f 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessRailLabels-11862.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessRailLabels-11862.test.tsx @@ -2,16 +2,17 @@ /** * objectui#11862 — the Access pillar's permission-set list shows a set's label - * as the primary text and its machine name as secondary text. + * as the primary text and its machine name as secondary information: since + * objectstack#34795 (the page shows no machine name) that is the row's tooltip. * * On the maintainer's word 「所有地方以标签为主,机器名只作为次要信息」: * - * - a set with a label reads as the label, with its machine name beneath it - * (small, monospace), and the row's accessible name stays the label; + * - a set with a label reads as the label, with its machine name as the + * tooltip, and the row's accessible name stays the label; * - CONTROL: a set with no label reads as its name alone, once; * - a set that exists only as a draft reads as the label its `_drafts` row * carries (objectstack-ai/objectstack#22200, ruling `6053526025` question 1), - * with its machine name beneath it. The label is read off that row: the + * with its machine name as the tooltip. The label is read off that row: the * set itself is not read for it; * - a draft's locale-map label reads in the designer locale, never as * `[object Object]`; @@ -20,6 +21,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, render, screen, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; @@ -88,13 +91,14 @@ function renderPillar() { ); } -describe('objectui#11862 — the permission-set list: label first, machine name second', () => { - it('a set with a label reads as the label, its machine name as secondary text', async () => { +// objectstack#34795 — the machine name is the row's tooltip, no longer its secondary text. +describe('objectui#11862 — the permission-set list: the label, the machine name its tooltip', () => { + it('a set with a label reads as the label, its machine name as the tooltip', async () => { renderPillar(); const row = await screen.findByRole('button', { name: 'Technician' }); expect(within(row).getByText('Technician')).toBeInTheDocument(); - expect(within(row).getByText('technician')).toHaveClass('font-mono', 'text-[10px]'); - expect(within(row).getByText('technician')).toHaveAttribute('aria-hidden', 'true'); + expect(within(row).queryByText('technician')).toBeNull(); + expect(within(row).getByTitle('technician')).toHaveTextContent('Technician'); }); it('CONTROL: a set with no label reads as its name alone, once', async () => { @@ -103,12 +107,12 @@ describe('objectui#11862 — the permission-set list: label first, machine name expect(within(row).getAllByText('field_lead')).toHaveLength(1); }); - it("a draft-only set reads as its `_drafts` row's label, its machine name as secondary text", async () => { + it("a draft-only set reads as its `_drafts` row's label, its machine name as the tooltip", async () => { renderPillar(); const row = await screen.findByRole('button', { name: 'Dispatcher' }); expect(within(row).getByText('Dispatcher')).toBeInTheDocument(); - expect(within(row).getByText('dispatcher')).toHaveClass('font-mono', 'text-[10px]'); - expect(within(row).getByText('dispatcher')).toHaveAttribute('aria-hidden', 'true'); + expect(within(row).queryByText('dispatcher')).toBeNull(); + expect(within(row).getByTitle('dispatcher')).toHaveTextContent('Dispatcher'); // Read off the row: the draft-only set is never read for its label. const reads = [...mockClient.layered.mock.calls, ...mockClient.getDraft.mock.calls, ...mockClient.get.mock.calls]; expect(reads.filter((call) => (call as unknown[])[1] === 'dispatcher')).toEqual([]); @@ -117,7 +121,7 @@ describe('objectui#11862 — the permission-set list: label first, machine name it("a draft's locale-map label reads in the designer locale", async () => { renderPillar(); const row = await screen.findByRole('button', { name: 'Night shift' }); - expect(within(row).getByText('night_shift')).toHaveClass('font-mono'); + expect(within(row).getByTitle('night_shift')).toHaveTextContent('Night shift'); expect(row).not.toHaveTextContent('[object Object]'); }); diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessTabs-12456.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessTabs-12456.test.tsx index 20c324bec01..ba6ef2134c3 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessTabs-12456.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessTabs-12456.test.tsx @@ -16,6 +16,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { act, cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessWording-34795.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessWording-34795.test.tsx index 0bc6cc320ba..77f28dd29bb 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessWording-34795.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessWording-34795.test.tsx @@ -22,6 +22,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarNavGuard.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarNavGuard.test.tsx index 775d8d47d6b..65c2d5bb964 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarNavGuard.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarNavGuard.test.tsx @@ -32,6 +32,8 @@ */ import '@testing-library/jest-dom/vitest'; +// The source under test reaches these through dynamic imports: their first load is paid at collection. +import '@objectstack/lint'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; @@ -210,7 +212,7 @@ async function clickAccessInNav() { const inSetHeader = () => within(screen.getByTestId('access-item-header')); // The header is re-queried on each retry: the pillar's own header stands in // while no set is open, and the set's header replaces it once the page loads. -const findInSetHeader = (text: string) => waitFor(() => inSetHeader().getByText(text)); +const findInSetHeader = (name: string) => waitFor(() => inSetHeader().getByTitle(name)); /** Swap the main panel to the (real) OWD overview and edit a row. */ async function dirtyTheOwdOverview() { @@ -246,7 +248,7 @@ describe('Studio header — unsaved pillar edits guard (#2600)', () => { fireEvent.click(screen.getByRole('link', { name: 'Interfaces' })); expect(confirmSpy).toHaveBeenCalledTimes(1); - expect(inSetHeader().getByText('set_a')).toBeInTheDocument(); + expect(inSetHeader().getByTitle('set_a')).toBeInTheDocument(); matrixEditSurvived(); // Confirming the same switch discards and lands on the Interfaces pillar. @@ -309,7 +311,7 @@ describe('Studio header — unsaved pillar edits guard (#2600)', () => { await clickAccessInNav(); expect(confirmSpy).not.toHaveBeenCalled(); - expect(inSetHeader().getByText('set_a')).toBeInTheDocument(); + expect(inSetHeader().getByTitle('set_a')).toBeInTheDocument(); matrixEditSurvived(); }); @@ -320,7 +322,7 @@ describe('Studio header — unsaved pillar edits guard (#2600)', () => { confirmSpy.mockReturnValueOnce(false); fireEvent.click(screen.getByTitle('Studio home')); expect(confirmSpy).toHaveBeenCalledTimes(1); - expect(inSetHeader().getByText('set_a')).toBeInTheDocument(); + expect(inSetHeader().getByTitle('set_a')).toBeInTheDocument(); matrixEditSurvived(); confirmSpy.mockReturnValueOnce(true); @@ -339,7 +341,7 @@ describe('Studio header — unsaved pillar edits guard (#2600)', () => { confirmSpy.mockReturnValueOnce(false); fireEvent.click(other); expect(confirmSpy).toHaveBeenCalledTimes(1); - expect(inSetHeader().getByText('set_a')).toBeInTheDocument(); + expect(inSetHeader().getByTitle('set_a')).toBeInTheDocument(); matrixEditSurvived(); // Confirming jumps to the other package (header re-labels; matrix reloads). From d524774e9a95f8d6b6c2d7e4298de6a53804bfe0 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 13:37:43 +0000 Subject: [PATCH 04/10] revert(i18n): leave the en pack's publish-refusal hint as it is Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- ui/packages/app-shell/src/preview/DraftChangesPanel.tsx | 2 +- .../preview/__tests__/DraftChangesPanel.securityLink.test.tsx | 2 +- .../__tests__/DraftChangesPanel.securityProblems.test.tsx | 2 +- ui/packages/i18n/src/locales/en.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx b/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx index d1b19863862..11548ecb0f8 100644 --- a/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx +++ b/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx @@ -1991,7 +1991,7 @@ export function DraftChangesPanel({

{t('preview.changes.securityBlockWhere', { - defaultValue: 'Fix it on the object under Settings → Who can see which records, then publish again.', + defaultValue: 'Fix it on the object under Settings → Record sharing, then publish again.', })}

diff --git a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx index e797ddbfaba..bccbf78d8c2 100644 --- a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx +++ b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx @@ -101,6 +101,6 @@ describe('DraftChangesPanel — reaching the object the publish door refuses (ob // And what #5418 shipped is intact: the item is still named, and the // sentence still says where to fix it. expect(block.textContent).toContain('object/crmext_visit'); - expect(block.textContent).toMatch(/Settings → Who can see which records/); + expect(block.textContent).toMatch(/Settings → Record sharing/); }); }); diff --git a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx index 3af1f21b564..c7f5878f350 100644 --- a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx +++ b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx @@ -82,7 +82,7 @@ describe('DraftChangesPanel — pre-publish security posture (objectui#5418)', ( // language (`SECURITY_RULE_TEXT`), not the ADR paragraph. expect(block.textContent).toMatch(/sharingModel/); // And where to go, which the toast never said. - expect(block.textContent).toMatch(/Settings → Who can see which records/); + expect(block.textContent).toMatch(/Settings → Record sharing/); }); it('reports without blocking — the server door stays the authority', async () => { diff --git a/ui/packages/i18n/src/locales/en.ts b/ui/packages/i18n/src/locales/en.ts index f7ccfd3831c..05de0782a93 100644 --- a/ui/packages/i18n/src/locales/en.ts +++ b/ui/packages/i18n/src/locales/en.ts @@ -4297,7 +4297,7 @@ const en = { securityBlockTitle: 'Publishing will be refused — {{count}} item(s) need a decision first', securityBlockTitle_one: 'Publishing will be refused — {{count}} item needs a decision first', securityBlockTitle_other: 'Publishing will be refused — {{count}} items need a decision first', - securityBlockWhere: 'Fix it on the object under Settings → Who can see which records, then publish again.', + securityBlockWhere: 'Fix it on the object under Settings → Record sharing, then publish again.', // The pre-publish security rows, by the rule id of the finding (DraftChangesPanel `SECURITY_RULE_TEXT`). securityRule: { owdUnset: 'No record-sharing baseline (sharingModel) is declared. The runtime falls back to private, but the baseline must be an authored decision.', From 30bbc688fb167d768d7945ffbf33c9c0b276c364 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 14:21:19 +0000 Subject: [PATCH 05/10] fix(studio): the record-visibility chip stays on one line; the overview names objects by label The plain sharing labels are longer than the old ones and wrapped inside the fixed-height chip. The package overview showed each object's machine name under its label; the name is now the label's tooltip. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- .../metadata-admin/PermissionMatrixEditor.tsx | 2 +- ...OwdOverviewPanel.objectName-34795.test.tsx | 63 +++++++++++++++++++ .../studio-design/PackageOwdOverviewPanel.tsx | 11 +++- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.objectName-34795.test.tsx diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx index ee6587432ab..f334a87c9be 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx @@ -3263,7 +3263,7 @@ function StudioObjectRow({ ({ toast: { success: vi.fn(), error: vi.fn() } })); + +import { PackageOwdOverviewPanel } from './PackageOwdOverviewPanel'; + +const OBJECTS: Record> = { + crm_account: { name: 'crm_account', label: '客户', sharingModel: 'public_read_write' }, + crm_contact: { name: 'crm_contact', label: '联系人', sharingModel: 'private' }, + crm_unlabelled: { name: 'crm_unlabelled', sharingModel: 'public_read' }, +}; + +function makeClient() { + return { + list: async (type: string) => + type === 'object' ? Object.entries(OBJECTS).map(([name, body]) => ({ name, label: body.label ?? name })) : [], + listDrafts: async () => [], + layered: async (_type: string, name: string) => ({ effective: OBJECTS[name] ?? {}, code: null }), + getDraft: async () => null, + save: async (_type: string, _name: string, body: Record) => body, + } as any; +} + +beforeEach(() => { + Element.prototype.scrollIntoView = vi.fn(); +}); +afterEach(cleanup); + +describe('PackageOwdOverviewPanel — object column (objectstack#34795)', () => { + it('shows the label alone and keeps the machine name as its tooltip', async () => { + render(); + const row = await screen.findByTestId('owd-row-crm_account'); + + const name = screen.getByTestId('owd-object-name-crm_account'); + expect(name.textContent).toBe('客户'); + expect(name).toHaveAttribute('title', 'crm_account'); + // The row's text carries no machine name; the control is the tooltip above. + expect(row.textContent).not.toContain('crm_account'); + expect(screen.getByTestId('owd-row-crm_contact').textContent).not.toContain('crm_contact'); + }); + + it('an object without a label shows its name once, with no tooltip repeating it', async () => { + render(); + await screen.findByTestId('owd-row-crm_unlabelled'); + const name = screen.getByTestId('owd-object-name-crm_unlabelled'); + expect(name.textContent).toBe('crm_unlabelled'); + expect(name).not.toHaveAttribute('title'); + }); +}); diff --git a/ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx b/ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx index 539240311d7..684612dff9b 100644 --- a/ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx +++ b/ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx @@ -575,7 +575,15 @@ export function PackageOwdOverviewPanel({ - {row.label} + {/* The object's label alone; its machine name is the + tooltip (objectstack#34795). */} + + {row.label} + {dirty && ( )} - {row.name} From 8edea22f149a507d2ace3cccbeca72c835a10da1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 15:30:01 +0000 Subject: [PATCH 06/10] fix(studio): keep the bulk buttons in view when the matrix scrolls sideways At 1440 px the Studio matrix is wider than its pane, so the always-shown strip's third and fourth buttons sat past the right edge. The bulk column is now pinned to the right edge, as the Object column is to the left. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- .../34795-studio-permissions-wording.md | 2 +- .../metadata-admin/PermissionMatrixEditor.tsx | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.changeset/34795-studio-permissions-wording.md b/.changeset/34795-studio-permissions-wording.md index d6e3dba6fa5..2cbdb09101a 100644 --- a/.changeset/34795-studio-permissions-wording.md +++ b/.changeset/34795-studio-permissions-wording.md @@ -15,6 +15,6 @@ Studio's permissions page now reads in the words an app builder uses, in zh-CN a - **The open set's title is "app · set label".** The set's machine name moves to the title's tooltip, and the provenance, default and lock labels move to the line under the title. The rail row shows the set's label, with the machine name as its tooltip. - **Plain terms.** "记录共享模型(OWD)" ("Record sharing (OWD)") is now "谁能看到哪些记录" ("Who can see which records"). The values read "只有负责人能看 / 所有人能看 / 所有人都能看和改" ("Only the owner can see / Everyone can see / Everyone can see and edit"), and "受父级控制 → {master}" reads "跟随所属的{master}" ("Follows its {master}"). The stored `sharingModel` values do not change. The tabs read "对象权限 / 系统功能 / 数据范围规则 / 菜单可见" ("Object permissions / System features / Record scope rules / Menu visibility"). - **The bulk buttons show on every row**, not only on the row under the pointer, as "全选 · 只读 · 清空" ("All · Read only · None"), then the CRUD set as a fourth button ("增删改查", "Read & write"). Each button writes what All / R / None / CRUD wrote before. The footnote that explained the hidden buttons is gone. -- **An object row shows the object's label.** Its machine name is the tooltip. +- **An object row shows the object's label**, in the matrix and in the package's "who can see which records" overview. Its machine name is the tooltip. The record-visibility chip stays on one line now that its labels are longer. Setup's permission-set page reads some of the same strings, so it changes too: the bulk buttons' labels, the sharing values, and the record-scope-rules, menu-visibility and system-features headings. Its layout does not change. diff --git a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx index f334a87c9be..39dba908e62 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx @@ -2726,6 +2726,17 @@ export function PermissionMatrixEditPage({ type, name, packageId, onDraftSaved, const STICKY_OBJECT_CELL = 'sticky left-0 bg-background after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:hidden after:w-px after:bg-border group-data-[scrolled-x=true]/matrix:after:block'; +/** + * objectstack#34795 — the Studio matrix's bulk column, header and rows alike: + * pinned to the right edge of the scroll pane, so a row's "全选 · 只读 · 清空" + * stay in view when the matrix is wider than the pane. Its left edge is drawn + * by a pseudo-element, because a collapsed border does not travel with a + * sticky cell. A row tint is laid on as a background image, as on the Object + * column. + */ +const STICKY_BULK_CELL = + 'sticky right-0 bg-background before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border'; + /* ────────────────────────────────────────────────────────────────── */ /* Subcomponent: PermissionTable */ /* ────────────────────────────────────────────────────────────────── */ @@ -3105,7 +3116,7 @@ function StudioObjectMatrix({ {t(s.labelKey)} ))} - + {t('perm.col.bulk')} @@ -3313,7 +3324,13 @@ function StudioObjectRow({ /> ))} - + {bulk.map((b, i) => ( From 58be6ed5f5e4b425f5a9de597a1c451e2f0f2348 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 15:38:06 +0000 Subject: [PATCH 07/10] revert(i18n): leave the zh publish-refusal hint as it is The hint shares its neighbourhood with an open flow-designer change, and every other pack still names the old label; one follow-up renames it in all packs and the Draft Changes default together. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- ui/packages/i18n/src/locales/zh-Hans.ts | 2 +- ui/packages/i18n/src/locales/zh-Hant.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/packages/i18n/src/locales/zh-Hans.ts b/ui/packages/i18n/src/locales/zh-Hans.ts index 56a8f963123..77e56f98fb5 100644 --- a/ui/packages/i18n/src/locales/zh-Hans.ts +++ b/ui/packages/i18n/src/locales/zh-Hans.ts @@ -3695,7 +3695,7 @@ const zh = { securityBlockTitle: '发布会被拒绝 —— 有 {{count}} 项需要先做出决定', securityBlockTitle_one: '发布会被拒绝 —— 有 {{count}} 项需要先做出决定', securityBlockTitle_other: '发布会被拒绝 —— 有 {{count}} 项需要先做出决定', - securityBlockWhere: '请在对象的“设置 → 谁能看到哪些记录”中修改后重新发布。', + securityBlockWhere: '请在对象的“设置 → 记录共享模型”中修改后重新发布。', securityRule: { owdUnset: '未声明记录共享模型(sharingModel)。运行时会按 private 处理,但这个基线必须是明确做出的决定。', owdAlias: '记录共享模型(sharingModel)不是规范取值,运行时会按 private 处理此对象。', diff --git a/ui/packages/i18n/src/locales/zh-Hant.ts b/ui/packages/i18n/src/locales/zh-Hant.ts index 55f6c7c8d8e..527ed0911a3 100644 --- a/ui/packages/i18n/src/locales/zh-Hant.ts +++ b/ui/packages/i18n/src/locales/zh-Hant.ts @@ -3695,7 +3695,7 @@ const zhHant = { securityBlockTitle: '釋出會被拒絕 —— 有 {{count}} 項需要先做出決定', securityBlockTitle_one: '釋出會被拒絕 —— 有 {{count}} 項需要先做出決定', securityBlockTitle_other: '釋出會被拒絕 —— 有 {{count}} 項需要先做出決定', - securityBlockWhere: '請在物件的“設定 → 誰能看到哪些記錄”中修改後重新發布。', + securityBlockWhere: '請在物件的“設定 → 記錄共享模型”中修改後重新發布。', securityRule: { owdUnset: '未宣告記錄共享模型(sharingModel)。執行環境會按 private 處理,但這個基線必須是明確做出的決定。', owdAlias: '記錄共享模型(sharingModel)不是規範取值,執行環境會按 private 處理此物件。', From fafc1d626008f5cd0b56055c31d9da5ee4faf89d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 16:33:10 +0000 Subject: [PATCH 08/10] fix(i18n): the publish-refusal hint names the renamed record-visibility setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Draft Changes refusal still sent the author to Settings → Record sharing, a label this branch renamed. All 11 packs and the panel's default now name Settings → Who can see which records. The permission e2e spec finds the Studio row by its label alone, as the row now reads; the environment table keeps the label-plus-name lookup. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- ui/e2e/permission-field-panel-scroll.spec.ts | 6 +++++- ui/packages/app-shell/src/preview/DraftChangesPanel.tsx | 2 +- ui/packages/i18n/src/locales/ar.ts | 2 +- ui/packages/i18n/src/locales/de.ts | 2 +- ui/packages/i18n/src/locales/en.ts | 2 +- ui/packages/i18n/src/locales/es.ts | 2 +- ui/packages/i18n/src/locales/fr.ts | 2 +- ui/packages/i18n/src/locales/ja.ts | 2 +- ui/packages/i18n/src/locales/ko.ts | 2 +- ui/packages/i18n/src/locales/pt-BR.ts | 2 +- ui/packages/i18n/src/locales/ru.ts | 2 +- ui/packages/i18n/src/locales/zh-Hans.ts | 2 +- ui/packages/i18n/src/locales/zh-Hant.ts | 2 +- 13 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ui/e2e/permission-field-panel-scroll.spec.ts b/ui/e2e/permission-field-panel-scroll.spec.ts index 80ff3e19b9e..c4bf89237b2 100644 --- a/ui/e2e/permission-field-panel-scroll.spec.ts +++ b/ui/e2e/permission-field-panel-scroll.spec.ts @@ -277,7 +277,11 @@ async function mount(page: Page, c: Case): Promise { }, c); await page.addScriptTag({ content: bundle, type: 'module' }); const compiled = new Set(); - const expand = page.getByRole('button', { name: new RegExp(`^Project\\W*${OBJECT}\\W*$`) }); + // The Studio row names the object by its label alone, the machine name being + // the button's tooltip (objectstack#34795); the environment table still + // prints the name beside the label. + const name = c.host === 'studio' ? /^Project$/ : new RegExp(`^Project\\W*${OBJECT}\\W*$`); + const expand = page.getByRole('button', { name }); await expand.waitFor({ state: 'attached', timeout: 30_000 }); await styleUntilStable(page, compiled); await expand.click(); diff --git a/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx b/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx index 1f099038351..738b36bb8e3 100644 --- a/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx +++ b/ui/packages/app-shell/src/preview/DraftChangesPanel.tsx @@ -2078,7 +2078,7 @@ export function DraftChangesPanel({

{t('preview.changes.securityBlockWhere', { - defaultValue: 'Fix it on the object under Settings → Record sharing, then publish again.', + defaultValue: 'Fix it on the object under Settings → Who can see which records, then publish again.', })}

diff --git a/ui/packages/i18n/src/locales/ar.ts b/ui/packages/i18n/src/locales/ar.ts index b8e2d76ac5a..e0dc48499f4 100644 --- a/ui/packages/i18n/src/locales/ar.ts +++ b/ui/packages/i18n/src/locales/ar.ts @@ -5280,7 +5280,7 @@ const ar = { securityBlockTitle_few: 'سيتم رفض النشر — {{count}} عناصر بحاجة إلى قرار أولاً', securityBlockTitle_many: 'سيتم رفض النشر — {{count}} عنصرًا بحاجة إلى قرار أولاً', securityBlockTitle_other: 'سيتم رفض النشر — {{count}} عنصر بحاجة إلى قرار أولاً', - securityBlockWhere: 'أصلحه في الكائن ضمن الإعدادات ← مشاركة السجلات، ثم انشر مرة أخرى.', + securityBlockWhere: 'أصلحه في الكائن ضمن الإعدادات ← من يمكنه رؤية أي السجلات، ثم انشر مرة أخرى.', flowChecksTitle: 'قبل النشر: سيُبلغ فحص النشر عمّا يلي', securityRule: { owdUnset: 'لم يُعرَّف أساس مشاركة السجلات (sharingModel). يعود وقت التشغيل إلى private، لكن يجب أن يكون الأساس قرارًا صريحًا.', diff --git a/ui/packages/i18n/src/locales/de.ts b/ui/packages/i18n/src/locales/de.ts index 19e4ef1d927..489d584532f 100644 --- a/ui/packages/i18n/src/locales/de.ts +++ b/ui/packages/i18n/src/locales/de.ts @@ -4715,7 +4715,7 @@ const de = { securityBlockTitle: 'Veröffentlichen wird abgelehnt — {{count}} Element(e) benötigen zuerst eine Entscheidung', securityBlockTitle_one: 'Veröffentlichen wird abgelehnt — {{count}} Element benötigt zuerst eine Entscheidung', securityBlockTitle_other: 'Veröffentlichen wird abgelehnt — {{count}} Elemente benötigen zuerst eine Entscheidung', - securityBlockWhere: 'Korrigieren Sie es am Objekt unter Einstellungen → Datensatzfreigabe und veröffentlichen Sie erneut.', + securityBlockWhere: 'Korrigieren Sie es am Objekt unter Einstellungen → Wer welche Datensätze sehen kann und veröffentlichen Sie erneut.', flowChecksTitle: 'Vor dem Veröffentlichen: Die Veröffentlichungsprüfung meldet Folgendes', securityRule: { owdUnset: 'Es ist keine Basis für die Datensatzfreigabe (sharingModel) deklariert. Die Laufzeit greift auf private zurück, aber die Basis muss eine bewusste Entscheidung sein.', diff --git a/ui/packages/i18n/src/locales/en.ts b/ui/packages/i18n/src/locales/en.ts index 05dc3eac472..c5ca868f32a 100644 --- a/ui/packages/i18n/src/locales/en.ts +++ b/ui/packages/i18n/src/locales/en.ts @@ -4311,7 +4311,7 @@ const en = { securityBlockTitle: 'Publishing will be refused — {{count}} item(s) need a decision first', securityBlockTitle_one: 'Publishing will be refused — {{count}} item needs a decision first', securityBlockTitle_other: 'Publishing will be refused — {{count}} items need a decision first', - securityBlockWhere: 'Fix it on the object under Settings → Record sharing, then publish again.', + securityBlockWhere: 'Fix it on the object under Settings → Who can see which records, then publish again.', flowChecksTitle: 'Before you publish — the publish check will report these', // The pre-publish security rows, by the rule id of the finding (DraftChangesPanel `SECURITY_RULE_TEXT`). securityRule: { diff --git a/ui/packages/i18n/src/locales/es.ts b/ui/packages/i18n/src/locales/es.ts index 18596c01fb4..1939bcaa5c5 100644 --- a/ui/packages/i18n/src/locales/es.ts +++ b/ui/packages/i18n/src/locales/es.ts @@ -4857,7 +4857,7 @@ const es = { securityBlockTitle_one: 'La publicación será rechazada: {{count}} elemento necesita una decisión primero', securityBlockTitle_many: 'La publicación será rechazada: {{count}} de elementos necesitan una decisión primero', securityBlockTitle_other: 'La publicación será rechazada: {{count}} elementos necesitan una decisión primero', - securityBlockWhere: 'Corríjalo en el objeto en Configuración → Uso compartido de registros y vuelva a publicar.', + securityBlockWhere: 'Corríjalo en el objeto en Configuración → Quién puede ver qué registros y vuelva a publicar.', flowChecksTitle: 'Antes de publicar: la comprobación de publicación señalará lo siguiente', securityRule: { owdUnset: 'No se ha declarado la base de uso compartido de registros (sharingModel). El entorno de ejecución usa private, pero la base debe ser una decisión explícita.', diff --git a/ui/packages/i18n/src/locales/fr.ts b/ui/packages/i18n/src/locales/fr.ts index 008363ecffa..5ef335a7079 100644 --- a/ui/packages/i18n/src/locales/fr.ts +++ b/ui/packages/i18n/src/locales/fr.ts @@ -4853,7 +4853,7 @@ const fr = { securityBlockTitle_one: 'La publication sera refusée — {{count}} élément nécessite d’abord une décision', securityBlockTitle_many: 'La publication sera refusée — {{count}} d’éléments nécessitent d’abord une décision', securityBlockTitle_other: 'La publication sera refusée — {{count}} éléments nécessitent d’abord une décision', - securityBlockWhere: 'Corrigez-le sur l’objet dans Paramètres → Partage d’enregistrements, puis publiez à nouveau.', + securityBlockWhere: 'Corrigez-le sur l’objet dans Paramètres → Qui peut voir quels enregistrements, puis publiez à nouveau.', flowChecksTitle: 'Avant de publier : la vérification de publication signalera ceci', securityRule: { owdUnset: 'Aucune base de partage des enregistrements (sharingModel) n’est déclarée. L’exécution se rabat sur private, mais la base doit être une décision explicite.', diff --git a/ui/packages/i18n/src/locales/ja.ts b/ui/packages/i18n/src/locales/ja.ts index 42ea9c925b3..ce8356f8dfa 100644 --- a/ui/packages/i18n/src/locales/ja.ts +++ b/ui/packages/i18n/src/locales/ja.ts @@ -4717,7 +4717,7 @@ const ja = { securityBlockTitle: '公開は拒否されます — {{count}} 件の項目に先に決定が必要です', securityBlockTitle_one: '公開は拒否されます — {{count}} 件の項目に先に決定が必要です', securityBlockTitle_other: '公開は拒否されます — {{count}} 件の項目に先に決定が必要です', - securityBlockWhere: 'オブジェクトの「設定 → レコード共有」で修正してから、もう一度公開してください。', + securityBlockWhere: 'オブジェクトの「設定 → 誰がどのレコードを見られるか」で修正してから、もう一度公開してください。', flowChecksTitle: '公開する前に確認してください — 公開チェックが次の点を指摘します', securityRule: { owdUnset: 'レコード共有のベースライン(sharingModel)が宣言されていません。ランタイムは private として扱いますが、ベースラインは明示的に決める必要があります。', diff --git a/ui/packages/i18n/src/locales/ko.ts b/ui/packages/i18n/src/locales/ko.ts index 6bb204167d0..12c9e75092b 100644 --- a/ui/packages/i18n/src/locales/ko.ts +++ b/ui/packages/i18n/src/locales/ko.ts @@ -4714,7 +4714,7 @@ const ko = { securityBlockTitle: '게시가 거부됩니다 — {{count}}개 항목에 먼저 결정이 필요합니다', securityBlockTitle_one: '게시가 거부됩니다 — {{count}}개 항목에 먼저 결정이 필요합니다', securityBlockTitle_other: '게시가 거부됩니다 — {{count}}개 항목에 먼저 결정이 필요합니다', - securityBlockWhere: '객체의 설정 → 레코드 공유에서 수정한 후 다시 게시하세요.', + securityBlockWhere: '객체의 설정 → 누가 어떤 레코드를 볼 수 있는지에서 수정한 후 다시 게시하세요.', flowChecksTitle: '게시하기 전에 확인하세요 — 게시 검사에서 다음 사항을 알립니다', securityRule: { owdUnset: '레코드 공유 기준(sharingModel)이 선언되지 않았습니다. 런타임은 private로 처리하지만 기준은 명시적으로 결정해야 합니다.', diff --git a/ui/packages/i18n/src/locales/pt-BR.ts b/ui/packages/i18n/src/locales/pt-BR.ts index b4a7a70058a..39db93ae449 100644 --- a/ui/packages/i18n/src/locales/pt-BR.ts +++ b/ui/packages/i18n/src/locales/pt-BR.ts @@ -4852,7 +4852,7 @@ const pt = { securityBlockTitle_one: 'A publicação será recusada — {{count}} item precisa de uma decisão primeiro', securityBlockTitle_many: 'A publicação será recusada — {{count}} de itens precisam de uma decisão primeiro', securityBlockTitle_other: 'A publicação será recusada — {{count}} itens precisam de uma decisão primeiro', - securityBlockWhere: 'Corrija no objeto em Configurações → Compartilhamento de registros e publique novamente.', + securityBlockWhere: 'Corrija no objeto em Configurações → Quem pode ver quais registros e publique novamente.', flowChecksTitle: 'Antes de publicar: a verificação de publicação vai apontar o seguinte', securityRule: { owdUnset: 'Nenhuma base de compartilhamento de registros (sharingModel) foi declarada. O runtime usa private, mas a base precisa ser uma decisão explícita.', diff --git a/ui/packages/i18n/src/locales/ru.ts b/ui/packages/i18n/src/locales/ru.ts index ff3b4d5b044..77b62e53ff9 100644 --- a/ui/packages/i18n/src/locales/ru.ts +++ b/ui/packages/i18n/src/locales/ru.ts @@ -5008,7 +5008,7 @@ const ru = { securityBlockTitle_few: 'Публикация будет отклонена — {{count}} элемента требуют решения', securityBlockTitle_many: 'Публикация будет отклонена — {{count}} элементов требуют решения', securityBlockTitle_other: 'Публикация будет отклонена — {{count}} элемента требуют решения', - securityBlockWhere: 'Исправьте это в объекте в разделе «Настройки → Общий доступ к записям» и опубликуйте снова.', + securityBlockWhere: 'Исправьте это в объекте в разделе «Настройки → Кто может видеть какие записи» и опубликуйте снова.', flowChecksTitle: 'Перед публикацией: проверка публикации сообщит следующее', securityRule: { owdUnset: 'Базовый уровень общего доступа к записям (sharingModel) не объявлен. Среда выполнения использует private, но базовый уровень должен быть осознанным решением.', diff --git a/ui/packages/i18n/src/locales/zh-Hans.ts b/ui/packages/i18n/src/locales/zh-Hans.ts index 094504a6ffb..8fc611b3105 100644 --- a/ui/packages/i18n/src/locales/zh-Hans.ts +++ b/ui/packages/i18n/src/locales/zh-Hans.ts @@ -3695,7 +3695,7 @@ const zh = { securityBlockTitle: '发布会被拒绝 —— 有 {{count}} 项需要先做出决定', securityBlockTitle_one: '发布会被拒绝 —— 有 {{count}} 项需要先做出决定', securityBlockTitle_other: '发布会被拒绝 —— 有 {{count}} 项需要先做出决定', - securityBlockWhere: '请在对象的“设置 → 记录共享模型”中修改后重新发布。', + securityBlockWhere: '请在对象的“设置 → 谁能看到哪些记录”中修改后重新发布。', flowChecksTitle: '发布前请先看 —— 发布检查会提出以下几点', securityRule: { owdUnset: '未声明记录共享模型(sharingModel)。运行时会按 private 处理,但这个基线必须是明确做出的决定。', diff --git a/ui/packages/i18n/src/locales/zh-Hant.ts b/ui/packages/i18n/src/locales/zh-Hant.ts index 993f6f4677a..7ee469ef661 100644 --- a/ui/packages/i18n/src/locales/zh-Hant.ts +++ b/ui/packages/i18n/src/locales/zh-Hant.ts @@ -3695,7 +3695,7 @@ const zhHant = { securityBlockTitle: '釋出會被拒絕 —— 有 {{count}} 項需要先做出決定', securityBlockTitle_one: '釋出會被拒絕 —— 有 {{count}} 項需要先做出決定', securityBlockTitle_other: '釋出會被拒絕 —— 有 {{count}} 項需要先做出決定', - securityBlockWhere: '請在物件的“設定 → 記錄共享模型”中修改後重新發布。', + securityBlockWhere: '請在物件的“設定 → 誰能看到哪些記錄”中修改後重新發布。', flowChecksTitle: '釋出前請先看 —— 釋出檢查會提出以下幾點', securityRule: { owdUnset: '未宣告記錄共享模型(sharingModel)。執行環境會按 private 處理,但這個基線必須是明確做出的決定。', From 5ba8869eae5071fd62b39083d42c78fe498da0f1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 16:58:04 +0000 Subject: [PATCH 09/10] test(preview): the refusal tests read the renamed hint Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- .changeset/34795-studio-permissions-wording.md | 2 ++ .../preview/__tests__/DraftChangesPanel.securityLink.test.tsx | 2 +- .../__tests__/DraftChangesPanel.securityProblems.test.tsx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.changeset/34795-studio-permissions-wording.md b/.changeset/34795-studio-permissions-wording.md index 2cbdb09101a..31ef8cd4a0a 100644 --- a/.changeset/34795-studio-permissions-wording.md +++ b/.changeset/34795-studio-permissions-wording.md @@ -17,4 +17,6 @@ Studio's permissions page now reads in the words an app builder uses, in zh-CN a - **The bulk buttons show on every row**, not only on the row under the pointer, as "全选 · 只读 · 清空" ("All · Read only · None"), then the CRUD set as a fourth button ("增删改查", "Read & write"). Each button writes what All / R / None / CRUD wrote before. The footnote that explained the hidden buttons is gone. - **An object row shows the object's label**, in the matrix and in the package's "who can see which records" overview. Its machine name is the tooltip. The record-visibility chip stays on one line now that its labels are longer. +The Draft Changes publish refusal now points to "Settings → Who can see which records" (all 11 language packs), since the old "Settings → Record sharing" label no longer exists. + Setup's permission-set page reads some of the same strings, so it changes too: the bulk buttons' labels, the sharing values, and the record-scope-rules, menu-visibility and system-features headings. Its layout does not change. diff --git a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx index bccbf78d8c2..e797ddbfaba 100644 --- a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx +++ b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx @@ -101,6 +101,6 @@ describe('DraftChangesPanel — reaching the object the publish door refuses (ob // And what #5418 shipped is intact: the item is still named, and the // sentence still says where to fix it. expect(block.textContent).toContain('object/crmext_visit'); - expect(block.textContent).toMatch(/Settings → Record sharing/); + expect(block.textContent).toMatch(/Settings → Who can see which records/); }); }); diff --git a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx index c7f5878f350..3af1f21b564 100644 --- a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx +++ b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityProblems.test.tsx @@ -82,7 +82,7 @@ describe('DraftChangesPanel — pre-publish security posture (objectui#5418)', ( // language (`SECURITY_RULE_TEXT`), not the ADR paragraph. expect(block.textContent).toMatch(/sharingModel/); // And where to go, which the toast never said. - expect(block.textContent).toMatch(/Settings → Record sharing/); + expect(block.textContent).toMatch(/Settings → Who can see which records/); }); it('reports without blocking — the server door stays the authority', async () => { From f68ccf6d41390cbd309473f5f330e6d8ba32a0d5 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 17:30:43 +0000 Subject: [PATCH 10/10] docs(qa): the read-only Access item reads the always-drawn row bulk strip The studio-authoring checklist's read-only Access verify still said the object row's bulk appears only on hover or keyboard focus and cited engine.studio.access.bulkHint. Every object row now draws its bulk strip and that key is gone, so the clause says every row draws the strip and every button in it is disabled in read-only Studio. The FAIL condition (an operating bulk control) is unchanged. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz --- docs/qa/platform-checklist/areas/studio-authoring.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/qa/platform-checklist/areas/studio-authoring.json b/docs/qa/platform-checklist/areas/studio-authoring.json index 19a496c8eb3..c5d30bbd60a 100644 --- a/docs/qa/platform-checklist/areas/studio-authoring.json +++ b/docs/qa/platform-checklist/areas/studio-authoring.json @@ -955,7 +955,7 @@ "title": "Permission-matrix editor UX: field-filter + bulk apply to EXACTLY the visible fields, and the Bulk column never clips at narrow widths", "since": "v16", "status": "active", - "revision": 11, + "revision": 12, "priority": "P2", "surface": "mixed", "personas": ["admin"], @@ -1016,7 +1016,7 @@ { "clause": "the read-only gate holds: a read-only set hides Save, offers no field bulk at all and no operating object-row bulk, and disables every checkbox; the read-only badge names WHICH gate holds", "oracle": "screenshot", - "verify": "on the read-only set Save is absent, every checkbox is disabled, the field bulk buttons (Read-only all / Write all / Clear) are absent — not merely disabled (PermissionMatrixEditor.tsx FieldsSubTable renders them only while writable; QA run #26715 read them absent in read-only Studio) — and the object row's bulk, which appears only on hover or keyboard focus (engine.studio.access.bulkHint), is disabled when it appears; an operating bulk control is the FAIL. The badge names the gate that holds; the console distinguishes FOUR (objectui PermissionMatrixEditor.tsx at the pin): the package gate (engine.studio.pkg.readonly — Studio on a read-only package), the artifact gate (perm.readOnly.artifact, 'Read-only (this set is provided by a code package)' — a set a code package ships, in the metadata admin), the wall (perm.readOnly.walled — the security catalog under isolated/group tenancy) and the type gate (perm.readOnly — a type with no runtime write channel). On a stock boot only the package and artifact gates are reachable — the wall needs a walled tenancy posture and the type gate a permission type with no write channel, which stock does not have — so score those two on the packaged showcase_contributor set (Studio Access and the metadata admin) and record the other two as not reachable on stock. A badge that blames the wrong gate is the FAIL", + "verify": "on the read-only set Save is absent, every checkbox is disabled, the field bulk buttons (Read-only all / Write all / Clear) are absent — not merely disabled (PermissionMatrixEditor.tsx FieldsSubTable renders them only while writable; QA run #26715 read them absent in read-only Studio) — and every object row draws its bulk strip, every button of which is disabled in read-only Studio; an operating bulk control is the FAIL. The badge names the gate that holds; the console distinguishes FOUR (objectui PermissionMatrixEditor.tsx at the pin): the package gate (engine.studio.pkg.readonly — Studio on a read-only package), the artifact gate (perm.readOnly.artifact, 'Read-only (this set is provided by a code package)' — a set a code package ships, in the metadata admin), the wall (perm.readOnly.walled — the security catalog under isolated/group tenancy) and the type gate (perm.readOnly — a type with no runtime write channel). On a stock boot only the package and artifact gates are reachable — the wall needs a walled tenancy posture and the type gate a permission type with no write channel, which stock does not have — so score those two on the packaged showcase_contributor set (Studio Access and the metadata admin) and record the other two as not reachable on stock. A badge that blames the wrong gate is the FAIL", "evidence": "the read-only screenshot" }, { @@ -1096,6 +1096,12 @@ "date": "2026-11-04", "change": "steps[3] and acceptance[3].clause corrected from QA run #29893 (W5-STUDIO, at 589049b0): after Clear a field falls back to the object's grant (data-field-rule=\"inherited\"), not to a read-only default; the verify (keys absent from the saved map) is unchanged. Read at base f68b47ca", "ref": "#29906" + }, + { + "revision": 12, + "date": "2026-11-17", + "change": "acceptance[5].verify re-read for #34795 (PR #34914): every object row now draws its bulk strip, so the verify no longer says the strip appears only on hover or keyboard focus or cites engine.studio.access.bulkHint (that key is removed). It says every row draws the strip and every button in it is disabled in read-only Studio. The FAIL condition, an operating bulk control, is unchanged. Wording only; no clause weakened", + "ref": "#34795" } ] },