unbridled-41 opened a new pull request, #5920: URL: https://github.com/apache/rocketmq-dashboard/pull/5920
### Which Issue(s) This PR Fixes Fixes #5919 ### Problem / Evidence The provider leaves `delaySeconds` at its zero default when it cannot compute a delay and says so through a second field (`RocketMQMetadataProvider`: `int delaySeconds = 0; boolean timestampAvailable = false;` ... `// No consume stats (e.g. POP-only group without an offset table): keep zeros.`; `ConsumerGroupVO.consumptionTimestampAvailable` = "Whether broker consume stats include a consumed-message timestamp for delay calculation"). The console never read it (`web/src` has no reference to the field), so the column and the drawer rendered `formatDelay(0)` = `0秒` - "fully caught up" - and the sort key was that zero: ``` ConsumerPage: reports a group without a consumed-message timestamp as an unknown delay TestingLibraryElementError: Unable to find an element with the text: 不可用 ``` The sibling columns of the same table already treat "not measured" explicitly: `totalLag`/`onlineInstances` arrive as `-1` and render 不可用 (`utils/consumerLag.ts`, `consumerConnections.ts`). ### Root cause / Fix A placeholder zero consumed as a measurement. Declare the flag on the client type, render 不可用 when it is false (column and drawer), and give the column a direction-aware sort key so unmeasured rows stay after measured ones in both orders - the same treatment the other columns of this page got. ### Priority and scoring **PRIORITY 55** — impact 18/40 (a group that may be lagging is presented as caught up, in the list, the drawer and the order), blast radius 12/20 (groups without a consumed-message timestamp, e.g. POP-only ones), reproducibility 18/20 (deterministic, pinned by the new test), maintenance value 7/20. **FIX_CONFIDENCE 85** — the flag exists precisely for this decision and the pattern is already used by two sibling columns. ### Tests `cd web && npx vitest run src/pages/instance/__tests__/ConsumerPage.test.tsx` -> `Tests 48 passed`. | Test | Before | After | |---|---|---| | `reports a group without a consumed-message timestamp as an unknown delay` | FAIL (row shows `0秒`, no 不可用) | PASS | The new case also asserts the drawer and that a descending sort does not promote the unmeasured row. `npx eslint` reports no errors; `npx tsc -b` passes. ### Risk Only groups whose delay is explicitly flagged as unmeasured change; providers that do not send the flag (cloud providers, mock) keep today's rendering because the check is `=== false`. -- 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]
