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

   ## Summary
   
   Fixes #3293.
   
   `runTraceQuery` in `web/src/pages/instance/message.tsx` bumped 
`traceGenerationRef` before validating its input, and its empty-input branch 
returned without resetting `traceLoading`. Any in-flight `loadMessageTrace` was 
invalidated by the bump, so the generation-guarded `finally` - the only place 
that resets `traceLoading` - was skipped:
   
   - The ???? tab showed `????????.` indefinitely.
   - The validation hint (`??? Message ID` / `??? Message Key`) set by the 
empty-input branch was never displayed, because the loading text takes render 
precedence over `traceError`.
   
   ## Fix
   
   Reset `traceLoading` in the empty-input branch of `runTraceQuery`, so the 
tab immediately shows the validation hint while the generation bump keeps 
superseding the stale in-flight request. No change to the supersede semantics 
themselves.
   
   ## Test plan
   
   - Added regression test `keeps the trace tab responsive when an empty trace 
query supersedes an in-flight load` in `MessagePageAsyncState.test.tsx`:
     - Verified red on the unfixed source (fails with `Unable to find an 
element with the text: ??? Message ID`), green with the fix.
     - Asserts the spinner clears, the hint shows, and the stale in-flight 
trace result stays dropped.
   - `npx vitest run 
src/pages/instance/__tests__/MessagePageAsyncState.test.tsx`: 19/19 pass.
   - `eslint` and `tsc --noEmit` clean on the touched files.


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