Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
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
9 changes: 9 additions & 0 deletions .changeset/previews-shared-empty-description-8526.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@object-ui/app-shell': patch
---

Metadata-admin previews: the empty-collection sentences under `metadata-admin/previews/` render the shared `EmptyDescription`

Sixteen sites across twelve preview files (`ActionPreview`, `AgentPreview`, `DatasourcePreview`, `EmailTemplatePreview`, `FlowPreview`, `FlowRunsPanel`, `FlowSimulatorPanel`, `JobPreview`, `ScreenPreview`, `SkillPreview`, `ToolPreview`, `TranslationPreview`) each hand-rolled the same empty-collection state — a muted italic sentence in a plain `div` — and two of them (`AgentPreview`, `ToolPreview`) declared a file-local component literally named `Empty`, which shadowed the shared family in the one place a maintainer would reach for it. They now render `EmptyDescription` from `@object-ui/components`, used alone outside any `Empty` container, so every one of these states carries the family's `data-slot="empty-description"` and is one kind of thing.

Each site keeps its measured size (`text-xs` for the rails, `text-[10px]` for the run-row step log, `text-[11px]` for the translation category card, `text-sm` for the screen body), so the layout delta at every site is zero. The two local `Empty` components are removed.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
Square,
Workflow,
} from 'lucide-react';
import { resolveIcon } from '@object-ui/components';
import { EmptyDescription, resolveIcon } from '@object-ui/components';
import type { ActionParam } from '@object-ui/types';
import { paramDegradesWithoutTarget, resolveParamWidgetType } from '../../../utils/paramToField.js';
import type { MetadataPreviewProps } from '../preview-registry.js';
Expand Down Expand Up @@ -578,7 +578,7 @@ function ResultDialogMock({ dialog }: { dialog: ResultDialog }) {
<div className="p-3 space-y-2 text-xs">
{description && <div className="text-muted-foreground">{description}</div>}
{fields.length === 0 ? (
<div className="text-muted-foreground italic">Renders full JSON response.</div>
<EmptyDescription className="text-xs italic">Renders full JSON response.</EmptyDescription>
) : (
<ul className="space-y-1.5">
{fields.map((f, i) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function AgentPreview({ name, draft }: MetadataPreviewProps) {
{instructions}
</pre>
) : (
<Empty>No system prompt set yet.</Empty>
<EmptyDescription className="text-xs italic">No system prompt set yet.</EmptyDescription>
)}
</Section>

Expand Down Expand Up @@ -189,7 +189,7 @@ export function AgentPreview({ name, draft }: MetadataPreviewProps) {
</RailBlock>
)}
{!planning && !memory && !guardrails && permissions.length === 0 && (
<div className="text-muted-foreground italic">Defaults in use.</div>
<EmptyDescription className="text-xs italic">Defaults in use.</EmptyDescription>
)}
</div>
</div>
Expand Down Expand Up @@ -218,10 +218,6 @@ function Section({
);
}

function Empty({ children }: { children: React.ReactNode }) {
return <div className="text-xs text-muted-foreground italic">{children}</div>;
}

/**
* Tone preset for capability chips. Full Tailwind class strings (JIT)
* with light + dark variants.
Expand Down Expand Up @@ -253,7 +249,7 @@ function ChipList({
<div>
<div className="text-[10px] uppercase text-muted-foreground tracking-wider mb-1">{label}</div>
{items.length === 0 ? (
<div className="text-xs text-muted-foreground italic">{emptyHint}</div>
<EmptyDescription className="text-xs italic">{emptyHint}</EmptyDescription>
) : (
<div className="flex flex-wrap gap-1">
{items.map((it) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

import * as React from 'react';
import { Activity, Database, HardDrive, Lock, Power, ShieldCheck } from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';
import { ExternalDatasourcePanel } from '../external/ExternalDatasourcePanel.js';
Expand Down Expand Up @@ -156,7 +157,7 @@ export function DatasourcePreview({ name, draft }: MetadataPreviewProps) {
{/* Connection config */}
<Section title="Connection" icon={Lock}>
{configEntries.length === 0 ? (
<div className="text-xs text-muted-foreground italic">No config keys set.</div>
<EmptyDescription className="text-xs italic">No config keys set.</EmptyDescription>
) : (
<div className="rounded border bg-background overflow-hidden">
<table className="w-full text-xs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import * as React from 'react';
import { Mail } from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';

Expand Down Expand Up @@ -95,7 +96,7 @@ export function EmailTemplatePreview({ draft }: MetadataPreviewProps) {
<Mail className="h-3 w-3" /> Variables
</div>
{variables.length === 0 ? (
<div className="text-muted-foreground italic">No <code>{'{{var}}'}</code> placeholders found.</div>
<EmptyDescription className="text-xs italic">No <code>{'{{var}}'}</code> placeholders found.</EmptyDescription>
) : (
<div className="space-y-2">
{variables.map((v) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
Variable,
Zap,
} from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';
import { uniqueId, appendArray } from '../inspectors/_shared.js';
Expand Down Expand Up @@ -343,7 +344,7 @@ export function FlowPreview({ draft, editing, selection, onSelectionChange, onPa
<Variable className="h-3 w-3" /> {tr('engine.flowPreview.variables', locale)}
</div>
{variables.length === 0 ? (
<div className="text-muted-foreground italic">{tr('engine.flowPreview.noVars', locale)}</div>
<EmptyDescription className="text-xs italic">{tr('engine.flowPreview.noVars', locale)}</EmptyDescription>
) : (
<ul className="space-y-1.5">
{variables.map((v, i) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import * as React from 'react';
import { AlertCircle, AlertTriangle, CheckCircle2, ChevronDown, ChevronRight, Clock, Loader2, PauseCircle, RefreshCw, SkipForward } from 'lucide-react';
import { cn } from '@object-ui/components';
import { EmptyDescription, cn } from '@object-ui/components';
import { apiBase } from './useFlowNodePalette.js';
import { t as tr, tFormat } from '../i18n.js';

Expand Down Expand Up @@ -346,7 +346,7 @@ function RunRow({ run, locale }: { run: FlowRun; locale?: string }) {
<div className="pb-1 text-[10px] text-rose-600">{runErr}</div>
)}
{steps.length === 0 ? (
<div className="text-[10px] italic text-muted-foreground">{tr('engine.flowRuns.noSteps', locale)}</div>
<EmptyDescription className="text-[10px] italic">{tr('engine.flowRuns.noSteps', locale)}</EmptyDescription>
) : (
<ul>
{buildStepTree(steps).map((node, i) => (
Expand Down Expand Up @@ -403,7 +403,7 @@ export function FlowRunsPanel({ flowName, locale }: { flowName: string; locale?:
{tr('engine.flowRuns.unavailable', locale)}
</div>
) : state === 'ready' && runs.length === 0 ? (
<div className="italic text-muted-foreground">{tr('engine.flowRuns.empty', locale)}</div>
<EmptyDescription className="text-xs italic">{tr('engine.flowRuns.empty', locale)}</EmptyDescription>
) : (
<ul className="min-h-0 flex-1 space-y-1.5 overflow-y-auto">
{runs.map((r) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import * as React from 'react';
import { Play, StepForward, RotateCcw, ChevronRight, AlertTriangle, CircleAlert, Plus, Trash2 } from 'lucide-react';
import { Button, Input, Label, cn } from '@object-ui/components';
import { Button, EmptyDescription, Input, Label, cn } from '@object-ui/components';
import { t as tr, tFormat } from '../i18n.js';
import { FlowSimulator } from './simulator/flow-simulator.js';
import { ScreenPreview } from './ScreenPreview.js';
Expand Down Expand Up @@ -321,7 +321,7 @@ export function FlowSimulatorPanel({ nodes, edges, variables, locale, onRunState
</button>
</div>
{scratch.length === 0 ? (
<div className="italic text-muted-foreground">{tr('engine.flowSim.setVariablesHint', locale)}</div>
<EmptyDescription className="text-xs italic">{tr('engine.flowSim.setVariablesHint', locale)}</EmptyDescription>
) : (
scratch.map((row, i) => (
<div key={i} className="flex items-center gap-1.5">
Expand Down Expand Up @@ -380,7 +380,7 @@ export function FlowSimulatorPanel({ nodes, edges, variables, locale, onRunState
<section className="space-y-1.5">
<div className="font-medium text-muted-foreground">{tr('engine.flowSim.variables', locale)}</div>
{Object.keys(snapshot.variables).length === 0 ? (
<div className="italic text-muted-foreground">{tr('engine.flowSim.noVars', locale)}</div>
<EmptyDescription className="text-xs italic">{tr('engine.flowSim.noVars', locale)}</EmptyDescription>
) : (
<ul className="space-y-1">
{Object.entries(snapshot.variables).map(([k, val]) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
RotateCcw,
Timer,
} from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';

Expand Down Expand Up @@ -345,7 +346,7 @@ export function JobPreview({ name, draft }: MetadataPreviewProps) {
</ScheduleLine>
)}
{!cron && !every && !at && (
<div className="text-muted-foreground italic">No schedule set — runs only when triggered manually.</div>
<EmptyDescription className="text-xs italic">No schedule set — runs only when triggered manually.</EmptyDescription>
)}
</div>
</Section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

import * as React from 'react';
import { Button, cn } from '@object-ui/components';
import { Button, EmptyDescription, cn } from '@object-ui/components';
import { useAdapter } from '../../../providers/AdapterProvider.js';
import { useMetadata } from '../../../providers/MetadataProvider.js';
import { ScreenView, isObjectFormScreen, initialScreenValues, screenFields, type ScreenSpec } from '../../ScreenView.js';
Expand Down Expand Up @@ -74,9 +74,9 @@ export function ScreenPreview({ node, variables, className }: ScreenPreviewProps
</div>
<div className="max-h-[60vh] overflow-auto p-4">
{empty ? (
<p className="text-sm italic text-muted-foreground">
<EmptyDescription className="text-sm italic">
Add a title, description, fields, or an object form to preview this screen.
</p>
</EmptyDescription>
) : (
<>
{title && <h3 className="text-base font-semibold leading-tight">{title}</h3>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
Sparkles,
Wrench,
} from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';

Expand Down Expand Up @@ -104,7 +105,7 @@ export function SkillPreview({ name, draft }: MetadataPreviewProps) {
{/* Tools */}
<Section title={`Tools (${tools.length})`} icon={Wrench}>
{tools.length === 0 ? (
<div className="text-xs text-muted-foreground italic">No tools whitelisted.</div>
<EmptyDescription className="text-xs italic">No tools whitelisted.</EmptyDescription>
) : (
<div className="flex flex-wrap gap-1">
{tools.map((t) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
FileJson,
Wrench,
} from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';

Expand Down Expand Up @@ -182,7 +183,7 @@ export function ToolPreview({ name, draft }: MetadataPreviewProps) {
{/* Parameters */}
<Section title="Input Parameters" count={Object.keys(props).length}>
{Object.keys(props).length === 0 ? (
<Empty>This tool takes no input parameters.</Empty>
<EmptyDescription className="text-xs italic">This tool takes no input parameters.</EmptyDescription>
) : (
<ParamTable props={props} required={required} />
)}
Expand Down Expand Up @@ -293,10 +294,6 @@ function Section({
);
}

function Empty({ children }: { children: React.ReactNode }) {
return <div className="text-xs text-muted-foreground italic">{children}</div>;
}

// `tone` ('green' for Active, 'amber' for Requires confirmation) went away with
// the flag pills themselves — the surviving caller is the neutral object-name
// pill. A tone vocabulary kept alive with no caller is how the removed pills
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
Settings2,
ShieldAlert,
} from 'lucide-react';
import { EmptyDescription } from '@object-ui/components';
import type { MetadataPreviewProps } from '../preview-registry.js';
import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js';

Expand Down Expand Up @@ -150,7 +151,7 @@ function CategoryCard({
</div>
<div className="px-2.5 py-1.5 min-h-[3.5rem]">
{cat.count === 0 ? (
<div className="text-[11px] text-muted-foreground italic">empty</div>
<EmptyDescription className="text-[11px] italic">empty</EmptyDescription>
) : (
<ul className="space-y-0.5 text-[11px]">
{cat.sample.map(([k, v]) => (
Expand Down
Loading
Loading