Some badges in the tool testing surface print values from the API response directly, so the text is not translatable and its wording depends on what the backend sends. e.g.
src/components/tools/ToolPreviewResult.tsx:78 renders the preview target. formatTarget at lines 211 to 216 builds the string by concatenation:
return gateway ? `${kind ?? "target"}: ${gateway}` : kind;
kind comes from the response and is printed as received, giving output such as "federated: AWS Knowledge". The separator is hardcoded and there is no message id, so es-ES and pt-BR cannot reach it. When kind is missing, the fallback prints the English word "target" whatever the locale.
src/components/tools/ToolResultRenderer.tsx:135 renders block.type from the MCP content block into a badge the same way.
The preview target should also stop being a badge. The design for result metadata renders it as one run of plain text with middot separators, leading with a status icon: example. The surrounding line already follows that pattern, since the icon, the status label and the duration at ToolPreviewResult.tsx:60-80 are plain spans. The target badge at line 77 is the one element breaking it.
Proposed change for the target: render it as another item in that metadata run rather than as a badge, and map the known values to message ids, with separate strings for the local and federated cases taking the source name as a parameter so wording and word order stay translatable. Omit the item rather than printing a raw value when there is no match. The separator at line 70 is currently a hyphen and should be a middot to match the design.
Proposed change for the content block type: map the known values to message ids and hide the badge when there is no match. This one sits next to an h5 labelling an individual content block rather than in a result metadata line, so the frame above does not settle whether it stays a badge.
Scope is the web UI only, no API change, and no work on the Admin UI. This surface is live in the Tools drawer today, so it is not limited to contextforge-org/contextforge-web-ui#90.
Some badges in the tool testing surface print values from the API response directly, so the text is not translatable and its wording depends on what the backend sends. e.g.
src/components/tools/ToolPreviewResult.tsx:78 renders the preview target. formatTarget at lines 211 to 216 builds the string by concatenation:
return gateway ? `${kind ?? "target"}: ${gateway}` : kind;kind comes from the response and is printed as received, giving output such as "federated: AWS Knowledge". The separator is hardcoded and there is no message id, so es-ES and pt-BR cannot reach it. When kind is missing, the fallback prints the English word "target" whatever the locale.
src/components/tools/ToolResultRenderer.tsx:135 renders block.type from the MCP content block into a badge the same way.
The preview target should also stop being a badge. The design for result metadata renders it as one run of plain text with middot separators, leading with a status icon: example. The surrounding line already follows that pattern, since the icon, the status label and the duration at ToolPreviewResult.tsx:60-80 are plain spans. The target badge at line 77 is the one element breaking it.
Proposed change for the target: render it as another item in that metadata run rather than as a badge, and map the known values to message ids, with separate strings for the local and federated cases taking the source name as a parameter so wording and word order stay translatable. Omit the item rather than printing a raw value when there is no match. The separator at line 70 is currently a hyphen and should be a middot to match the design.
Proposed change for the content block type: map the known values to message ids and hide the badge when there is no match. This one sits next to an h5 labelling an individual content block rather than in a result metadata line, so the frame above does not settle whether it stays a badge.
Scope is the web UI only, no API change, and no work on the Admin UI. This surface is live in the Tools drawer today, so it is not limited to contextforge-org/contextforge-web-ui#90.