You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "unbridled-41 (via GitHub)" <gi...@apache.org> on 2026/10/03 03:35:12 UTC
[PR] fix(alerts): scope the header count to the page it counted [rocketmq-dashboard]
unbridled-41 opened a new pull request, #5445:
URL: https://github.com/apache/rocketmq-dashboard/pull/5445
## Problem / Evidence
The system-alerts header reads **"集群运行告警监控,当前 {n} 条未确认"**, but `n` is counted from the rows of the current page:
- `web/src/pages/ops/systemAlerts.tsx:241` — `const unackCount = alerts.filter((a) => !a.acknowledged).length;` where `alerts` is only the current page (`:209 setAlerts(data.items)`), page size 20 (`:160`), with pagination shown once `total > pageSize` (`:834-843`).
- Reproduction: a feed with more than 20 alerts → the number changes as the operator pages (and never exceeds 20) while the subtitle presents it as the feed's backlog. The per-level badges (`:507-515`) count the same page-scoped array.
## Root cause / Fix
A page-scoped array drives a headline that is labelled (and positioned) as a feed-wide number. Make the scope explicit:
```
zh: '集群运行告警监控,本页 {n} 条未确认'
en: 'Cluster alert monitoring, {n} unacknowledged on this page'
```
A true total would need an aggregate the list API does not return (`SystemAlertController.listAlertsPage` has no acknowledged filter and no counts), so that is deliberately left as a follow-up rather than invented client-side.
## Priority & scoring
PRIORITY 55 = 影响 12 (the headline understates the unacknowledged backlog and moves as the operator pages) + 波及 8 (system-alerts header and badges) + 可复现 20 (deterministic with more than one page) + 维护价值 15 (states the real scope instead of implying a total).
FIX_CONFIDENCE 85: a copy change matching the data actually rendered, pinned by a regression.
## Tests
```
cd web && npx vitest run src/pages/ops/__tests__/SystemAlertsPage.test.tsx
```
- Red before the fix: `scopes the header unacknowledged count to the page it counted` fails — `Unable to find an element with the text: /本页 1 条未确认/`.
- Green after: `Tests 19 passed (19)` (the new test renders a 60-alert feed whose first page holds one unacknowledged alert).
- `npx tsc -b` and `npx eslint` on both files: clean.
## Risk
None beyond wording; no request or state changes.
--
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(alerts): scope the header count to the page it counted [rocketmq-dashboard]
Posted by "unbridled-41 (via GitHub)" <gi...@apache.org>.
unbridled-41 commented on PR #5445:
URL: https://github.com/apache/rocketmq-dashboard/pull/5445#issuecomment-5965539525
### CI attribution: `Frontend Build (Node 20)` fails in the license gate, independent of this diff
The job compiles the bundle and then fails the post-build license verification:
```
dist/assets/index-bbQgj2Wj.js 356.61 kB
✓ built in 10.95s
> rocketmq-studio-web@3.0.0 license:check
license gate: build artifact verification failed: assets/index-bbQgj2Wj.js
```
That gate compares the written `dist/` against the recorded license manifest and fails the same way on
branches that change no frontend code at all — a docs-only PR of this batch fails it with
`license gate: build artifact verification failed: assets/index-CcP1KOri.js` (run 37088829422) — and
on `rocketmq-studio` itself. It is being addressed independently by #5346. The frontend suite, `tsc -b`
and `eslint` results that belong to this change are in the Tests section above and are green.
--
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(alerts): scope the header count to the page it counted [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #5445: fix(alerts): scope the header count to the page it counted
URL: https://github.com/apache/rocketmq-dashboard/pull/5445
--
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(alerts): scope the header count to the page it counted [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #5445:
URL: https://github.com/apache/rocketmq-dashboard/pull/5445#issuecomment-6077316671
Merged as part of #5437 (squashed into `rocketmq-studio` as 01bf7ec3f).
It reworded the system-alerts header count so it no longer reads as page-scoped while counting the whole feed.
We are consolidating same-author changes that touch the same files into one commit rather than landing several near-identical ones on the trunk; your commit is preserved as the author of the corresponding part of that change. Closing - no action needed, and thanks for the fix.
--
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