Relationship Review
v0.4.8Full-page relationship review block with an ER diagram, field metadata panel, review queue, and add/edit dialogs.
Preview
Install & usage
npx shadcn@latest add @signalos/relationships-01Pulls the page source plus its widget dependencies (@signalos/tokens, @signalos/utils, @signalos/button, @signalos/badge, @signalos/select, @signalos/textarea, @signalos/form-dialog, @signalos/split-panel, @signalos/page-header, @signalos/tooltip, @signalos/dialog) into your app - you own the copy. Requires access.
usage
// after: npx shadcn@latest add @signalos/relationships-01
// mount the pulled page in a route, e.g. src/app/semantics-details/page.tsx
import RelationshipReview from "@/components/blocks/relationships-01/RelationsShipReview"
export default function Page() {
return <RelationshipReview />
}Props
InternalRelationship
| Prop | Type | Default | Description |
|---|---|---|---|
| from_table* | string | - | |
| from_column* | string | - | |
| to_table* | string | - | |
| to_column* | string | - | |
| relationship_type* | RelationshipType | - | |
| confidence* | number | - | |
| detection_method* | string | - | |
| explanation | string | undefined | - | |
| review_origin | string | undefined | - |
RelationshipReviewItem
| Prop | Type | Default | Description |
|---|---|---|---|
| index* | number | - | |
| status* | "accepted" | "flagged" | "deleted" | - | |
| feedback* | string | - | |
| edits* | Partial<InternalRelationship> | - |
RelationshipReviewDecision
| Prop | Type | Default | Description |
|---|---|---|---|
| status* | "accepted" | "flagged" | - | |
| feedback* | string | - | |
| edits* | Partial<InternalRelationship> | - |
FieldOverride
| Prop | Type | Default | Description |
|---|---|---|---|
| is_pii* | boolean | - | |
| sensitivity* | SensitivityLevel | - |
RelationshipAddValues
| Prop | Type | Default | Description |
|---|---|---|---|
| from_table* | string | - | |
| from_column* | string | - | |
| to_table* | string | - | |
| to_column* | string | - | |
| relationship_type* | RelationshipType | - | |
| explanation | string | undefined | - |
RelationshipItemEdits
| Prop | Type | Default | Description |
|---|---|---|---|
| from_table* | string | - | |
| from_column* | string | - | |
| to_table* | string | - | |
| to_column* | string | - | |
| relationship_type* | RelationshipType | - | |
| explanation | string | undefined | - |
SubmitRelationshipReviewPayload
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | "confirm" | "retry" | "add_item" | - | |
| items | RelationshipReviewItem[] | undefined | - | |
| field_overrides | Record<string, FieldOverride> | undefined | - | |
| connector_id | string | undefined | - | |
| item_edits | RelationshipAddValues | undefined | - |
AddRelationshipPayload
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | "add_item" | - | |
| connector_id* | string | - | |
| feedback | string | undefined | - | |
| item_edits* | RelationshipItemEdits | - |
AddRelationshipResponse
| Prop | Type | Default | Description |
|---|---|---|---|
| status | string | undefined | - | |
| index | number | undefined | - | |
| item | InternalRelationship | undefined | - | |
| soft_warning | string | undefined | - |
RelationshipFdeInput
| Prop | Type | Default | Description |
|---|---|---|---|
| items* | RelationshipReviewItem[] | - |
RelationshipGraphNode
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| label* | string | - | |
| x* | number | - | |
| y* | number | - | |
| type* | "table" | - |
RelationshipGraphEdge
| Prop | Type | Default | Description |
|---|---|---|---|
| from* | string | - | |
| to* | string | - | |
| label* | string | - | |
| confidence* | number | - |
SchemaColumn
| Prop | Type | Default | Description |
|---|---|---|---|
| column_name* | string | - | |
| data_type* | string | - | |
| is_primary_key | boolean | undefined | - | |
| semantic_label | string | undefined | - | |
| sensitivity | SensitivityLevel | undefined | - |
SchemaTable
| Prop | Type | Default | Description |
|---|---|---|---|
| table_name* | string | - | |
| columns* | SchemaColumn[] | - |
EditRelationshipFormState
| Prop | Type | Default | Description |
|---|---|---|---|
| from_table* | string | - | |
| from_column* | string | - | |
| to_table* | string | - | |
| to_column* | string | - | |
| relationship_type* | RelationshipType | - |
AddRelationshipFormState
| Prop | Type | Default | Description |
|---|---|---|---|
| from_table* | string | - | |
| from_column* | string | - | |
| to_table* | string | - | |
| to_column* | string | - | |
| relationship_type* | RelationshipType | - | |
| explanation* | string | - |
AddRelationshipFormErrors
| Prop | Type | Default | Description |
|---|---|---|---|
| from_table | string | undefined | - | |
| from_column | string | undefined | - | |
| to_table | string | undefined | - | |
| to_column | string | undefined | - |
ResolvedColumnField
| Prop | Type | Default | Description |
|---|---|---|---|
| column_name* | string | - | |
| data_type* | string | - | |
| is_primary_key | boolean | undefined | - | |
| semantic_label | string | undefined | - | |
| sensitivity* | SensitivityLevel | - | |
| isPii* | boolean | - | |
| override* | FieldOverride | undefined | - |
Supporting types
export type SensitivityLevel = "none" | "low" | "medium" | "high" | "pii" | "phi"
export type RelationshipType = | "references" | "has_many" | "belongs_to" | "many_to_many" | "one_to_one" | "measures" | "targets" | "sponsors" | "conducted_at" | "co_occurs" | "related_to"
export type CreateInternalRelationshipPayload = InternalRelationship
More Semantics Stages variants
Changelog
0.4.8
- Global css update
0.4.7
- Replace raw scale token classes with semantic tokens (
text-text-error,bg-bg-error,border-border-warning,border-border-info, etc.) inRelationshipsFieldsPanelandRelationshipsQueueto respect client theme overrides.
0.4.6
- Replace raw scale token classes with semantic tokens (text-text-error, bg-bg-success, border-border-warning, etc.) to respect client theme overrides.
0.4.5
RelationshipsHeader: replace single Dismiss button in error banner with Retry + Dismiss pair; Retry callsonSubmit.RelationshipsHeader: adddata-testid="relationship-retry-button"to the new Retry button.EditRelationshipDialog: replace plaindivfooter containers withDialogFooter; importDialogFooterfrom@/components/ui/dialog.EditRelationshipDialog: removecontentClassName="max-h-[85vh] overflow-y-auto"fromFormDialog.ERDiagram: adddata-testid="er-diagram-canvas"to the root container div.RelationsShipReview: removespace-y-5from the detail panel wrapper div.
0.4.4
- Wrap relationship queue item table and column labels in Tooltip so truncated names are fully visible on hover.
0.4.3
- Remove stray
DialogFooterimport from EditRelationshipDialog; replace with plain flex div since footer is already passed as ReactNode to FormDialog. - Remove
@signalos/dialogfrom registryDependencies — both dialogs use FormDialog only.
0.4.1
- Fix file casing: rename Relationships.types.ts to match PascalCase import paths.
0.4.0
- Fix ERDiagram to use controlled nodes/edges props directly on ReactFlow, removing useNodesState/useEdgesState which silently discarded prop updates after first render.
0.3.1
0.3.0
- Replace
grid grid-cols-1 lg:grid-cols-12layout withSplitPanelwidget for the list/detail split. - Queue (
RelationshipsQueue) moved to theSplitPanellist slot; ER diagram + fields panel moved to the detail slot. - Add
@signalos/split-paneltoregistryDependencies.
0.2.0
- Refactor: lift all business logic, form state, validation, and graph construction into
RelationshipReview(parent). EditRelationshipDialogis now fully presentational — receives controlled form values, column lists, and validation flags via props.RelationshipAddDialogis now fully presentational — receives controlled form state, column lists, and validation errors via props.ERDiagramis now fully presentational — receives pre-builtnodesandedgesvia props; graph construction moved to parent.RelationshipsFieldsPanelnow receivesresolvedColumns(pre-computed field overrides and PII status) instead of deriving them internally.- Added
SchemaTable,SchemaColumn,EditRelationshipFormState,AddRelationshipFormState,AddRelationshipFormErrors, andResolvedColumnFieldtoRelationships.types.ts.
0.1.0
- Initial release: Relationship Review block with ER diagram, field metadata panel, review queue, and add/edit dialogs.
- Dialogs use the
FormDialogwidget. - All state and handler logic wired up in
RelationsShipReview.