mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 18:15:33 +00:00
(fix)workflow: stable outside-click handler, drop trailing whitespace
Address Copilot review on #2600: - pass a useCallback handler to useOutsideAlerter so the global mousedown listener isn't torn down/re-added on every WorkflowBuilder render - remove trailing spaces after {displayName} in AgentPageHeader Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2c647d6588
commit
4cf529476f
2 files changed
+6
-4
No files matched your search
@@ -91,7 +91,7 @@ export default function AgentPageHeader({
|
||||
<BreadcrumbItem>
|
||||
{currentPage === 'overview' ? (
|
||||
<BreadcrumbPage title={displayName} className="w-[16ch] truncate">
|
||||
{displayName}
|
||||
{displayName}
|
||||
</BreadcrumbPage>
|
||||
) : (
|
||||
<BreadcrumbLink asChild>
|
||||
|
||||
@@ -781,11 +781,13 @@ function WorkflowBuilderInner() {
|
||||
setShowWorkflowSettings(false);
|
||||
}, []);
|
||||
|
||||
const handleCloseWorkflowSettings = useCallback(() => {
|
||||
setShowWorkflowSettings(false);
|
||||
}, []);
|
||||
|
||||
useOutsideAlerter(
|
||||
workflowSettingsRef,
|
||||
() => {
|
||||
setShowWorkflowSettings(false);
|
||||
},
|
||||
handleCloseWorkflowSettings,
|
||||
[],
|
||||
false,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user