zjncs opened a new pull request, #7263:
URL: https://github.com/apache/rocketmq-dashboard/pull/7263
## Problem
`ToolPlaygroundModal.tsx:291` colors the risk tag `riskLevel === 'L1' ?
'green' : 'orange'` — every non-L1 level gets the L2 (medium) color. The
backend enum has three levels (`ToolRiskLevel.java:21-23`), and `L3 =
L3_HIGH_RISK` (destructive changes, gated by `studio.ai.allow-l3-tools`), so in
the very surface an operator uses to vet and manually execute a tool call, a
destructive L3 tool is visually indistinguishable from a previewable L2
mutation. The transcript's `ToolBlock.tsx:60` has the correct map `{L1: green,
L2: orange, L3: red}` — same catalog, same `riskLevel` string, two severity
encodings.
## Fix
Extract `RISK_TAG_COLOR` into the shared render module and use it in both
components.
## Verification
- New `ToolPlaygroundModal` test (none existed): RED — the L3 tag had
`ant-tag-orange`; GREEN — `ant-tag-red`. Also added the missing red-L3 pin to
`ToolBlock.test.tsx` (it did not actually pin it before).
- `npx vitest run` across the playground/ToolBlock/equivalence suites: 78
passed; eslint clean; `tsc -b --noEmit` exit 0.
## Risk
None — visual consistency between two views of the same data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]