Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions frontend/src/components/timeline/ExecutionInspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,25 +534,21 @@ export function ExecutionInspector({ onRerunRun }: ExecutionInspectorProps = {})
</span>
)}
<div className="flex-1 min-w-0">
<div className="flex items-center gap-1">
<pre
className={cn(
'text-[11px] leading-tight flex-1',
tone.text,
isJson
? 'whitespace-pre-wrap'
: 'whitespace-nowrap overflow-hidden text-ellipsis',
)}
>
{truncatedMessage}
</pre>
{isTruncated && (
<span className="text-slate-400 text-[9px] flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity">
</span>
<pre
className={cn(
'text-[11px] leading-tight',
tone.text,
isJson
? 'whitespace-pre-wrap'
: 'whitespace-nowrap overflow-hidden text-ellipsis',
)}
</div>
>
{truncatedMessage}
</pre>
</div>
<span className="sticky right-0 z-10 flex-shrink-0 bg-slate-900/90 text-blue-400 text-[9px] leading-tight px-1.5 py-px rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none">
click to expand
</span>
</div>
</div>
);
Expand Down
22 changes: 16 additions & 6 deletions frontend/src/components/workflow/ConfigPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
SelectValue,
} from '@/components/ui/select';
import { Badge } from '@/components/ui/badge';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
import { cn } from '@/lib/utils';
import { useComponentStore } from '@/store/componentStore';
import { ParameterFieldWrapper } from './ParameterField';
Expand Down Expand Up @@ -1326,13 +1327,22 @@ export function ConfigPanel({
key={schedule.id}
className="rounded-lg border bg-background px-3 py-2 space-y-2"
>
<div className="flex items-center justify-between gap-2">
<div>
<div className="flex items-center gap-2">
<span className="text-sm font-semibold">{schedule.name}</span>
<div className="flex flex-col gap-2">
<div className="min-w-0">
<div className="flex items-center gap-2 min-w-0">
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<span className="text-sm font-semibold truncate min-w-0">
{schedule.name}
</span>
</TooltipTrigger>
<TooltipContent side="top">{schedule.name}</TooltipContent>
</Tooltip>
</TooltipProvider>
<Badge
variant={scheduleStatusVariant[schedule.status]}
className="text-[11px] capitalize"
className="text-[11px] capitalize flex-shrink-0"
>
{schedule.status}
</Badge>
Expand All @@ -1341,7 +1351,7 @@ export function ConfigPanel({
Next: {formatScheduleTimestamp(schedule.nextRunAt)}
</div>
</div>
<div className="flex items-center gap-2">
<div className="flex flex-wrap items-center gap-1">
<Button
type="button"
size="sm"
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/workflow/ParameterField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ export function ParameterField({
placeholder={parameter.placeholder}
defaultValue={currentValue || ''}
onBlur={handleBlur}
rows={parameter.rows || 3}
className="w-full px-3 py-2 text-sm border rounded-md bg-background resize-y font-mono"
rows={Math.min(parameter.rows || 3, 4)}
className="w-full px-3 py-2 text-sm border rounded-md bg-background resize-y font-mono max-h-[160px] overflow-y-auto"
/>
);
}
Expand Down Expand Up @@ -789,8 +789,8 @@ export function ParameterField({
: JSON.stringify(value, null, 2)
}
onBlur={handleJsonBlur}
className="w-full px-3 py-2 text-sm border rounded-md bg-background resize-y font-mono"
rows={parameter.rows || 4}
className="w-full px-3 py-2 text-sm border rounded-md bg-background resize-y font-mono max-h-[160px] overflow-y-auto"
rows={Math.min(parameter.rows || 4, 4)}
placeholder={parameter.placeholder || '{\n "key": "value"\n}'}
/>
{jsonError && <p className="text-xs text-red-500">{jsonError}</p>}
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/workflow/RunWorkflowDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ export function RunWorkflowDialog({
id={input.id}
placeholder='{"key": "value"}'
onChange={(e) => handleInputChange(input.id, e.target.value, inputType)}
className={hasError ? 'border-red-500' : ''}
rows={4}
className={`${hasError ? 'border-red-500' : ''} max-h-[120px] overflow-y-auto`}
rows={2}
defaultValue={
typeof inputs[input.id] === 'string'
? (inputs[input.id] as string)
Expand All @@ -235,8 +235,8 @@ export function RunWorkflowDialog({
id={input.id}
placeholder='value1, value2 or ["value1", "value2"]'
onChange={(e) => handleInputChange(input.id, e.target.value, input.type)}
className={hasError ? 'border-red-500 font-mono' : 'font-mono'}
rows={3}
className={`${hasError ? 'border-red-500 font-mono' : 'font-mono'} max-h-[120px] overflow-y-auto`}
rows={2}
defaultValue={
typeof inputs[input.id] === 'string'
? (inputs[input.id] as string)
Expand Down Expand Up @@ -319,8 +319,8 @@ export function RunWorkflowDialog({
id={input.id}
placeholder="Enter text"
onChange={(e) => handleInputChange(input.id, e.target.value, inputType)}
className={hasError ? 'border-red-500 font-mono' : 'font-mono'}
rows={8}
className={`${hasError ? 'border-red-500 font-mono' : 'font-mono'} max-h-[120px] overflow-y-auto`}
rows={2}
defaultValue={
inputs[input.id] !== undefined && inputs[input.id] !== null
? String(inputs[input.id])
Expand Down Expand Up @@ -349,7 +349,7 @@ export function RunWorkflowDialog({
</DialogHeader>

{runtimeInputs.length > 0 && (
<div className="space-y-4 py-4">
<div className="space-y-4 py-4 max-h-[60vh] overflow-y-auto">
{runtimeInputs.map((input) => (
<div key={`${input.id}-${formSeed}`}>{renderInput(input)}</div>
))}
Expand Down
18 changes: 14 additions & 4 deletions frontend/src/components/workflow/WorkflowSchedulesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useCallback, useState } from 'react';
import { Loader2, Plus, ExternalLink, X, Pause, Play, Zap, Pencil, Trash2 } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
import type { WorkflowSchedule } from '@shipsec/shared';
import { formatScheduleTimestamp, scheduleStatusVariant } from './schedules-utils';

Expand Down Expand Up @@ -199,12 +200,21 @@ export function WorkflowSchedulesSidebar({
return (
<div key={schedule.id} className="space-y-2 rounded-lg border bg-muted/30 px-3 py-2">
<div className="flex items-start justify-between gap-2">
<div className="space-y-1">
<div className="flex items-center gap-2">
<span className="text-sm font-semibold">{schedule.name}</span>
<div className="space-y-1 min-w-0">
<div className="flex items-center gap-2 min-w-0">
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<span className="text-sm font-semibold truncate min-w-0">
{schedule.name}
</span>
</TooltipTrigger>
<TooltipContent side="top">{schedule.name}</TooltipContent>
</Tooltip>
</TooltipProvider>
<Badge
variant={scheduleStatusVariant[schedule.status]}
className="text-[11px] capitalize"
className="text-[11px] capitalize flex-shrink-0"
>
{schedule.status}
</Badge>
Expand Down