Signal Rules
v0.3.0Full-page signal rule review block with a queue, detail panel, and add-rule dialog.
Preview
Install & usage
npx shadcn@latest add @signalos/signal-rules-01Pulls the page source plus its widget dependencies (@signalos/tokens, @signalos/utils, @signalos/badge, @signalos/button, @signalos/command, @signalos/form-dialog, @signalos/text-field, @signalos/popover, @signalos/select, @signalos/textarea, @signalos/tooltip, @signalos/equilibrium-01, @signalos/split-panel, @signalos/page-header, @signalos/input, @signalos/label, @signalos/dialog) into your app - you own the copy. Requires access.
usage
// after: npx shadcn@latest add @signalos/signal-rules-01
// mount the pulled page in a route, e.g. src/app/semantics-details/page.tsx
import SignalRules from "@/components/blocks/signal-rules-01/SignalRules"
export default function Page() {
return <SignalRules />
}Props
SignalRuleCondition
| Prop | Type | Default | Description |
|---|---|---|---|
| direction* | SignalRuleDirection | - | |
| metric_patterns* | string[] | - |
SignalRule
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| name* | string | - | |
| description* | string | - | |
| boost* | number | - | |
| confidence* | number | - | |
| time_window_hours* | number | - | |
| conditions* | SignalRuleCondition[] | - | |
| review_origin | string | null | undefined | - |
SignalRulesArtifact
| Prop | Type | Default | Description |
|---|---|---|---|
| rules* | SignalRule[] | - |
SignalRuleReviewItem
| Prop | Type | Default | Description |
|---|---|---|---|
| index* | number | - | |
| status* | "accepted" | "flagged" | "deleted" | - | |
| feedback* | string | - | |
| edits* | Partial<Pick<SignalRule, "name" | "description" | "confidence" | "boost" | "time_window_hours"> & { conditions: SignalRuleCondition[]; }> | - | |
| connector_id | string | undefined | - | |
| item_id | string | undefined | - |
MetricCatalogEntry
| Prop | Type | Default | Description |
|---|---|---|---|
| display_name | string | null | undefined | - | |
| description | string | null | undefined | - | |
| direction | MetricDirection | null | undefined | - | |
| unit | string | null | undefined | - | |
| connector_id | string | null | undefined | - | |
| source_cluster | string | null | undefined | - | |
| is_cross_source | boolean | null | undefined | - | |
| source_entities | string[] | null | undefined | - | |
| sql_logic | string | null | undefined | - |
SubmitSignalRulesReviewPayload
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | "confirm" | "retry" | - | |
| items | SignalRuleReviewItem[] | undefined | - |
SignalRuleItemEdits
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | undefined | - | |
| name* | string | - | |
| description* | string | - | |
| boost* | number | - | |
| confidence* | number | - | |
| time_window_hours* | number | - | |
| conditions* | SignalRuleCondition[] | - |
AddSignalRulePayload
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | "add_item" | "improve_new_item" | - | |
| feedback | string | undefined | - | |
| item_edits* | SignalRuleItemEdits | - | |
| connector_id | string | undefined | - |
AddSignalRuleResponse
| Prop | Type | Default | Description |
|---|---|---|---|
| status | string | undefined | - | |
| item | SignalRule | undefined | - | |
| soft_warning | string | undefined | - |
Supporting types
export type SignalRuleDirection = "above" | "below" | "any"
export type MetricDirection = "up_is_good" | "down_is_good" | "neutral"
export type MetricCatalog = Record<string, MetricCatalogEntry>
More Semantics Stages variants
Changelog
0.3.0
- Decompose
SignalRulesintoEditConditionRow,RuleEditView,RuleReadView,SignalRuleAddDialog,SignalRuleDetail, andSignalRuleQueuesubcomponents undercomponents/. - Add
EditConditionRowwith multi-select popover for condition field values; wiregetMetricConnectorIdandMetricInfoButtonfromequilibrium-01.
0.2.10
- Replace raw scale token classes with semantic tokens (text-text-error, bg-bg-success, border-border-warning, etc.) to respect client theme overrides.
0.2.9
- Fix cross-item imports to use canonical @/components paths; add missing signalos.category to manifests.
0.2.8
SignalRules: removemetricPickerOpenandonMetricPickerChangeprops (metric picker open state is now internal toSignalRuleDetail).SignalRules: removeaddMetricPickerOpenandonAddDialogMetricPickerChangeprops (add-dialog picker state is now internal toSignalRuleAddDialog).SignalRules: addSplitPanelListHeaderimport; exposeonImproveWithAicallback (was previously commented out).SignalRules: rename confirm buttondata-testidfromsignal-rules-confirm-buttontosignal-rules-submit-button.SignalRules: update header description — remove "AI-generated" qualifier.SignalRules: move confirmed banner outsidePageHeaderwith updated border/background tokens; removeCheckCircle2icon.SignalRules.types.ts: defineMetricCatalogandMetricCatalogEntrylocally; remove import frommetrics-01.- Remove
@signalos/metrics-01fromregistryDependencies.
0.2.7
- Replace raw Dialog/DialogFooter with FormDialog in SignalRuleAddDialog; custom footer carries error banner + cancel/save buttons.
- Replace Label + Input for Name and Time Window fields with TextField widget; Description textarea keeps inline label + aria-invalid pattern.
- Swap
@signalos/dialog,@signalos/input,@signalos/label→@signalos/form-dialog,@signalos/text-fieldin registryDependencies.
0.2.5
- Content updates.
0.2.4
- Content updates.
0.2.1
0.2.0
- Replace desktop
lg:grid-cols-12layout withSplitPanelwidget for the queue/detail split. - Mobile tab-switcher layout unchanged;
SplitPanelis shown only onlg:and above. - Add
@signalos/split-paneltoregistryDependencies.