nucleus-core-ts 0.9.923 → 0.9.925

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/.build-ok CHANGED
@@ -1 +1 @@
1
- 0.9.923
1
+ 0.9.925
@@ -35,11 +35,15 @@ export function RunPlanIssues({ issues }) {
35
35
  children: [
36
36
  /*#__PURE__*/ _jsx("span", {
37
37
  className: theme.card.title,
38
- children: `Source record #${issue.sourceIndex} ${issue.kind}`
38
+ children: labels.runs.issueHeading(issue.sourceIndex, labels.runs.issueKind(issue.kind) ?? issue.kind)
39
39
  }),
40
40
  /*#__PURE__*/ _jsx("span", {
41
41
  className: theme.field.hint,
42
- children: issue.message
42
+ children: labels.runs.issueReason(issue.kind, {
43
+ field: issue.field,
44
+ value: issue.value,
45
+ dedupKey: issue.dedupKey
46
+ }) ?? issue.message
43
47
  }),
44
48
  issue.dedupKey ? /*#__PURE__*/ _jsx("span", {
45
49
  className: theme.field.hint,
@@ -96,6 +96,19 @@ export type IntegrationsLabels = {
96
96
  alreadyThere: string;
97
97
  fetched: string;
98
98
  unusable: (n: number) => string;
99
+ issueHeading: (sourceIndex: number, kind: string) => string;
100
+ issueKind: (kind: string) => string | null;
101
+ /**
102
+ * The whole reason, composed here from the evidence rather than translated.
103
+ *
104
+ * Returns null for a code with no wording yet, and the caller then prints
105
+ * the server's own sentence — English, but never nothing.
106
+ */
107
+ issueReason: (kind: string, evidence: {
108
+ field?: string;
109
+ value?: string;
110
+ dedupKey?: string | null;
111
+ }) => string | null;
99
112
  kept: string;
100
113
  skipped: string;
101
114
  dedupKey: string;
@@ -89,6 +89,9 @@
89
89
  alreadyThere: 'Already there',
90
90
  fetched: 'Fetched',
91
91
  unusable: (n)=>`${n} record(s) the plan could not use`,
92
+ issueHeading: (sourceIndex, kind)=>`Source record #${sourceIndex} — ${kind}`,
93
+ issueKind: ()=>null,
94
+ issueReason: ()=>null,
92
95
  kept: 'Kept',
93
96
  skipped: 'Skipped',
94
97
  dedupKey: 'Dedup key'
@@ -7,6 +7,9 @@ export type RunIssueValue = {
7
7
  sourceIndex: number;
8
8
  kind: string;
9
9
  message: string;
10
+ /** The column and value the reason is about, so the panel can word it itself. */
11
+ field?: string;
12
+ value?: string;
10
13
  dedupKey?: string | null;
11
14
  /**
12
15
  * What the skipped record mapped to, when the planner could attach it.