RockteMQ-AI commented on code in PR #4284:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4284#discussion_r4001836535


##########
server/src/test/java/org/apache/rocketmq/studio/ops/ai/LlmConfigServiceTest.java:
##########
@@ -330,6 +330,33 @@ void 
saveConfigShouldNormalizeChatCompletionsEndpointToApiBase() {
         
assertThat(captor.getValue().getBaseUrl()).isEqualTo("https://api.openai.com/v1";);
     }
 
+    @Test

Review Comment:
   **[Info]** The regression test is well-structured:
   - Sets up initial state with all three notification channels configured
   - Calls `saveConfig` with only LLM-related fields
   - Verifies all three notification fields are preserved unchanged
   
   This test would have caught the original bug where saving LLM config wiped 
out notification settings.



##########
server/src/main/java/org/apache/rocketmq/studio/ops/ai/LlmConfigService.java:
##########
@@ -119,6 +119,11 @@ public synchronized void saveConfig(LlmConfigVO config) {
                 .notifySound(current.isNotifySound())
                 .sessionTimeout(current.getSessionTimeout())
                 .requireLogin(current.isRequireLogin())
+                // The LLM form never edits notification channels; keep the 
stored values

Review Comment:
   **[Info]** The fix is minimal and correct. Since the LLM config form never 
edits notification channels, preserving the existing values from `current` 
prevents them from being overwritten with nulls.
   
   The comment clearly explains the rationale, which is helpful for future 
maintainers.



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