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

   ### Description
   The Ops page appends a successfully saved NameServer address with a state 
value captured before the asynchronous request starts:
   
   ```ts
   setNamesrvAddrList([...namesrvAddrList, addr]);
   ```
   
   The Add action remains available while a request is in flight. If two 
different additions are submitted before either completes, both handlers 
capture the same original list. Whichever request finishes last replaces the 
other successful addition in the UI. An earlier completion can also clear text 
entered for the next request.
   
   ### Steps to reproduce
   1. Enter NameServer address A and click Add while delaying its response.
   2. Enter address B and click Add before A completes.
   3. Complete both successful requests in either order.
   
   ### Expected behavior
   Both server-confirmed addresses remain in the selector, and one completion 
does not clear a newer input value.
   
   ### Actual behavior
   Only the address from the last state update remains in the local list 
because both updates spread the same stale array.
   
   ### Proposed fix
   Use a functional list update that deduplicates against the latest state, and 
clear the input only when it still contains the address associated with the 
completed request. Add a deterministic concurrent-add regression test.


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