tju-yxq opened a new pull request, #6155:
URL: https://github.com/apache/rocketmq-dashboard/pull/6155
> Resubmission of #5402 — the original PR and its linked issue were closed
by the repo's 7-day stale bot while awaiting review, not because the change was
rejected. The fix is rebased unchanged onto the current `rocketmq-studio` head
(5e4c39b0) and the linked issue is still reproducible on trunk.
> The original linked issue met the same stale fate and could not be
reopened, so this PR fixes a fresh report of the same problem (see the linked
issue).
### Which Issue(s) This PR Fixes
- Fixes #6154
### Brief Description
`runTraceQuery` passed the custom trace topic to both trace APIs raw; it now
trims it first (`normalizedTraceTopic`), mirroring `loadMessageTrace`, which
already normalizes before both the cache key and the request. The query value
itself was already trimmed; only the topic argument was left raw. Persistence
and history replay were already trimming — this closes the last untrimmed path
for the field.
### How Did You Test This Change?
```
cd web && npm test -- MessagePageAsyncState.test.tsx --run
Test Files 1 passed (1)
Tests 23 passed (23)
```
One new test mirrors the existing manual key-trace test but types `
CUSTOM_TRACE ` (padded) and asserts `getMessageTraceByKey` receives
`CUSTOM_TRACE` — the value every other path for the field already produces. The
22 existing tests (lazy trace loads, cache reuse, per-instance topic
persistence, history replay, stale-response guards) pass unchanged.
```
cd web && npm run lint
✖ 10 problems (0 errors, 10 warnings) # the trunk baseline
```
```
cd web && npx tsc -b --force
(no output — exit 0)
```
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits
- [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)
- [x] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) (no Java changes)
- [x] New source files carry the ASF license header (no new source files)
- [ ] Documentation touched where behaviour changed (normalization fix only)
--
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]