Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

fix(frontend): prevent detail-navigation sheet items from overflowing

Sergey Kozyrenko67041169363f
diff --git a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx
index 7e7c6236..fba58137 100644
--- a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx
+++ b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx
@@ -3,7 +3,6 @@ import { type KeyboardEvent, type ReactNode, useCallback, useEffect, useMemo, us
import { Badge } from '@/components/ui/badge';
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/components/ui/input-group';
-import { ScrollArea } from '@/components/ui/scroll-area';
import { Sheet, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sheet';
import { cn } from '@/lib/utils';
@@ -387,7 +386,7 @@ export function DetailNavigationSheet<T extends { id: string }>({
) : null}
</SheetHeader>
{hasEntries ? (
- <ScrollArea className="flex-1">
+ <div className="min-w-0 flex-1 overflow-y-auto">
<ul
aria-label={sheetTitle}
className="flex flex-col gap-0.5 p-2"
@@ -402,13 +401,14 @@ export function DetailNavigationSheet<T extends { id: string }>({
return (
<li
+ className="min-w-0"
key={id}
role="presentation"
>
<button
aria-selected={isCurrent}
className={cn(
- 'hover:bg-muted/50 focus-visible:ring-ring flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm focus-visible:ring-2 focus-visible:outline-hidden',
+ 'hover:bg-muted/50 focus-visible:ring-ring flex w-full min-w-0 items-center gap-2 rounded-md px-3 py-2 text-left text-sm focus-visible:ring-2 focus-visible:outline-hidden',
isCurrent && 'bg-muted text-foreground font-medium',
)}
data-item-id={id}
@@ -422,14 +422,14 @@ export function DetailNavigationSheet<T extends { id: string }>({
{renderItem ? (
renderItem(item, isCurrent)
) : (
- <span className="truncate">{getLabel(item)}</span>
+ <span className="min-w-0 flex-1 truncate">{getLabel(item)}</span>
)}
</button>
</li>
);
})}
</ul>
- </ScrollArea>
+ </div>
) : (
<div className="text-muted-foreground flex flex-1 items-center justify-center px-4 text-center text-sm">
{trimmedQuery.length > 0
diff --git a/frontend/src/features/knowledges/knowledge-header.tsx b/frontend/src/features/knowledges/knowledge-header.tsx
index 98b9b363..af866c40 100644
--- a/frontend/src/features/knowledges/knowledge-header.tsx
+++ b/frontend/src/features/knowledges/knowledge-header.tsx
@@ -30,6 +30,7 @@ import { SidebarTrigger } from '@/components/ui/sidebar';
import { Spinner } from '@/components/ui/spinner';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { useBreakpoint } from '@/hooks/use-breakpoint';
+import { cn } from '@/lib/utils';
import { type Knowledge, useKnowledges } from '@/providers/knowledges-provider';
import { useKnowledgeDetailNavigation } from './use-knowledge-detail-navigation';
@@ -63,7 +64,7 @@ const renderKnowledgeItem = (item: Knowledge, isCurrent: boolean): ReactNode =>
>
{item.docType}
</Badge>
- <span className={isCurrent ? 'truncate font-medium' : 'truncate'}>{item.question}</span>
+ <span className={cn('min-w-0 flex-1 truncate', isCurrent && 'font-medium')}>{item.question}</span>
</>
);
diff --git a/frontend/src/pages/flows/flow.tsx b/frontend/src/pages/flows/flow.tsx
index b7a91481..28b95a23 100644
--- a/frontend/src/pages/flows/flow.tsx
+++ b/frontend/src/pages/flows/flow.tsx
@@ -51,6 +51,7 @@ import { useBreakpoint } from '@/hooks/use-breakpoint';
import { useFlowTabDetection } from '@/hooks/use-flow-tab-detection';
import { Log } from '@/lib/log';
import { copyToClipboard, downloadTextFile, generateFileName, generateReport } from '@/lib/report';
+import { cn } from '@/lib/utils';
import { formatName } from '@/lib/utils/format';
import { useFavorites } from '@/providers/favorites-provider';
import { useFlow } from '@/providers/flow-provider';
@@ -62,7 +63,9 @@ const renderFlowItem = (item: FlowItem, isCurrent: boolean): ReactNode => (
className="size-3 shrink-0"
status={item.status}
/>
- <span className={isCurrent ? 'truncate font-medium' : 'truncate'}>{item.title || `Flow #${item.id}`}</span>
+ <span className={cn('min-w-0 flex-1 truncate', isCurrent && 'font-medium')}>
+ {item.title || `Flow #${item.id}`}
+ </span>
<Badge
className="ml-auto shrink-0 font-mono text-[10px]"
variant="outline"
diff --git a/frontend/src/pages/templates/template.tsx b/frontend/src/pages/templates/template.tsx
index 24706a23..cc04449d 100644
--- a/frontend/src/pages/templates/template.tsx
+++ b/frontend/src/pages/templates/template.tsx
@@ -237,7 +237,7 @@ Action plan:
];
const renderTemplateItem = (item: Template, isCurrent: boolean): ReactNode => (
- <span className={isCurrent ? 'truncate font-medium' : 'truncate'}>{item.title}</span>
+ <span className={cn('min-w-0 flex-1 truncate', isCurrent && 'font-medium')}>{item.title}</span>
);
function Template() {