Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/drop-orphaned-dead-metadata-display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@object-ui/app-shell": patch
---

chore(metadata-admin): stop surfacing metadata fields the spec dropped (framework#2377)

`@objectstack/spec` removes a batch of dead, unenforced author-facing metadata
properties (ADR-0049 enforce-or-remove, framework PR #3176). Two of them were
still *displayed* — never enforced, but shown — in the Studio metadata-admin,
which is the same false affordance on the UI side. Both were read defensively
off raw documents, so this is a display-only cleanup with no runtime impact:

- **`dataset` measure `certified`** — `useDatasetCatalog` populated a
`DatasetMeasureInfo.certified` flag (and `DatasetDefaultInspector` carried it
in its local `Measure` type) that nothing ever rendered. Dropped both; the
measure picker/inspector is unchanged otherwise.
- **`agent.planning.strategy` / `allowReplan`** — `AgentPreview`'s Planning rail
listed both alongside the one live knob. Narrowed the `KeyVals` keys to
`['maxIterations']` (the only planning field the runtime reads).

Test fixtures that set `certified` were updated. No public component API change.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const draft = {
object: 'opportunity',
include: ['account'],
dimensions: [{ name: 'region', field: 'account.region', type: 'string' }],
measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount', certified: true }],
measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount' }],
};

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

it('adds a dimension via onPatch', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ type Measure = {
label?: string;
aggregate?: string;
field?: string;
certified?: boolean;
format?: string;
currency?: string;
derived?: DerivedSpec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const catalog: DatasetCatalogEntry[] = [
{ name: 'close_quarter', type: 'date' },
],
measures: [
{ name: 'total_amount', aggregate: 'sum', certified: true },
{ name: 'total_amount', aggregate: 'sum' },
{ name: 'deal_count', aggregate: 'count' },
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export function AgentPreview({ name, draft }: MetadataPreviewProps) {
<div className="border-l bg-muted/20 p-3 text-xs space-y-3">
{planning && Object.keys(planning).length > 0 && (
<RailBlock icon={BrainCircuit} title="Planning">
<KeyVals data={planning} keys={['strategy', 'maxIterations', 'allowReplan']} />
<KeyVals data={planning} keys={['maxIterations']} />
</RailBlock>
)}
{memory && Object.keys(memory).length > 0 && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export interface DatasetMeasureInfo {
name: string;
/** Aggregate function (sum / avg / count / …) — display hint only. */
aggregate?: string;
/** Whether the dataset author certified this measure. */
certified?: boolean;
}

export interface DatasetCatalogEntry {
Expand Down Expand Up @@ -77,7 +75,6 @@ export function toCatalogEntry(doc: Record<string, unknown>): DatasetCatalogEntr
.map((m) => ({
name: m.name as string,
aggregate: typeof m.aggregate === 'string' ? (m.aggregate as string) : undefined,
certified: m.certified === true,
}))
: [];
return { name, label: resolveLabel(doc.label, name), dimensions, measures };
Expand Down
Loading