yyqdbngt opened a new pull request, #2842: URL: https://github.com/apache/rocketmq-dashboard/pull/2842
## Summary - guard `formatTimeMs` against unparseable store-time values so the table renders the standard `-` placeholder instead of `NaN-NaN-NaN` fields - route the store-time column sorter through a `storeTimeSortValue` helper that pins non-finite values to the epoch, mirroring `toStoreTimestamp` in `api/message.ts` - export both helpers and add regression coverage ## Why The message record `storeTime` is typed as `number | string`, and provider responses can carry empty or malformed timestamps. `new Date()` on such values yields an invalid date, so the cell rendered `NaN-NaN-NaN NaN:NaN:NaN.NaN`, and the column sorter compared `NaN` against real timestamps, producing unstable ordering. ## Testing - `cd web && ./node_modules/.bin/vitest run src/pages/instance/__tests__/MessageTimeFormat.test.ts` — 6 passed - `cd web && ./node_modules/.bin/tsc --noEmit` — clean - `cd web && ./node_modules/.bin/eslint src/pages/instance/message.tsx src/pages/instance/__tests__/MessageTimeFormat.test.ts` — 0 errors -- 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]
