Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
docs(markdown-editor): trim a narration comment + pin the shared-editorRef assumption
Sergey Kozyrenkodb9b832f4852
diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor.tsx b/frontend/src/components/shared/markdown-editor/markdown-editor.tsxindex b0875534..b3216878 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor.tsx+++ b/frontend/src/components/shared/markdown-editor/markdown-editor.tsx@@ -194,7 +194,6 @@ function MarkdownEditor({const { state, view } = editor;- // Focus before scroll — PM won't scrollIntoView an unfocused view (same as cycleToVariable).view.focus();view.dispatch(state.tr.insertText(text).scrollIntoView());},diff --git a/frontend/src/pages/settings/settings-prompt.tsx b/frontend/src/pages/settings/settings-prompt.tsxindex f61a2545..3a6bd048 100644--- a/frontend/src/pages/settings/settings-prompt.tsx+++ b/frontend/src/pages/settings/settings-prompt.tsx@@ -392,6 +392,10 @@ function SettingsPrompt() {const [validationDialogOpen, setValidationDialogOpen] = useState(false);const [isDiffDialogOpen, setIsDiffDialogOpen] = useState(false);const [viewMode, setViewMode] = useState<EditorViewMode>('rich');+ // One ref shared by both tab editors (System + Human): safe only because Radix TabsContent unmounts the+ // inactive tab (no forceMount here), so exactly one MarkdownEditor is ever mounted and the ref is+ // unambiguous. If a forceMount / exit-animation is ever added, both mount and cycleToVariable would race —+ // switch to one ref per tab.const editorRef = useRef<MarkdownEditorHandle>(null);const isLoading = isCreateLoading || isUpdateLoading || isDeleteLoading || isValidateLoading;