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
refactor(ui): rename DetailTwoPanelLayout → DetailSplitLayout, left/right → panel/content
Sergey Kozyrenko87662d419a40
diff --git a/frontend/src/components/shared/detail-two-panel-layout.tsx b/frontend/src/components/shared/detail-split-layout.tsxsimilarity index 61%rename from frontend/src/components/shared/detail-two-panel-layout.tsxrename to frontend/src/components/shared/detail-split-layout.tsxindex 72e02fea..8dfa1a7f 100644--- a/frontend/src/components/shared/detail-two-panel-layout.tsx+++ b/frontend/src/components/shared/detail-split-layout.tsx@@ -1,21 +1,19 @@import type { ReactNode } from 'react';-import { GripVertical } from 'lucide-react';-import { Card, CardContent } from '@/components/ui/card';import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@/components/ui/resizable';-interface DetailTwoPanelLayoutProps {- left: ReactNode;- right: ReactNode;- rightClassName?: string;+interface DetailSplitLayoutProps {+ content: ReactNode;+ contentClassName?: string;+ panel: ReactNode;}-export function DetailTwoPanelLayout({- left,- right,- rightClassName = 'flex h-full min-h-0 flex-col overflow-y-auto p-4',-}: DetailTwoPanelLayoutProps) {+export function DetailSplitLayout({+ content,+ contentClassName = 'flex h-full min-h-0 flex-col overflow-y-auto p-4',+ panel,+}: DetailSplitLayoutProps) {return (<div className="flex min-h-0 w-full max-w-full flex-1 overflow-hidden"><ResizablePanelGroup@@ -26,20 +24,18 @@ export function DetailTwoPanelLayout({defaultSize={45}minSize={30}>- <div className="h-full min-h-0 overflow-y-auto">+ <div className="bg-card h-full min-h-0 overflow-y-auto"><Card className="mx-auto min-h-full w-full max-w-2xl rounded-none border-0">- <CardContent className="flex flex-col gap-6 py-6">{left}</CardContent>+ <CardContent className="flex flex-col gap-6 py-6">{panel}</CardContent></Card></div></ResizablePanel>- <ResizableHandle withHandle>- <GripVertical className="size-4" />- </ResizableHandle>+ <ResizableHandle withHandle /><ResizablePaneldefaultSize={55}minSize={30}>- <div className={rightClassName}>{right}</div>+ <div className={contentClassName}>{content}</div></ResizablePanel></ResizablePanelGroup></div>diff --git a/frontend/src/features/knowledges/knowledge-form-layout.tsx b/frontend/src/features/knowledges/knowledge-form-layout.tsxindex 328ea0e5..1285e380 100644--- a/frontend/src/features/knowledges/knowledge-form-layout.tsx+++ b/frontend/src/features/knowledges/knowledge-form-layout.tsx@@ -2,7 +2,7 @@ import type { Control } from 'react-hook-form';import type { KnowledgeDocumentFragmentFragment } from '@/graphql/types';-import { DetailTwoPanelLayout } from '@/components/shared/detail-two-panel-layout';+import { DetailSplitLayout } from '@/components/shared/detail-split-layout';import { type EditorViewMode } from '@/components/shared/markdown-editor';import { Badge } from '@/components/ui/badge';@@ -31,8 +31,17 @@ export function KnowledgeFormLayoutDesktop({viewMode,}: KnowledgeFormLayoutProps) {return (- <DetailTwoPanelLayout- left={+ <DetailSplitLayout+ content={+ <KnowledgeContentField+ control={control}+ fillParent+ isSaving={isSaving}+ viewMode={viewMode}+ />+ }+ contentClassName="flex h-full min-h-0 flex-col overflow-hidden p-4"+ panel={<><KnowledgeIntroBlockisNew={isNew}@@ -45,15 +54,6 @@ export function KnowledgeFormLayoutDesktop({/></>}- right={- <KnowledgeContentField- control={control}- fillParent- isSaving={isSaving}- viewMode={viewMode}- />- }- rightClassName="flex h-full min-h-0 flex-col overflow-hidden p-4"/>);}diff --git a/frontend/src/pages/settings/settings-prompt.tsx b/frontend/src/pages/settings/settings-prompt.tsxindex 303066b2..b3ec31f5 100644--- a/frontend/src/pages/settings/settings-prompt.tsx+++ b/frontend/src/pages/settings/settings-prompt.tsx@@ -55,7 +55,7 @@ import {AppHeaderTitle,} from '@/components/layouts/app/app-header';import ConfirmationDialog from '@/components/shared/confirmation-dialog';-import { DetailTwoPanelLayout } from '@/components/shared/detail-two-panel-layout';+import { DetailSplitLayout } from '@/components/shared/detail-split-layout';import { UnsavedChangesDialog, useUnsavedChangesGuard } from '@/components/shared/unsaved-changes';import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';import { Badge } from '@/components/ui/badge';@@ -899,14 +899,14 @@ function SettingsPrompt() {value={activeTab}>{isDesktop ? (- <DetailTwoPanelLayout- left={+ <DetailSplitLayout+ content={promptEditor}+ panel={<>{promptMeta}{variablesPanel}</>}- right={promptEditor}/>) : (<div className="flex min-h-0 flex-1 flex-col gap-4 p-4">diff --git a/frontend/src/pages/settings/settings-provider.tsx b/frontend/src/pages/settings/settings-provider.tsxindex 824f4e9c..72d1b4d9 100644--- a/frontend/src/pages/settings/settings-provider.tsx+++ b/frontend/src/pages/settings/settings-provider.tsx@@ -38,7 +38,7 @@ import {AppHeaderTitle,} from '@/components/layouts/app/app-header';import ConfirmationDialog from '@/components/shared/confirmation-dialog';-import { DetailTwoPanelLayout } from '@/components/shared/detail-two-panel-layout';+import { DetailSplitLayout } from '@/components/shared/detail-split-layout';import { UnsavedChangesDialog, useUnsavedChangesGuard } from '@/components/shared/unsaved-changes';import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion';import { Badge } from '@/components/ui/badge';@@ -1877,10 +1877,10 @@ function SettingsProvider() {onSubmit={handleFormSubmit(handleSubmit)}>{isDesktop ? (- <DetailTwoPanelLayout- left={metaFields}- right={agentConfigs}- rightClassName="h-full min-h-0 overflow-y-auto p-4"+ <DetailSplitLayout+ content={agentConfigs}+ contentClassName="h-full min-h-0 overflow-y-auto p-4"+ panel={metaFields}/>) : (<div className="flex min-h-0 flex-1 flex-col gap-4 p-4">diff --git a/frontend/src/pages/templates/template.tsx b/frontend/src/pages/templates/template.tsxindex af8f932b..61f6a11c 100644--- a/frontend/src/pages/templates/template.tsx+++ b/frontend/src/pages/templates/template.tsx@@ -14,7 +14,7 @@ import {DetailNavigationSheet,DetailNavigationToolbar,} from '@/components/shared/detail-navigation';-import { DetailTwoPanelLayout } from '@/components/shared/detail-two-panel-layout';+import { DetailSplitLayout } from '@/components/shared/detail-split-layout';import { InlineEditInput, useInlineEdit } from '@/components/shared/inline-edit';import { type EditorViewMode, EditorViewModeToggle, MarkdownEditorField } from '@/components/shared/markdown-editor';import { UnsavedChangesDialog, useUnsavedChangesGuard } from '@/components/shared/unsaved-changes';@@ -729,15 +729,15 @@ function Template() {onSubmit={handleFormSubmit(handleSubmit)}>{isDesktop ? (- <DetailTwoPanelLayout- left={+ <DetailSplitLayout+ content={textEditor}+ panel={<>{introBlock}{titleField}{presetsPanel}</>}- right={textEditor}/>) : (<div className="flex min-h-0 flex-1 flex-col gap-4 p-4">