yyqdbngt opened a new pull request, #3876: URL: https://github.com/apache/rocketmq-dashboard/pull/3876
### Motivation The message trace topic preference helpers only tested per-instance normalization, blank-topic removal, and a blanket storage-denied case. This PR grows the suite from 3 to 9 cases. ### Changes - A numeric instance id shares its preference with the equivalent string id, and padded string ids resolve to the same key. - An `undefined` instance id never persists a global preference; reads stay empty. - A padded value already sitting in storage is trimmed on read. - Instance ids containing spaces, slashes, or query characters are URL-encoded, so keys never collide. - A failing `removeItem` does not throw when a blank topic clears the preference. - When the `localStorage` global is unavailable, reads fall back to the provider default and writes are silent no-ops. ### Verification - `vitest run src/utils/messageTraceTopicStorage.test.ts`: 9/9 passed - `tsc --noEmit`: clean - `eslint src/utils/messageTraceTopicStorage.test.ts`: clean -- 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]
