fix(operations): contain agent run-log text inside the "פלט" popup
The RunLogDialog rendered the live agent log inside a Radix ScrollArea. Radix wraps Viewport children in an inner `display:table` div that shrink-wraps to the widest unbreakable token — the long `toolu_…` IDs and `/home/chaim/…` file paths in the raw JSON log. That table cell expands instead of constraining width, so `whitespace-pre-wrap break-words` never had a width to wrap against and the text spilled out past the dialog borders. Replace the ScrollArea with a plain width-constrained scrollable div and switch break-words → break-all so the long unbreakable IDs/paths wrap too. Pure presentational fix (no invariant surface). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import { Switch } from "@/components/ui/switch";
|
|||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { Skeleton } from "@/components/ui/skeleton";
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
@@ -673,11 +672,11 @@ function RunLogDialog({ run, onClose }: { run: AgentRun | null; onClose: () => v
|
|||||||
) : error ? (
|
) : error ? (
|
||||||
<p className="text-sm text-destructive">שגיאה בטעינת הלוג: {String(error)}</p>
|
<p className="text-sm text-destructive">שגיאה בטעינת הלוג: {String(error)}</p>
|
||||||
) : (
|
) : (
|
||||||
<ScrollArea className="h-[60vh] rounded-md border border-rule-soft bg-rule-soft/20 p-3">
|
<div className="h-[60vh] w-full overflow-y-auto overflow-x-hidden rounded-md border border-rule-soft bg-rule-soft/20 p-3">
|
||||||
<pre dir="ltr" className="text-[0.72rem] leading-relaxed whitespace-pre-wrap break-words text-navy text-start">
|
<pre dir="ltr" className="w-full min-w-0 max-w-full overflow-x-hidden text-[0.72rem] leading-relaxed whitespace-pre-wrap break-all text-navy text-start">
|
||||||
{text || "אין פלט עדיין."}
|
{text || "אין פלט עדיין."}
|
||||||
</pre>
|
</pre>
|
||||||
</ScrollArea>
|
</div>
|
||||||
)}
|
)}
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user