You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "chstercc (via GitHub)" <gi...@apache.org> on 2026/10/18 09:05:52 UTC
[PR] fix(web): render an absent trace or consumption time as a placeholder [rocketmq-dashboard]
chstercc opened a new pull request, #6929:
URL: https://github.com/apache/rocketmq-dashboard/pull/6929
### Which Issue(s) This PR Fixes
- Fixes #6868
### Brief Description
Trace nodes and consumer status report "no time" as `0`. The shared `formatTimeMs` deliberately treats zero as a real timestamp (stored values can legitimately be the epoch), so both call sites rendered `1970-01-01 08:00:00.000` for a record that carried no timestamp at all — inside the same dialog whose diagnostics panel labels that value invalid.
Map zero to the placeholder at the two optional-time call sites (`consumeTime` and trace node `timestamp`) while leaving `formatTimeMs`'s epoch handling unchanged.
### How Did You Test This Change?
- `cd web && npx vitest run src/pages/instance/__tests__/MessagePage.test.tsx -t "renders a consumption with no recorded time"` — fails on the parent commit (the trace step renders `1970-01-01`) and passes after the change.
- `cd web && npx vitest run src/pages/instance/__tests__/MessagePage.test.tsx src/utils/format.test.ts src/utils/messageTraceDiagnostics.test.ts` — 68 passed.
- `cd web && npm test` — 1761 passed, 2 timeouts in pre-existing tests (`DLQPage` → `refreshesTheCurrentPageAfterASelectedResendCompletesTest`, `AlertsPage` → `creates the rule enabled because the dialog has no enable control`); both files pass in isolation (71/71), so they are load-related flakes, not regressions.
- `cd web && npm run lint` — 0 errors (10 pre-existing warnings).
- `cd web && npm run build` — passed, including the license check.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`fix:`)
- [x] Tests added or updated for non-trivial changes
- [x] New UI text has both Chinese and English entries under `web/src/i18n/` (no new UI text)
- [x] Architecture constraints stay green (no backend change)
- [x] New source files carry the ASF license header (no new source files)
- [x] Documentation touched where behaviour changed (no user-facing docs needed)
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(web): render an absent trace or consumption time as a placeholder [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #6929:
URL: https://github.com/apache/rocketmq-dashboard/pull/6929
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org