Skip to content

fix(web): disclose a truncated or encoded body in the queue browser - #6871

Closed
iloveeyjafjalla wants to merge 1 commit into
apache:rocketmq-studiofrom
iloveeyjafjalla:codex/queue-browser-body-flags
Closed

iloveeyjafjalla wants to merge 1 commit into
apache:rocketmq-studiofrom
iloveeyjafjalla:codex/queue-browser-body-flags

Conversation

@iloveeyjafjalla

Copy link
Copy Markdown

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.

The message card of the queue browser renders entry.message.body as it arrives: a body the
server cut at its display cap (64 KiB text, 48 KiB base64) or a body it could not decode as
text, which it returns BASE64-encoded. Both facts are on the same record, and the card
already passes propertiesTruncated to the properties panel right below, so the omission is
this surface's alone: the detail modal warns about both flags for the same payload, and the
tool that serves this fetch reports them as first-class output fields.

The card now shows the same two notices, with the copy the detail modal uses.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 08:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.

@github-actions github-actions Bot added the stale label Oct 24, 2026
@github-actions github-actions Bot closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants