Skip to content

Commit 3c8cb0c

Browse files
os-zhuangclaude
andauthored
docs(studio): sync capability-flag comments and restore label with spec #2377 removals (#2799)
framework#2377 (ADR-0049 enforce-or-remove, closed by framework#3414) removed enable.trash / enable.mru from the spec entirely — ObjectCapabilities is now .strict(), so authoring them is a parse error — and corrected enable.searchable to LIVE (global-search opt-out). objectui never rendered these toggles or shipped i18n keys for them, so only the surrounding prose had drifted: - ObjectSettingsPanel comment no longer calls searchable/trash/mru 'dead'; it now states trash/mru are removed (strict-rejected) and searchable is live but not yet surfaced. - The capabilities test keeps its absence assertions (they now also guard against authoring strict-rejected keys) with an updated rationale. - perm.action.restore label stops promising a recycle bin that never existed: 'Restore deleted records (reserved — deletes are hard today)' (en + zh), matching the platform's real hard-delete contract. ObjectSettingsPanel (12) + PermissionMatrixEditor.basics + studio-locale i18n tests green. Claude-Session: https://claude.ai/code/session_01RRCHNGhKw8uVhA3ghXKDpA Co-authored-by: Claude <noreply@anthropic.com>
1 parent ce775f3 commit 3c8cb0c

4 files changed

Lines changed: 66 additions & 74 deletions

File tree

‎packages/app-shell/src/views/metadata-admin/i18n.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ const ENGINE_STRINGS_EN: Record<string, string> = {
866866
'perm.action.edit': 'Edit',
867867
'perm.action.delete': 'Delete',
868868
'perm.action.transfer': 'Transfer ownership',
869-
'perm.action.restore': 'Restore from trash',
869+
'perm.action.restore': 'Restore deleted records (reserved — deletes are hard today)',
870870
'perm.action.purge': 'Hard delete (purge)',
871871
'perm.action.viewAll': 'View All Records (bypass sharing)',
872872
'perm.action.modifyAll': 'Modify All Records (bypass sharing)',
@@ -2401,7 +2401,7 @@ const ENGINE_STRINGS_ZH: Record<string, string> = {
24012401
'perm.action.edit': '编辑',
24022402
'perm.action.delete': '删除',
24032403
'perm.action.transfer': '转移所有者',
2404-
'perm.action.restore': '从回收站恢复',
2404+
'perm.action.restore': '恢复已删除记录(预留 — 当前为硬删除)',
24052405
'perm.action.purge': '彻底删除',
24062406
'perm.action.viewAll': '查看所有记录(绕过共享规则)',
24072407
'perm.action.modifyAll': '修改所有记录(绕过共享规则)',

‎packages/app-shell/src/views/studio-design/ObjectSettingsPanel.test.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ describe('ObjectSettingsPanel — capabilities (enable.*, framework#2707/#2727)'
105105
expect((screen.getByTestId('cap-feeds') as HTMLInputElement).checked).toBe(true);
106106
expect((screen.getByTestId('cap-activities') as HTMLInputElement).checked).toBe(true);
107107
expect((screen.getByTestId('cap-clone') as HTMLInputElement).checked).toBe(true);
108-
// Dead flags must NOT be offered (Studio only exposes enforced switches).
108+
// trash/mru no longer exist in the spec (removed, framework#2377 — a
109+
// rendered toggle would author a key the strict schema rejects);
110+
// searchable is live but not yet surfaced here.
109111
expect(screen.queryByTestId('cap-searchable')).toBeNull();
110112
expect(screen.queryByTestId('cap-trash')).toBeNull();
111113
expect(screen.queryByTestId('cap-mru')).toBeNull();

‎packages/app-shell/src/views/studio-design/ObjectSettingsPanel.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
* switches. Only LIVE flags are exposed (every toggle is enforced at
3030
* runtime — writer gates, 403s, or UI surfaces): trackHistory & files
3131
* are opt-IN (spec default false), feeds/activities/clone are opt-OUT
32-
* (spec default true, explicit false disables). Dead flags
33-
* (searchable/trash/mru) are deliberately NOT rendered.
32+
* (spec default true, explicit false disables). `trash`/`mru` were
33+
* REMOVED from the spec (framework#2377 — ObjectCapabilities is now
34+
* .strict(), authoring them is a parse error); `searchable` is LIVE
35+
* (global-search opt-out) but not yet surfaced here.
3436
*/
3537

3638
import React from 'react';

0 commit comments

Comments
 (0)