RockteMQ-AI commented on issue #1894:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/1894#issuecomment-5255723565

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   Verified against `master` branch (`frontend-new/src/pages/Acl/acl.jsx`). The 
data-loading `useEffect` at line 120 depends only on `[activeTab]`:
   
   ```jsx
   useEffect(() => {
       ...
       if (brokerAddress) {  // line 112 — brokerAddress is undefined on first 
render
           // load data
       }
   }, [activeTab]);  // line 120 — brokerAddress NOT in dependency array
   ```
   
   On initial mount, `brokerAddress` is `undefined` (line 69: `useState()`). 
The cluster list is fetched asynchronously and `brokerAddress` is set later, 
but the effect does not re-run because `brokerAddress` is not in the dependency 
array. The user list stays blank until the user manually switches tabs or 
re-selects a broker.
   
   **Severity:** medium — the ACL page appears broken on first visit.
   **Impact:** ACL management page.
   
   Suggested fix: add `brokerAddress` to the `useEffect` dependency array, or 
separate the initialization logic from the data-loading logic.
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with 
PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*
   


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