From ba41d8021f1d65ae710cbdf7249d4b120a261637 Mon Sep 17 00:00:00 2001 From: icarus Date: Sun, 14 Sep 2025 04:44:53 +0800 Subject: [PATCH] docs(AddAgentModal): add comment explaining modal button pattern Add explanatory comment for combining Button and Modal components in Hero UI pattern to clarify focus management requirements --- src/renderer/src/components/Popups/AddAgentModal.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer/src/components/Popups/AddAgentModal.tsx b/src/renderer/src/components/Popups/AddAgentModal.tsx index 58ab21b066..d846bc7a19 100644 --- a/src/renderer/src/components/Popups/AddAgentModal.tsx +++ b/src/renderer/src/components/Popups/AddAgentModal.tsx @@ -220,6 +220,9 @@ export const AddAgentModal: React.FC = () => { return ( + {/* NOTE: Hero UI Modal Pattern: Combine the Button and Modal components into a single + encapsulated component. This is because the Modal component needs to bind the onOpen + event handler to the Button for proper focus management. */}