iloveeyjafjalla opened a new pull request, #6871: URL: https://github.com/apache/rocketmq-dashboard/pull/6871
Fixes #6870 ## The defect The queue browser's message card rendered the body payload as it arrived: a body the server cut at its display cap (64 KiB text / 48 KiB base64) or one it could not decode as text, which it returns BASE64-encoded. Both facts are on the record the card already uses — and it forwards `propertiesTruncated` to the properties panel right below — but the body itself was presented as the whole message. The detail modal warns about both flags for the same payload, and the tool serving this fetch declares them as first-class output fields. ## The fix The Body card renders the same two notices the detail modal renders, with the same copy (`messagePage.bodyTruncatedWarning`, `messagePage.bodyBinaryWarning`): a warning for a truncated body and an info notice for a base64-encoded one. No new strings, no service change. ## Tests Red before the change: ``` FAIL > discloses a truncated or encoded body of a pulled queue message Unable to find an element with the text: 消息体超过服务端展示上限,已被截断;此处展示与下载的内容都不完整。 ``` The new case pulls one message with `bodyTruncated: true, bodyEncoding: 'BASE64'` and asserts both notices; the existing properties-notice case keeps covering the panel below it. Green after: ``` Test Files 1 passed (1) Tests 21 passed (21) (QueueBrowser.test.tsx) tsc -b exit 0 eslint exit 0 (the one warning in QueueBrowser.tsx predates this change) prettier --check All matched files use Prettier code style! ``` ## Scope Distinct from the open #5638 / merged #4870–#4872 work, which is the detail modal: that surface already discloses these flags, this one never did. -- 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]
