Skip to content

fix(message): flag server-truncated message bodies and properties in the detail panel - #5638

Open
zjncs wants to merge 6 commits into
apache:masterfrom
zjncs:fix/message-body-truncated-badge
Open

zjncs wants to merge 6 commits into
apache:masterfrom
zjncs:fix/message-body-truncated-badge

Conversation

@zjncs

@zjncs zjncs commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Problem

RocketMQMessageProvider caps the display body at 64 KiB (48 KiB for binary) and limits displayed properties; MessageRecordVO carries bodyTruncated / bodyEncoding / propertiesTruncated precisely so the UI can say so.

The message page ignored all three:

  • the MessageRecord TS interface did not declare them;
  • the detail panel rendered the (possibly partial) body with no indication — a user inspecting a large message saw a truncated body and believed it complete.

The DLQ page already surfaces propertiesTruncated with a warning line; the message page is the inconsistent one.

Fix

  • add bodyEncoding / bodyTruncated / propertiesTruncated to the MessageRecord TS interface (optional, matching the VO);
  • render a warning line between the body title and the body whenever the server truncated either part (localized via new messagePage.bodyTruncated / messagePage.propertiesTruncated keys);
  • both flags shown together are joined with ·.

Verification (red → green + mutation)

  • New test: a message with both truncation flags renders the warning line on the detail panel (flags a server-truncated message body and properties on the detail panel).
  • Mutation (badge + i18n reverted): new test fails 1/15; with the fix: 15/15 passed (MessagePage.test.tsx).

Collision note

11 open PRs touch message.tsx; this change is confined to the block between the topic.messageBody title (~L946) and the body Paragraph (~L955). The nearest occupier hunk is #5231 at L965 (a time-formatter rename three rows above) — disjoint.

…the detail panel

RocketMQMessageProvider caps the display body at 64 KiB (48 KiB for
binary) and limits displayed properties, and MessageRecordVO carries
bodyTruncated / bodyEncoding / propertiesTruncated so the UI can say so.
The message page ignored all three: the MessageRecord TS type did not
declare them and the detail panel rendered the (possibly partial) body
with no indication - a user inspecting a large message saw a truncated
body and believed it complete. The DLQ page already surfaces
propertiesTruncated with a warning line, so the message page is the
inconsistent one.

- add bodyEncoding / bodyTruncated / propertiesTruncated to the
  MessageRecord TS interface (optional, matching the VO);
- render a warning line between the body title and the body whenever
  the server truncated either part (localized, unlike the DLQ page's
  hardcoded string);
- add messagePage.bodyTruncated / propertiesTruncated i18n keys.

Test: a message with both truncation flags set renders the warning line
on the detail panel. Mutation (badge reverted): the new test fails
1/15; with the fix: 15/15 passed.

Signed-off-by: zjncs <18910855655@163.com>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:49

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.

zjncs added 2 commits October 12, 2026 19:03
Re-touching so the stale bot clock restarts; the branch is unchanged and ready for review.

Signed-off-by: zjncs <18910855655@163.com>
Signed-off-by: zjncs <18910855655@163.com>
zjncs added 3 commits October 17, 2026 19:02
Signed-off-by: zjncs <18910855655@163.com>
Signed-off-by: zjncs <18910855655@163.com>
Signed-off-by: zjncs <18910855655@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants