Skip to content

Commit 6a8ebb7

Browse files
os-zhuangclaude
andauthored
chore(metadata-admin): stop surfacing metadata fields the spec dropped (framework#2377) (#2658)
Two dead, unenforced author-facing props that framework PR #3176 removes from @objectstack/spec were still *displayed* (never enforced) in the Studio metadata-admin — the same false affordance on the UI side. Both were read defensively off raw docs, so this is display-only with no runtime impact: - dataset measure `certified`: useDatasetCatalog populated a DatasetMeasureInfo.certified flag (+ a passthrough field in DatasetDefaultInspector's local Measure type) that nothing rendered. Dropped. - agent planning `strategy`/`allowReplan`: AgentPreview's Planning rail listed both; narrowed KeyVals keys to ['maxIterations'] (the only live knob). Test fixtures setting `certified` updated. No public component API change. metadata-admin suite green (799 tests). Claude-Session: https://claude.ai/code/session_011XchBKhKdjbhQZymt9Gn9B Co-authored-by: Claude <noreply@anthropic.com>
1 parent 80977d0 commit 6a8ebb7

6 files changed

Lines changed: 24 additions & 8 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
"@object-ui/app-shell": patch
3+
---
4+
5+
chore(metadata-admin): stop surfacing metadata fields the spec dropped (framework#2377)
6+
7+
`@objectstack/spec` removes a batch of dead, unenforced author-facing metadata
8+
properties (ADR-0049 enforce-or-remove, framework PR #3176). Two of them were
9+
still *displayed* — never enforced, but shown — in the Studio metadata-admin,
10+
which is the same false affordance on the UI side. Both were read defensively
11+
off raw documents, so this is a display-only cleanup with no runtime impact:
12+
13+
- **`dataset` measure `certified`**`useDatasetCatalog` populated a
14+
`DatasetMeasureInfo.certified` flag (and `DatasetDefaultInspector` carried it
15+
in its local `Measure` type) that nothing ever rendered. Dropped both; the
16+
measure picker/inspector is unchanged otherwise.
17+
- **`agent.planning.strategy` / `allowReplan`**`AgentPreview`'s Planning rail
18+
listed both alongside the one live knob. Narrowed the `KeyVals` keys to
19+
`['maxIterations']` (the only planning field the runtime reads).
20+
21+
Test fixtures that set `certified` were updated. No public component API change.

packages/app-shell/src/views/metadata-admin/inspectors/DatasetDefaultInspector.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const draft = {
2525
object: 'opportunity',
2626
include: ['account'],
2727
dimensions: [{ name: 'region', field: 'account.region', type: 'string' }],
28-
measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount', certified: true }],
28+
measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount' }],
2929
};
3030

3131
describe('DatasetDefaultInspector', () => {
@@ -51,7 +51,6 @@ describe('DatasetDefaultInspector', () => {
5151
const patch = onPatch.mock.calls[0][0];
5252
expect(patch.measures).toHaveLength(2);
5353
expect(patch.measures[1]).toMatchObject({ aggregate: 'sum' });
54-
expect(patch.measures[1]).not.toHaveProperty('certified');
5554
});
5655

5756
it('adds a dimension via onPatch', () => {

packages/app-shell/src/views/metadata-admin/inspectors/DatasetDefaultInspector.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ type Measure = {
108108
label?: string;
109109
aggregate?: string;
110110
field?: string;
111-
certified?: boolean;
112111
format?: string;
113112
currency?: string;
114113
derived?: DerivedSpec;

packages/app-shell/src/views/metadata-admin/inspectors/ReportDefaultInspector.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const catalog: DatasetCatalogEntry[] = [
1818
{ name: 'close_quarter', type: 'date' },
1919
],
2020
measures: [
21-
{ name: 'total_amount', aggregate: 'sum', certified: true },
21+
{ name: 'total_amount', aggregate: 'sum' },
2222
{ name: 'deal_count', aggregate: 'count' },
2323
],
2424
},

packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function AgentPreview({ name, draft }: MetadataPreviewProps) {
173173
<div className="border-l bg-muted/20 p-3 text-xs space-y-3">
174174
{planning && Object.keys(planning).length > 0 && (
175175
<RailBlock icon={BrainCircuit} title="Planning">
176-
<KeyVals data={planning} keys={['strategy', 'maxIterations', 'allowReplan']} />
176+
<KeyVals data={planning} keys={['maxIterations']} />
177177
</RailBlock>
178178
)}
179179
{memory && Object.keys(memory).length > 0 && (

packages/app-shell/src/views/metadata-admin/previews/useDatasetCatalog.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ export interface DatasetMeasureInfo {
3131
name: string;
3232
/** Aggregate function (sum / avg / count / …) — display hint only. */
3333
aggregate?: string;
34-
/** Whether the dataset author certified this measure. */
35-
certified?: boolean;
3634
}
3735

3836
export interface DatasetCatalogEntry {
@@ -77,7 +75,6 @@ export function toCatalogEntry(doc: Record<string, unknown>): DatasetCatalogEntr
7775
.map((m) => ({
7876
name: m.name as string,
7977
aggregate: typeof m.aggregate === 'string' ? (m.aggregate as string) : undefined,
80-
certified: m.certified === true,
8178
}))
8279
: [];
8380
return { name, label: resolveLabel(doc.label, name), dimensions, measures };

0 commit comments

Comments
 (0)