zmuxuny opened a new pull request, #6381:
URL: https://github.com/apache/rocketmq-dashboard/pull/6381

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6370
   
   ### Brief Description
   
   Preserve nonblank custom-property values entered in the Topic Send Message 
form. The form previously displayed the original input while preflight silently 
trimmed it and sent the altered value.
   
   Only form values change: property names still normalize, blank rows are 
ignored, empty and whitespace-only values keep their existing empty-string 
behavior, and batch-text parsing stays unchanged.
   
   The regression opens the real Send modal, fills actual fields and verifies 
both the outgoing service request and the visible UTF-8 size summary. ASCII and 
Unicode surrounding spaces are message data, not just display formatting.
   
   ### How Did You Test This Change?
   
   Base: rocketmq-studio at 779b8c0e7aed2396d3cc72743dcd544ea48e9ae6. 
Independent review passed. Full frontend suite/backend tests were not run 
locally; CI remains to be verified.
   
   All test fixtures are synthetic and all service/API interactions are mocked; 
no broker, account or credentials were used. The installed local CLI entry 
points below avoid package-manager downloads and update checks.
   
   - On unchanged production, the final added tests fail in four places: padded 
ASCII/Unicode values in both the real Send request and the preview helper. 
Seven compatibility controls pass.
   - `cd web && node node_modules/vitest/vitest.mjs run 
src/pages/instance/__tests__/TopicPage.test.tsx 
src/utils/messagePayloadPreview.test.ts src/utils/messageProperties.test.ts 
--maxWorkers=1` — 3 files, 72 passed.
   - `node node_modules/vitest/vitest.mjs run src/api/metadata.test.ts 
src/services/topicService.test.ts --maxWorkers=1` — 2 files, 15 passed.
   - `node node_modules/eslint/bin/eslint.js .` — 0 errors, 10 existing 
warnings in unchanged files.
   - `node node_modules/typescript/bin/tsc -b && node 
node_modules/vite/bin/vite.js build && node scripts/licenses.mjs check` — 
passed; license verification covers 133 actual components and 140 license files.
   - `git diff --check` — passed.
   
   With property name `tenant` (6 UTF-8 bytes), the real modal now previews and 
sends:
   
   | Value | Value bytes | Visible property-size summary | Previous summary |
   | --- | ---: | ---: | ---: |
   | `"  tenant-blue  "` | 15 | 21 B | 17 B |
   | `"\u3000租户一\u3000"` | 15 | 21 B | 15 B |
   | `"tenant-blue"` | 11 | 17 B | 17 B |
   
   These counts use the existing preview definition (property-name plus value 
bytes); they do not claim to measure protocol framing.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`fix(message): preserve 
nonblank custom property values`)
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(no new UI text)
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks) — not run; no backend change
   - [x] New source files carry the ASF license header (no new source files)
   - [x] Documentation touched where behaviour changed (README / `docs/` / 
in-app help) — existing preview/send contract restored; issue and regression 
tests document the value semantics
   


-- 
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]

Reply via email to