yx9o opened a new pull request, #6918:
URL: https://github.com/apache/rocketmq-dashboard/pull/6918

   ### Brief Description
   
   Direct consumption relied on React loading state, so two clicks before a 
render could dispatch the operation twice. A pending request also retained its 
loading state after reopening message details, and its completion could display 
stale notifications or clear a newer request's loading state.
   
   Track the active request synchronously and scope its notifications and 
loading updates to the current message-detail dialog. Invalidate ownership when 
opening or closing details and when unmounting the page. A failed active 
request releases the guard so the user can retry.
   
   Closing the dialog does not cancel a consumption operation already sent to 
the broker. API parameters and backend behavior are unchanged; no dependencies 
or UI text are added.
   
   ### How Did You Test This Change?
   
   - Added five regression cases covering same-render duplicate clicks, retry 
after failure, stale success/failure after reopening details, and 
success/failure after unmount. All five failed against the original 
implementation and passed with the fix.
   - Ran the following commands from `web`:
   
   ```sh
   ./node_modules/.bin/vitest run 
src/pages/instance/__tests__/MessagePageAsyncState.test.tsx 
src/pages/instance/__tests__/MessagePage.test.tsx 
src/components/__tests__/QueueBrowser.test.tsx 
src/components/__tests__/MessageQueryHistoryModal.test.tsx 
src/components/__tests__/MessageProperties.test.tsx
   # 5 test files passed; 88 tests passed
   ./node_modules/.bin/tsc -b
   # Passed
   ./node_modules/.bin/eslint .
   # 0 errors; 10 existing warnings in unchanged files
   ./node_modules/.bin/prettier --check src/pages/instance/message.tsx 
src/pages/instance/__tests__/MessagePageAsyncState.test.tsx
   # Passed
   ./node_modules/.bin/vite build
   # Passed
   ```
   
   - `git diff --check` passed.
   - Validation used frontend tests with mocked services. No live-broker 
checks, backend tests, or full frontend test suite were run.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / 
`refactor:` / `chore:` / `docs:` / `perf:`)
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(no new UI text)
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks) — not run; frontend-only change, backend untouched
   - [x] New source files carry the ASF license header (no new source files; 
existing headers retained)
   - [x] Documentation touched where behaviour changed (README / `docs/` / 
in-app help) (no API or documented workflow change requiring documentation)
   


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