@ethisyscore/plugin-ui 1.92.1 → 1.93.0

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.
@@ -144,8 +144,24 @@ interface MappingCompletenessBannerProps {
144
144
  /**
145
145
  * Opens the manual mapping editor for an operation. The consumer owns the editor surface and
146
146
  * routing; the banner only raises intent.
147
+ *
148
+ * Every known consumer wires this to the request/response translation editor, which is why the
149
+ * row control is labelled for what it opens rather than for this prop's name. Kept required
150
+ * because it always was: making it optional would let a consumer render rows with no action.
147
151
  */
148
152
  onOpenMappingEditor: (operation: MappingCompletenessItem) => void;
153
+ /**
154
+ * OPTIONAL, and the preferred wiring. Jumps straight to the operation's REQUEST-FIELD
155
+ * TRANSLATION editor — the "Configure field translation" surface — rather than to whatever general
156
+ * mapping surface `onOpenMappingEditor` happens to open.
157
+ *
158
+ * @remarks
159
+ * Optional on purpose. This package is pinned independently by every plugin, so a required prop
160
+ * would break every consumer that has not been updated. When it is absent the row falls back to
161
+ * `onOpenMappingEditor` with identical rendering, so an un-updated consumer keeps exactly the
162
+ * behaviour it had and still gains the corrected copy.
163
+ */
164
+ onConfigureTranslation?: (operation: MappingCompletenessItem) => void;
149
165
  /**
150
166
  * Operation key currently awaiting an AI suggestion, or `null`. Drives the per-row spinner and
151
167
  * disabled state so a slow suggestion does not lock the whole banner.
@@ -181,8 +197,22 @@ interface MappingCompletenessBannerProps {
181
197
  *
182
198
  * A row without the "No tool mapped" chip already HAS a tool and needs its fields mapped. That chip
183
199
  * is the only thing distinguishing the two states, which is why the prose points at it.
200
+ *
201
+ * **The second wording fix, from a production report.** Saying "fields" was necessary but not
202
+ * sufficient. An operator read "fields that aren't mapped to this connector's tools", concluded the
203
+ * TOOL was unmapped (it was not), and had no idea which control closed the gap — the text named an
204
+ * abstraction, "the mapping editor", and never the affordance on screen. So the copy now names the
205
+ * thing that is missing (the REQUEST-FIELD TRANSLATION, canonical field name → the tool's own
206
+ * parameter name) and the control that supplies it ("Configure field translation"), and every
207
+ * listed operation carries that control inline. Their words: "it doesnt really suggest how to fix
208
+ * it".
209
+ *
210
+ * That label is not invented here: it is the verbatim tooltip and aria-label of the per-row gear in
211
+ * every consumer's `ConnectorMappingView` (host gogo-ui, self-healing, tech, timesheets, sales). The
212
+ * prose has to name a string the operator can actually find on the page, so a near-miss paraphrase
213
+ * would reintroduce the defect in a quieter form.
184
214
  */
185
- declare function MappingCompletenessBanner({ operations, onSuggestWithAi, onOpenMappingEditor, suggestingOperationKey, disableSuggest, }: MappingCompletenessBannerProps): react.JSX.Element | null;
215
+ declare function MappingCompletenessBanner({ operations, onSuggestWithAi, onOpenMappingEditor, onConfigureTranslation, suggestingOperationKey, disableSuggest, }: MappingCompletenessBannerProps): react.JSX.Element | null;
186
216
 
187
217
  interface ConnectorMappingTranslationEditorProps {
188
218
  open: boolean;
@@ -144,8 +144,24 @@ interface MappingCompletenessBannerProps {
144
144
  /**
145
145
  * Opens the manual mapping editor for an operation. The consumer owns the editor surface and
146
146
  * routing; the banner only raises intent.
147
+ *
148
+ * Every known consumer wires this to the request/response translation editor, which is why the
149
+ * row control is labelled for what it opens rather than for this prop's name. Kept required
150
+ * because it always was: making it optional would let a consumer render rows with no action.
147
151
  */
148
152
  onOpenMappingEditor: (operation: MappingCompletenessItem) => void;
153
+ /**
154
+ * OPTIONAL, and the preferred wiring. Jumps straight to the operation's REQUEST-FIELD
155
+ * TRANSLATION editor — the "Configure field translation" surface — rather than to whatever general
156
+ * mapping surface `onOpenMappingEditor` happens to open.
157
+ *
158
+ * @remarks
159
+ * Optional on purpose. This package is pinned independently by every plugin, so a required prop
160
+ * would break every consumer that has not been updated. When it is absent the row falls back to
161
+ * `onOpenMappingEditor` with identical rendering, so an un-updated consumer keeps exactly the
162
+ * behaviour it had and still gains the corrected copy.
163
+ */
164
+ onConfigureTranslation?: (operation: MappingCompletenessItem) => void;
149
165
  /**
150
166
  * Operation key currently awaiting an AI suggestion, or `null`. Drives the per-row spinner and
151
167
  * disabled state so a slow suggestion does not lock the whole banner.
@@ -181,8 +197,22 @@ interface MappingCompletenessBannerProps {
181
197
  *
182
198
  * A row without the "No tool mapped" chip already HAS a tool and needs its fields mapped. That chip
183
199
  * is the only thing distinguishing the two states, which is why the prose points at it.
200
+ *
201
+ * **The second wording fix, from a production report.** Saying "fields" was necessary but not
202
+ * sufficient. An operator read "fields that aren't mapped to this connector's tools", concluded the
203
+ * TOOL was unmapped (it was not), and had no idea which control closed the gap — the text named an
204
+ * abstraction, "the mapping editor", and never the affordance on screen. So the copy now names the
205
+ * thing that is missing (the REQUEST-FIELD TRANSLATION, canonical field name → the tool's own
206
+ * parameter name) and the control that supplies it ("Configure field translation"), and every
207
+ * listed operation carries that control inline. Their words: "it doesnt really suggest how to fix
208
+ * it".
209
+ *
210
+ * That label is not invented here: it is the verbatim tooltip and aria-label of the per-row gear in
211
+ * every consumer's `ConnectorMappingView` (host gogo-ui, self-healing, tech, timesheets, sales). The
212
+ * prose has to name a string the operator can actually find on the page, so a near-miss paraphrase
213
+ * would reintroduce the defect in a quieter form.
184
214
  */
185
- declare function MappingCompletenessBanner({ operations, onSuggestWithAi, onOpenMappingEditor, suggestingOperationKey, disableSuggest, }: MappingCompletenessBannerProps): react.JSX.Element | null;
215
+ declare function MappingCompletenessBanner({ operations, onSuggestWithAi, onOpenMappingEditor, onConfigureTranslation, suggestingOperationKey, disableSuggest, }: MappingCompletenessBannerProps): react.JSX.Element | null;
186
216
 
187
217
  interface ConnectorMappingTranslationEditorProps {
188
218
  open: boolean;
@@ -850,6 +850,7 @@ function MappingCompletenessBanner({
850
850
  operations,
851
851
  onSuggestWithAi,
852
852
  onOpenMappingEditor,
853
+ onConfigureTranslation,
853
854
  suggestingOperationKey = null,
854
855
  disableSuggest = false
855
856
  }) {
@@ -875,7 +876,8 @@ function MappingCompletenessBanner({
875
876
  !op.isToolMapped && /* @__PURE__ */ jsx(Chip, { label: "No tool mapped", size: "small", color: "warning", variant: "outlined" })
876
877
  ] }),
877
878
  /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
878
- "Unmapped required fields: ",
879
+ "Unmapped required request fields:",
880
+ " ",
879
881
  op.unmappedRequiredCanonicalFields.join(", ")
880
882
  ] })
881
883
  ] }),
@@ -899,8 +901,8 @@ function MappingCompletenessBanner({
899
901
  size: "small",
900
902
  variant: "text",
901
903
  color: "primary",
902
- onClick: () => onOpenMappingEditor(op),
903
- children: "Open mapping editor"
904
+ onClick: () => (onConfigureTranslation ?? onOpenMappingEditor)(op),
905
+ children: "Configure field translation"
904
906
  }
905
907
  )
906
908
  ] })
@@ -910,20 +912,29 @@ function MappingCompletenessBanner({
910
912
  };
911
913
  return /* @__PURE__ */ jsxs(Box, { sx: { mb: 2 }, children: [
912
914
  required.length > 0 && /* @__PURE__ */ jsxs(Alert, { severity: "warning", sx: { mb: optional.length > 0 ? 2 : 0 }, children: [
913
- /* @__PURE__ */ jsx(AlertTitle, { children: "Required operations aren't fully mapped" }),
915
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Required operations are missing request-field mappings" }),
916
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
917
+ required.length === 1 ? "1 required operation declares" : `${required.length} required operations declare`,
918
+ " ",
919
+ `canonical request fields that aren't mapped to any parameter the tool accepts. The missing piece is the REQUEST-FIELD TRANSLATION: the per-operation map from the operation's canonical field names to the tool's own parameter names. It is not the tool binding, which a row without a "No tool mapped" chip already has. Ethisys Core can't run these reliably until every listed field is translated, and auto-match picks the TOOL, not its fields, so it won't clear them on its own.`
920
+ ] }),
914
921
  /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: { mb: 1.5 }, children: [
915
- required.length === 1 ? "1 required operation has" : `${required.length} required operations have`,
922
+ 'Fix each operation below with "Configure field translation": for every field listed, enter the parameter name the tool actually expects, for example a canonical',
923
+ " ",
924
+ /* @__PURE__ */ jsx(Box, { component: "code", children: "startDate" }),
925
+ " the tool calls",
916
926
  " ",
917
- `fields that aren't mapped to this connector's tools yet. Ethisys Core can't run these reliably until every required field is mapped. Auto-match picks the TOOL, not its fields, so it won't clear these on its own: use "Suggest with AI" or the mapping editor per operation.`
927
+ /* @__PURE__ */ jsx(Box, { component: "code", children: "start_date" }),
928
+ '. "Suggest with AI" proposes the same translation for you to review in that editor before saving.'
918
929
  ] }),
919
930
  /* @__PURE__ */ jsx(Stack, { spacing: 1.5, children: required.map(renderRow) })
920
931
  ] }),
921
932
  optional.length > 0 && /* @__PURE__ */ jsxs(Alert, { severity: "info", children: [
922
- /* @__PURE__ */ jsx(AlertTitle, { children: "Optional operations aren't fully mapped" }),
933
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Optional operations are missing request-field mappings" }),
923
934
  /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: { mb: 1.5 }, children: [
924
- optional.length === 1 ? "1 optional operation has fields that aren't" : `${optional.length} optional operations have fields that aren't`,
935
+ optional.length === 1 ? "1 optional operation declares request fields that aren't" : `${optional.length} optional operations declare request fields that aren't`,
925
936
  " ",
926
- `mapped to this connector's tools. These power extra capabilities (e.g. pull-request quality and check-run insights) and stay off until their fields are mapped \u2014 safe to leave if you don't need them, or if this connector doesn't provide a matching tool. Each row below lists exactly which fields are missing; a row without a "No tool mapped" chip already HAS a tool and needs its fields mapped, which auto-match does not do.`
937
+ `mapped to the tool's own parameter names. These power extra capabilities and stay off until that request-field translation is supplied, so they are safe to leave if you don't need them, or if this connector exposes no matching tool. Each row below lists exactly which fields are missing; a row without a "No tool mapped" chip already HAS a tool and needs only its fields translated, which auto-match does not do. Use "Configure field translation" on the row to supply it.`
927
938
  ] }),
928
939
  /* @__PURE__ */ jsx(Stack, { spacing: 1.5, children: optional.map(renderRow) })
929
940
  ] })