From b995207852748c1f7cfae33a1839caba6175236c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Jul 2026 14:51:40 +0000 Subject: [PATCH] fix(metadata-admin): dashboard label fallback + skill activation editors (#1878) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Metadata-liveness audit follow-through (umbrella #1878), objectui side. #1891 (naming drift — dashboard title vs label): DashboardGridLayout read only `schema.title`, but the spec's canonical top-level key is `label`, so a spec-compliant dashboard rendered the literal "Dashboard" header. Fall back to `schema.label` (matching DashboardView's title-then-label precedence). #1895 (designer authoring gaps — skill): the skill authoring form exposed only name/instructions/tools. Add editors for the activation-critical fields that were previously hand-edit-only: - `surface` (ask | build | both) - `triggerPhrases` (NL activation phrases) - `triggerConditions` (field / operator / value) — the activation-critical programmatic conditions plugin-dashboard suite green (89 passing); changed files add no type errors. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01LddW4NaQBdf5FTEnBPpnUJ --- .../views/metadata-admin/default-schemas.ts | 29 +++++++++++++++++++ .../src/DashboardGridLayout.tsx | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/app-shell/src/views/metadata-admin/default-schemas.ts b/packages/app-shell/src/views/metadata-admin/default-schemas.ts index 6ff590f21..c0bd476dd 100644 --- a/packages/app-shell/src/views/metadata-admin/default-schemas.ts +++ b/packages/app-shell/src/views/metadata-admin/default-schemas.ts @@ -159,6 +159,35 @@ const SCHEMAS: Record> = { ...headerProps, instructions: { type: 'string', title: 'Instructions', format: 'multiline' }, tools: { type: 'array', title: 'Tools', items: { type: 'string' } }, + surface: { + type: 'string', + title: 'Surface', + description: "Agent surface this skill binds to (ADR-0063).", + enum: ['ask', 'build', 'both'], + }, + triggerPhrases: { + type: 'array', + title: 'Trigger Phrases', + description: 'Natural-language phrases that activate this skill.', + items: { type: 'string' }, + }, + triggerConditions: { + type: 'array', + title: 'Trigger Conditions', + description: 'Programmatic activation conditions (context field / operator / value). The activation-critical field — previously only hand-editable (#1878/#1895).', + items: { + type: 'object', + properties: { + field: { type: 'string', title: 'Field' }, + operator: { + type: 'string', + title: 'Operator', + enum: ['eq', 'neq', 'in', 'not_in', 'contains'], + }, + value: { type: 'string', title: 'Value' }, + }, + }, + }, }, }, diff --git a/packages/plugin-dashboard/src/DashboardGridLayout.tsx b/packages/plugin-dashboard/src/DashboardGridLayout.tsx index 98e347bc8..0729fa1f7 100644 --- a/packages/plugin-dashboard/src/DashboardGridLayout.tsx +++ b/packages/plugin-dashboard/src/DashboardGridLayout.tsx @@ -306,7 +306,7 @@ export const DashboardGridLayout: React.FC = ({
{hasDndProvider && }
-

{schema.title || 'Dashboard'}

+

{schema.title || schema.label || 'Dashboard'}

{editMode ? ( <>