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

   ## Why
   The "save current input" button only checked the composer draft 
(`inputValue`), not the template title. A successful save clears the title but 
leaves the button enabled, so a double-click (or a second press right after 
saving) fires the handler again with an empty title and shows a "Enter a 
template title" error toast right after the success toast.
   
   ## What changed
   - `web/src/pages/ai/components/PromptTemplateModal.tsx`: the Save button is 
also disabled when `customTemplateTitle` is blank, so the second click is a 
no-op instead of a validation error.
   
   ## Validation
   - New `PromptTemplateModal.test.tsx`: save once, assert one stored custom 
template, click Save again, assert the count stays 1 and no "Enter a template 
title" toast appears. Red before, green after.
   - `PromptTemplateModal.test.tsx` + `AiPage.test.tsx` pass (16/16).


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