Skip to content

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

refactor(breakpoints): align useBreakpoint to Tailwind tokens; field height goes pure CSS

Sergey Kozyrenko330223bc2822
diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-field.tsx b/frontend/src/components/shared/markdown-editor/markdown-editor-field.tsx
index 929477ab..58a38978 100644
--- a/frontend/src/components/shared/markdown-editor/markdown-editor-field.tsx
+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-field.tsx
@@ -6,7 +6,6 @@ import { lazy, Suspense, useImperativeHandle, useRef } from 'react';
import type { TextareaRef } from '@/components/ui/textarea';
import { Textarea } from '@/components/ui/textarea';
-import { useBreakpoint } from '@/hooks/use-breakpoint';
import { cn } from '@/lib/utils';
import type { MarkdownEditorHandle } from './markdown-editor';
@@ -80,8 +79,7 @@ export function MarkdownEditorField({
[mode, onChange, disabled],
);
- const { isDesktop } = useBreakpoint();
- const boxClassName = cn(isDesktop ? 'min-h-0 flex-1' : 'h-[calc(100dvh-5rem)]', className);
+ const boxClassName = cn('h-[calc(100dvh-5rem)] xl:h-auto xl:min-h-0 xl:flex-1', className);
if (mode === 'raw') {
return (
diff --git a/frontend/src/hooks/use-breakpoint.ts b/frontend/src/hooks/use-breakpoint.ts
index 90251076..74b5d682 100644
--- a/frontend/src/hooks/use-breakpoint.ts
+++ b/frontend/src/hooks/use-breakpoint.ts
@@ -6,10 +6,12 @@ export enum BreakpointName {
tablet = 'tablet',
}
+// px thresholds mirror Tailwind's `md` (768) and `xl` (1280) so JS layout switches line up with CSS `md:`/`xl:`
+// variants — keep them equal (a component may pick either for the same responsive decision, e.g. the editor split).
export const breakpoints = {
[BreakpointName.desktop]: Infinity,
[BreakpointName.mobile]: 768,
- [BreakpointName.tablet]: 1200,
+ [BreakpointName.tablet]: 1280,
} as const;
const breakpointRules: { maxWidth: number; name: BreakpointName }[] = [