iloveeyjafjalla opened a new issue, #6484:
URL: https://github.com/apache/rocketmq-dashboard/issues/6484

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository 
and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   
   ### Studio Version
   
   branch: rocketmq-studio
   git commit id: 779b8c0e
   deployed as: built from source (frontend `npm run dev`, backend from the 
Maven build)
   
   ### Runtime Environment
   
   OS: Windows 11 (backend and frontend run on the host)
   MySQL: 8.0.46 container from deploy/docker-compose.yml
   browser (for UI issues): in-app Chromium at 1280x720
   
   ### Connected RocketMQ Cluster
   
   RocketMQ version: 5.3.2 (official apache/rocketmq:5.3.2 image)
   access mode: Direct to NameServer
   (The audit page reads the Studio store; the failure needs no cluster.)
   
   ### Build Toolchain
   
   JDK: Temurin 21.0.12
   Maven: 3.9.9
   Node.js: 20.19.5
   
   ### Describe the Bug
   
   `web/src/pages/ops/audit.tsx` loads the audit records and the summary in two 
effects and answers a failure with a transient toast only:
   
   - the records effect keeps `records`/`total` untouched, so a first load that 
fails leaves the table empty;
   - the summary effect leaves `summary` at `null`, and `AuditSummaryCards` 
then paints its zero fallback: 匹配记录 **0**, 成功率 **0%**, 失败 / 部分成功 **0 / 0**, 
操作人数 **0**, with both bucket lists empty;
   - `AuditRiskInsights` derives its signals from those zeros, so the panel 
states there is nothing to look at;
   - `refreshKey` is only bumped by a completed cleanup, so the page offers no 
retry.
   
   Impact: the audit page reports a store the console never reached as an audit 
trail with no operations - and audit/compliance is exactly the surface where a 
reader has to trust the numbers. This is the class the maintainers already 
fixed for the session drawer and the console lists (#6113/#6144 "stop 
presenting unread or partial values as measured", #6077/#6078 instance list, 
#6089 cluster registry, #6095 proxy list).
   
   ### Steps to Reproduce
   
   1. Open 审计日志 with any registered instance.
   2. In the browser devtools add a request-blocking rule for 
`*/api/audit-logs*` and reload the page.
   3. The cards read 匹配记录 0 / 成功率 0% / 失败 / 部分成功 0 / 0 / 操作人数 0, the table is 
empty, and there is no retry control.
   
   ### What Did You Expect to See?
   
   The failed read is a state on the page: the summary cards do not assert 
measured zeros, and an error with a retry re-runs both loads.
   
   ### What Did You See Instead?
   
   A zeroed summary (0 matched records, 0% success, 0 operators) for a store 
that was never reached, an empty table and risk panel, and only two transient 
toasts - with no way to retry.
   
   ### Additional Context
   
   Verified on rocketmq-studio@779b8c0e. A fix with two regression cases is 
submitted:
   - `AuditSummaryCards.test.tsx`: an unread summary (`summary: null, failed: 
true`) renders four "-" and no `0%` / `0 / 0`;
   - `AuditPage.test.tsx`: both reads reject, the banner appears, a retry 
reaches the wire twice and the page renders the records it reached.
   
   Both cases fail on the previous code ("Unable to find an element with the 
text: -" / "...: 获取数据失败"), and the two suites are 17/17 with the fix; eslint, 
prettier --check and tsc -b are clean.
   
   AI assistance: prepared with AI assistance (OpenAI Codex / ZCode); every 
statement was checked against the code and the test suite before it was written 
down.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.


-- 
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]

Reply via email to