Skip to content

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

fix(settings,templates): contain popover scroll, show the variable count on desktop

Sergey Kozyrenkob1f77fa7dcdd
diff --git a/frontend/src/pages/settings/settings-prompt.tsx b/frontend/src/pages/settings/settings-prompt.tsx
index b76bf9c8..53290408 100644
--- a/frontend/src/pages/settings/settings-prompt.tsx
+++ b/frontend/src/pages/settings/settings-prompt.tsx
@@ -1052,7 +1052,15 @@ function Variables({ currentTemplate, onVariableClick, variables }: VariablesPro
return (
<div className="bg-card overflow-hidden rounded-lg border">
<div className="border-b px-4 py-3">
- <h4 className="text-sm font-medium">{VARIABLES_TITLE}</h4>
+ <h4 className="flex items-center gap-2 text-sm font-medium">
+ {VARIABLES_TITLE}
+ <Badge
+ className="ml-auto font-normal tabular-nums"
+ variant="secondary"
+ >
+ {variables.length}
+ </Badge>
+ </h4>
<p className="text-muted-foreground mt-1 text-xs">
Click to insert at the cursor, or cycle through existing uses.
</p>
@@ -1082,7 +1090,7 @@ function Variables({ currentTemplate, onVariableClick, variables }: VariablesPro
</PopoverTrigger>
<PopoverContent
align="start"
- className="max-h-(--radix-popover-content-available-height) w-(--radix-popover-trigger-width) overflow-y-auto p-0"
+ className="max-h-(--radix-popover-content-available-height) w-(--radix-popover-trigger-width) overflow-y-auto overscroll-contain p-0"
>
{content}
</PopoverContent>
diff --git a/frontend/src/pages/templates/template.tsx b/frontend/src/pages/templates/template.tsx
index c62e847b..c29d21b2 100644
--- a/frontend/src/pages/templates/template.tsx
+++ b/frontend/src/pages/templates/template.tsx
@@ -675,7 +675,7 @@ function Template() {
</PopoverTrigger>
<PopoverContent
align="start"
- className="max-h-(--radix-popover-content-available-height) w-(--radix-popover-trigger-width) overflow-y-auto p-0"
+ className="max-h-(--radix-popover-content-available-height) w-(--radix-popover-trigger-width) overflow-y-auto overscroll-contain p-0"
>
{presetsList(() => setIsPresetsOpen(false))}
</PopoverContent>