Skip to content

Commit 6a9397e

Browse files
os-zhuangclaude
andauthored
chore(spec)!: retire the compactLayout alias + transition mirror (#2536) (#2539)
The ADR-0085 deprecation window is closed: consumers switched in objectui#2168, shipped via the console pin (#2526), one release soaked. - ObjectSchema drops the compactLayout declaration: create() rejects it (unknown key), lenient parse strips it — no silent aliasing either way. - normalizeSemanticRoleAliases loses both directions (alias + the #2521 back-fill mirror); served metadata carries highlightFields only. - 27 straggler system-object authors (plugins/services, missed by the #2521 sweep — the type gate caught the first one) renamed. - liveness ledger drops the compactLayout row; the dogfood mirror assertion (#2528) flips to expect ABSENCE, exactly as it was designed to force in the retirement PR. - Downstream smoke pin → hotcrm v1.2.2 (hotcrm#424, same rename). spec 6666 + dogfood 181 green; api-surface unchanged; check:liveness ✓. Closes #2536 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent c421df2 commit 6a9397e

34 files changed

Lines changed: 91 additions & 85 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/plugin-audit': patch
4+
'@objectstack/plugin-approvals': patch
5+
'@objectstack/plugin-security': patch
6+
'@objectstack/plugin-sharing': patch
7+
'@objectstack/plugin-webhooks': patch
8+
'@objectstack/service-storage': patch
9+
'@objectstack/service-automation': patch
10+
'@objectstack/service-messaging': patch
11+
'@objectstack/service-realtime': patch
12+
---
13+
14+
Retire the deprecated `compactLayout` alias for `highlightFields` (framework#2536, closes the ADR-0085 deprecation window).
15+
16+
- `ObjectSchema` no longer declares `compactLayout`: `create()` rejects it like any unknown key; lenient `parse()` strips it (no silent aliasing).
17+
- The parse-time alias AND the `highlightFields → compactLayout` back-fill transition mirror are removed from `normalizeSemanticRoleAliases`. Served metadata now carries the canonical key only.
18+
- All remaining first-party authors (27 system objects across plugin-audit / approvals / security / sharing / webhooks / service-storage / automation / messaging / realtime — missed by the #2521 sweep, caught by the type gate) renamed to `highlightFields`.
19+
- The downstream smoke pin moves to hotcrm v1.2.2 (hotcrm#424: same rename + deps ^11.7.0).
20+
- Consumers were switched in objectui#2168 and shipped via the console pin bump (#2526); this closes the window scheduled there. The dogfood mirror assertion (#2528) flips to `compactLayout: undefined` in this same change, per the plan it carried.
21+
22+
Version note: minor, not major — the key was deprecated-with-alias for a full release window, all first-party consumers/authors are migrated, and the spec api-surface gate reports no export changes (same documented-exception path as the ADR-0085 removals in 11.7.0). External metadata still authoring `compactLayout` will now fail `create()` loudly with the standard unknown-key error naming the key.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
# ADR-0085 (hotcrm#423) — the intended break, explicitly digested
7575
# downstream. Bump this ref whenever a deliberate spec surface
7676
# removal ships a matching hotcrm release.
77-
HOTCRM_REF: v1.2.1
77+
HOTCRM_REF: v1.2.2
7878
run: bash scripts/downstream-smoke.sh
7979

8080
- name: Create Release Pull Request or Publish to npm

examples/app-showcase/src/objects/semantic-zoo.object.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
* strips nor mangles them. Guarded by
1010
* `packages/dogfood/test/semantic-roles.dogfood.test.ts`.
1111
*
12-
* Two objects because the alias runs both directions:
13-
* - `SemanticZoo` authors the CANONICAL spellings (highlightFields,
14-
* stageField: 'status', collapse enum) — served meta must also carry the
15-
* deprecated `compactLayout` mirror for pre-11.7 renderers.
16-
* - `SemanticZooLegacy` authors the DEPRECATED spelling (compactLayout) and
17-
* `stageField: false` — served meta must carry the canonical
18-
* `highlightFields`, and `false` must survive (it is the only "stop
19-
* guessing" signal; a falsy-check regression turns the stepper back on).
12+
* Two objects, two role postures:
13+
* - `SemanticZoo` authors the full canonical role set (highlightFields,
14+
* stageField: 'status', collapse enum).
15+
* - `SemanticZooLegacy` carries `stageField: false` — `false` must survive
16+
* serialization strictly (it is the only "stop guessing" signal; a
17+
* falsy-check regression turns the stepper back on). It exercised the
18+
* deprecated `compactLayout` alias during the ADR-0085 window; the alias
19+
* was retired by framework#2536.
2020
*/
2121
import { ObjectSchema, Field } from '@objectstack/spec/data';
2222

@@ -55,7 +55,7 @@ export const SemanticZooLegacy = ObjectSchema.create({
5555
label: 'Semantic Zoo (Legacy)',
5656
pluralLabel: 'Semantic Zoo Legacies',
5757
icon: 'flask-round',
58-
description: 'ADR-0085 semantic-role runtime fixture (deprecated spellings)',
58+
description: 'ADR-0085 semantic-role runtime fixture (stageField:false suppression)',
5959

6060
fields: {
6161
name: Field.text({ label: 'Name', required: true }),
@@ -71,8 +71,9 @@ export const SemanticZooLegacy = ObjectSchema.create({
7171
amount: Field.number({ label: 'Amount' }),
7272
},
7373

74-
// Deprecated alias on purpose — must surface as highlightFields when served.
75-
compactLayout: ['name', 'amount'],
74+
// (This fixture authored the deprecated `compactLayout` spelling during the
75+
// ADR-0085 alias window; retired by framework#2536.)
76+
highlightFields: ['name', 'amount'],
7677
// This status is a color, not a lifecycle.
7778
stageField: false,
7879
});

packages/dogfood/test/semantic-roles.dogfood.test.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ describe('ADR-0085 semantic roles survive the served pipeline', () => {
4646
const def = await servedObject('showcase_semantic_zoo');
4747

4848
expect(def.highlightFields).toEqual(['name', 'status', 'amount']);
49-
// Transition mirror for pre-11.7 renderers (ObjectGrid & friends read the
50-
// old spelling). Deliberately asserted: when the deprecated alias is
51-
// retired, this expectation is DELETED IN THE SAME PR — a red here after
52-
// that removal means the retirement missed a consumer.
53-
expect(def.compactLayout).toEqual(['name', 'status', 'amount']);
49+
// Alias retired (framework#2536): served meta carries the canonical key
50+
// ONLY. This flip happened in the same PR that removed the transition
51+
// mirror, per the plan the mirror assertion carried.
52+
expect(def.compactLayout).toBeUndefined();
5453

5554
expect(def.stageField).toBe('status');
5655

@@ -62,13 +61,11 @@ describe('ADR-0085 semantic roles survive the served pipeline', () => {
6261
expect(def.fields?.amount?.group).toBe('money');
6362
});
6463

65-
it('deprecated spellings alias onto the canonical keys when served', async () => {
64+
it('the legacy fixture serves canonical highlightFields only (alias retired)', async () => {
6665
const def = await servedObject('showcase_semantic_zoo_legacy');
6766

68-
// compactLayout (deprecated) must surface as highlightFields…
6967
expect(def.highlightFields).toEqual(['name', 'amount']);
70-
// …and stay readable under the old name (ADR-0079 alias pattern).
71-
expect(def.compactLayout).toEqual(['name', 'amount']);
68+
expect(def.compactLayout).toBeUndefined();
7269
});
7370

7471
it('stageField:false survives serialization as a strict false', async () => {

packages/plugins/plugin-approvals/src/sys-approval-action.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const SysApprovalAction = ObjectSchema.create({
2424
displayNameField: 'id',
2525
nameField: 'id', // [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
2626
titleFormat: '{action} · {step_name}',
27-
compactLayout: ['request_id', 'step_name', 'action', 'actor_id', 'created_at'],
27+
highlightFields: ['request_id', 'step_name', 'action', 'actor_id', 'created_at'],
2828

2929
listViews: {
3030
recent: {

packages/plugins/plugin-approvals/src/sys-approval-approver.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const SysApprovalApprover = ObjectSchema.create({
3535
displayNameField: 'id',
3636
nameField: 'id', // [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
3737
titleFormat: '{approver} · {request_id}',
38-
compactLayout: ['request_id', 'approver', 'created_at'],
38+
highlightFields: ['request_id', 'approver', 'created_at'],
3939

4040
fields: {
4141
id: Field.text({ label: 'Row ID', required: true, readonly: true, group: 'System' }),

packages/plugins/plugin-approvals/src/sys-approval-request.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const SysApprovalRequest = ObjectSchema.create({
3333
displayNameField: 'id',
3434
nameField: 'id', // [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
3535
titleFormat: '{process_name} · {record_id}',
36-
compactLayout: ['process_name', 'object_name', 'record_id', 'status', 'current_step', 'submitter_id', 'updated_at'],
36+
highlightFields: ['process_name', 'object_name', 'record_id', 'status', 'current_step', 'submitter_id', 'updated_at'],
3737

3838
// Curated built-in list views — render as segmented tabs in the console.
3939
// Filters use {current_user_id} substitution wired by the console.

packages/plugins/plugin-audit/src/objects/sys-activity.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const SysActivity = ObjectSchema.create({
2727
displayNameField: 'summary',
2828
nameField: 'summary', // [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
2929
titleFormat: '{type} · {summary}',
30-
compactLayout: ['timestamp', 'type', 'actor_name', 'summary'],
30+
highlightFields: ['timestamp', 'type', 'actor_name', 'summary'],
3131

3232
fields: {
3333
id: Field.text({

packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const SysAuditLog = ObjectSchema.create({
2424
displayNameField: 'action',
2525
nameField: 'action', // [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
2626
titleFormat: '{action} · {object_name}',
27-
compactLayout: ['created_at', 'action', 'object_name', 'record_id', 'user_id'],
27+
highlightFields: ['created_at', 'action', 'object_name', 'record_id', 'user_id'],
2828

2929
listViews: {
3030
recent: {

packages/plugins/plugin-audit/src/objects/sys-comment.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const SysComment = ObjectSchema.create({
2828
displayNameField: 'body',
2929
nameField: 'body', // [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
3030
titleFormat: '{author_name}: {body}',
31-
compactLayout: ['created_at', 'author_name', 'body'],
31+
highlightFields: ['created_at', 'author_name', 'body'],
3232

3333
fields: {
3434
id: Field.text({

0 commit comments

Comments
 (0)