You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(app-shell): distinguish writable system objects from engine-owned in badge + empty-state (ADR-0103 / #3220) (#2705)
The framework split the overloaded managedBy:'system' bucket (ADR-0103): several
system objects are admin/user-writable data (Notification Preferences /
Subscriptions / Templates, delegated RBAC assignments, user preferences) and
declare userActions opening their writes. The Console already rendered the
New/Edit/Delete buttons for these (the affordance mirrors honour userActions),
but the badge/empty-state copy still called every system object a "read-only
monitoring surface".
- ManagedByBadge accepts userActions and renders a "Platform schema —
admin-writable" variant when a system object opens any write.
- resolveManagedByEmptyState returns undefined for a writable system object
(userActions.create) so the generic empty state with the New button shows.
- New managedByBadge.systemWritable.* strings (en + zh; others fall back to en).
Copy/UX only — no behavioural change. Paired with framework #3315.
Claude-Session: https://claude.ai/code/session_01Fp9yZxRQ3mb7p4vVwqFXKE
Co-authored-by: Claude <noreply@anthropic.com>
**Distinguish writable `system` objects from engine-owned ones in the Console (framework ADR-0103 / #3220).** The framework split the overloaded `managedBy: 'system'` bucket: engine-owned rows stay read-only, but several `system` objects are admin/user-writable *data* (Notification Preferences/Subscriptions/Templates, delegated RBAC assignments, user preferences) and declare `userActions` opening their writes.
7
+
8
+
The Console already surfaced the New/Edit/Delete buttons correctly for these (all affordance mirrors honour `userActions`), but the badge and empty-state *copy* still called every `system` object a "read-only monitoring surface". Now:
9
+
10
+
-**`ManagedByBadge`** takes the object's `userActions` and, when a `system` object opens any write, renders the "Platform schema — admin-writable" variant instead of the engine-owned copy.
11
+
-**`resolveManagedByEmptyState`** returns `undefined` for a `system` object whose `userActions.create` is set, so the generic empty state (with the New button) shows instead of "entries appear automatically".
12
+
- New `managedByBadge.systemWritable.*` strings (en + zh; other locales fall back to the English default).
13
+
14
+
Copy/UX only — no behavioural change to what a user can do.
'Rows here are created automatically when actions run on the source record. The list below is a read-only monitoring surface — row-level actions (Approve, Recall, Resend, …) live on each row.',
// ADR-0103 — a `system`-bucket object that opened writes via `userActions`:
114
+
// platform-defined schema, but admin/user-writable DATA (e.g. Notification
115
+
// Preferences, delegated RBAC assignments). Resolved in the component when the
116
+
// bucket is `system` and any write is opted in, so the copy no longer claims a
117
+
// "read-only monitoring surface".
118
+
'system-writable': {
119
+
icon: Settings2,
120
+
i18nKey: 'systemWritable',
121
+
short: 'Platform schema',
122
+
title: 'Platform-defined, admin-writable',
123
+
body: ()=>
124
+
"This object's schema is defined by the platform, but its rows are yours to create and edit here. Who may write is governed by delegated administration and record-level security, not by this badge.",
Copy file name to clipboardExpand all lines: packages/i18n/src/locales/en.ts
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -391,6 +391,11 @@ const en = {
391
391
title: 'Managed by the platform',
392
392
body: 'Rows here are created automatically when actions run on the source record. The list below is a read-only monitoring surface — row-level actions (Approve, Recall, Resend, …) live on each row.',
393
393
},
394
+
systemWritable: {
395
+
short: 'Platform schema',
396
+
title: 'Platform-defined, admin-writable',
397
+
body: "This object's schema is defined by the platform, but its rows are yours to create and edit here. Who may write is governed by delegated administration and record-level security, not by this badge.",
0 commit comments