diff --git a/frontend-v2/app/admin/page.tsx b/frontend-v2/app/admin/page.tsx index 5b46ab8..df591fe 100644 --- a/frontend-v2/app/admin/page.tsx +++ b/frontend-v2/app/admin/page.tsx @@ -4,7 +4,7 @@ import { useState, useEffect, useCallback } from "react" import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" -import { ScrollArea } from "@/components/ui/scroll-area" +import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area" import { RefreshCw, Trash2, Server, FileText, Database, Loader2 } from "lucide-react" import { getApiBaseUrl } from "../../lib/utils"; import { Toaster, toast } from "sonner"; @@ -212,19 +212,27 @@ export default function AdminPage() {
Logs
- - + {/* CardContent is now overflow-hidden and w-full to constrain children */} + + {/* ScrollArea is w-full, min-w-0, max-w-full to prevent overflow */} + + {logs.length > 0 ? ( -
    + // Log list is w-full, min-w-0, max-w-full +
      {logs.map((log, idx) => ( -
    • -
      - {new Date(log.time).toLocaleString()} - {log.level} + // Each log entry is w-full, min-w-0, max-w-full +
    • + {/* Header row: flex with min-w-0 to allow shrinking */} +
      + {new Date(log.time).toLocaleString()} + {log.level}
      -
      {log.msg}
      + {/* Log message: wraps, never overflows */} +
      {log.msg}
      + {/* JSON attributes: now wraps, no horizontal scroll */} {log.attrs && ( -
      {JSON.stringify(log.attrs, null, 2)}
      +
      {JSON.stringify(log.attrs, null, 2)}
      )}
    • ))}