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

   ## 🤖 AI Assessment
   
   **Type:** bug | **Status:** Confirmed
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** The load effect in `GeneralSettingsTab.tsx` lists the 
translation function `t` as a dependency. Since `t` is recreated whenever the 
display language changes (via `LangContext.tsx`), switching language re-runs 
the effect and repopulates both forms from the server snapshot — silently 
discarding unsaved operator input.
   
   **Impact:** Operators editing settings (DingTalk webhook, email recipients, 
session timeout) will lose their unsaved edits if they switch the display 
language before saving. No error message is shown.
   
   **Severity:** Medium — data loss (unsaved edits) without any user-visible 
warning.
   
   **Suggested Fix:** Remove `t` from the effect dependency array, or guard the 
effect so it only repopulates form values on initial mount / data refetch (not 
on language change). Alternatively, use `useRef` to track whether the form has 
been populated and skip re-population on subsequent effect runs.
   
   ---
   *Automated evaluation by github-manager bot. A maintainer will review this 
shortly.*


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