messere1 opened a new pull request, #1574:
URL: https://github.com/apache/rocketmq-dashboard/pull/1574
## What changed
- add a synchronous in-flight set keyed by system-alert ID
- ignore duplicate acknowledgement attempts for an ID that is already pending
- remove the ID guard after success or failure so retry remains possible
- preserve concurrent acknowledgement of different alert IDs
- add a regression test that double-clicks one alert and asserts one API call
## Why
React state drives the existing per-row spinner, but it is not a synchronous
lock. A rapid double click can enter handleAck twice before the loading state
disables the row action, producing duplicate acknowledgement requests.
## Impact
Only duplicate requests for the same alert are suppressed. Different alerts
can still be acknowledged concurrently, and the backend API contract is
unchanged.
Fixes #1573
## Validation
- npx vitest run src/pages/ops/__tests__/SystemAlertsPage.test.tsx
- 3 tests passed
- npx eslint src/pages/ops/systemAlerts.tsx
src/pages/ops/__tests__/SystemAlertsPage.test.tsx
- npm run build
- TypeScript and Vite production build passed
- Husky pre-commit ESLint and Prettier checks passed
--
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]