Skip to content

Commit bbab2ff

Browse files
authored
improvement(ui/ux): small styling improvements (#2293)
* improvement: action-bar duplicate, copilot header name truncating, dashboard table scrolling * improvement: workflow block handle positioning * improvement: copilot notification fix message * improvement: dashboard layout, popover hovering * fix: filtering table into row, workflow name truncating
1 parent 76bc2fa commit bbab2ff

File tree

9 files changed

+25
-22
lines changed

9 files changed

+25
-22
lines changed

apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function WorkflowsListSkeleton({ rowCount = 5 }: { rowCount?: number }) {
131131
*/
132132
function DashboardSkeleton() {
133133
return (
134-
<div className='mt-[24px] flex min-h-0 flex-1 flex-col'>
134+
<div className='mt-[24px] flex min-h-0 flex-1 flex-col pb-[24px]'>
135135
{/* Graphs Section */}
136136
<div className='mb-[16px] flex-shrink-0'>
137137
<div className='grid grid-cols-1 gap-[16px] md:grid-cols-3'>
@@ -774,7 +774,7 @@ export default function Dashboard({
774774
}
775775

776776
return (
777-
<div className='mt-[24px] flex min-h-0 flex-1 flex-col'>
777+
<div className='mt-[24px] flex min-h-0 flex-1 flex-col pb-[24px]'>
778778
{/* Graphs Section */}
779779
<div className='mb-[16px] flex-shrink-0'>
780780
<div className='grid grid-cols-1 gap-[16px] md:grid-cols-3'>

apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ export function LogDetails({
161161
<ScrollArea className='mt-[20px] h-full w-full overflow-y-auto' ref={scrollAreaRef}>
162162
<div className='flex flex-col gap-[10px] pb-[16px]'>
163163
{/* Timestamp & Workflow Row */}
164-
<div className='flex items-center gap-[16px] px-[1px]'>
164+
<div className='flex min-w-0 items-center gap-[16px] px-[1px]'>
165165
{/* Timestamp Card */}
166-
<div className='flex w-[140px] flex-col gap-[8px]'>
166+
<div className='flex w-[140px] flex-shrink-0 flex-col gap-[8px]'>
167167
<div className='font-medium text-[12px] text-[var(--text-tertiary)]'>
168168
Timestamp
169169
</div>
@@ -179,16 +179,16 @@ export function LogDetails({
179179

180180
{/* Workflow Card */}
181181
{log.workflow && (
182-
<div className='flex flex-col gap-[8px]'>
182+
<div className='flex w-0 min-w-0 flex-1 flex-col gap-[8px]'>
183183
<div className='font-medium text-[12px] text-[var(--text-tertiary)]'>
184184
Workflow
185185
</div>
186-
<div className='flex items-center gap-[8px]'>
186+
<div className='flex min-w-0 items-center gap-[8px]'>
187187
<div
188188
className='h-[10px] w-[10px] flex-shrink-0 rounded-[3px]'
189189
style={{ backgroundColor: log.workflow?.color }}
190190
/>
191-
<span className='font-medium text-[14px] text-[var(--text-secondary)]'>
191+
<span className='min-w-0 flex-1 truncate font-medium text-[14px] text-[var(--text-secondary)]'>
192192
{log.workflow.name}
193193
</span>
194194
</div>

apps/sim/app/workspace/[workspaceId]/logs/logs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,14 @@ export default function Logs() {
410410

411411
{/* Dashboard view */}
412412
{isDashboardView && (
413-
<div className='pr-[24px] pb-[24px]'>
413+
<div className='flex min-h-0 flex-1 flex-col pr-[24px]'>
414414
<Dashboard isLive={isLive} refreshTrigger={dashboardRefreshTrigger} />
415415
</div>
416416
)}
417417

418418
{/* Main content area with table - only show in logs view */}
419419
{!isDashboardView && (
420-
<div className='relative mt-[24px] flex min-h-0 flex-1 overflow-hidden rounded-[6px]'>
420+
<div className='relative mt-[24px] flex min-h-0 flex-1 flex-col overflow-hidden rounded-[6px]'>
421421
{/* Table container */}
422422
<div className='relative flex min-h-0 flex-1 flex-col overflow-hidden rounded-[6px] bg-[var(--surface-1)]'>
423423
{/* Table header */}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(({ panelWidth }, ref
398398
className='flex h-full flex-col overflow-hidden'
399399
>
400400
{/* Header */}
401-
<div className='flex flex-shrink-0 items-center justify-between rounded-[4px] bg-[var(--surface-5)] px-[12px] py-[8px]'>
402-
<h2 className='font-medium text-[14px] text-[var(--text-primary)]'>
401+
<div className='flex flex-shrink-0 items-center justify-between gap-[8px] rounded-[4px] bg-[var(--surface-5)] px-[12px] py-[8px]'>
402+
<h2 className='min-w-0 flex-1 truncate font-medium text-[14px] text-[var(--text-primary)]'>
403403
{currentChat?.title || 'New Chat'}
404404
</h2>
405405
<div className='flex items-center gap-[8px]'>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/action-bar/action-bar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { memo, useCallback } from 'react'
22
import { ArrowLeftRight, ArrowUpDown, Circle, CircleOff, LogOut } from 'lucide-react'
3-
import { Button, Duplicate, Tooltip, Trash2 } from '@/components/emcn'
3+
import { Button, Copy, Tooltip, Trash2 } from '@/components/emcn'
44
import { cn } from '@/lib/core/utils/cn'
55
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
66
import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow'
@@ -119,7 +119,7 @@ export const ActionBar = memo(
119119
className='hover:!text-[var(--text-inverse)] h-[23px] w-[23px] rounded-[8px] bg-[var(--surface-9)] p-0 text-[#868686] hover:bg-[var(--brand-secondary)]'
120120
disabled={disabled}
121121
>
122-
<Duplicate className='h-[11px] w-[11px]' />
122+
<Copy className='h-[11px] w-[11px]' />
123123
</Button>
124124
</Tooltip.Trigger>
125125
<Tooltip.Content side='top'>{getTooltipMessage('Duplicate Block')}</Tooltip.Content>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,12 @@ export const WorkflowBlock = memo(function WorkflowBlock({
703703
const colorClasses = isError ? '!bg-red-400 dark:!bg-red-500' : '!bg-[var(--surface-12)]'
704704

705705
const positionClasses = {
706-
left: '!left-[-7px] !h-5 !w-[7px] !rounded-l-[2px] !rounded-r-none hover:!left-[-10px] hover:!w-[10px] hover:!rounded-l-full',
706+
left: '!left-[-8px] !h-5 !w-[7px] !rounded-l-[2px] !rounded-r-none hover:!left-[-11px] hover:!w-[10px] hover:!rounded-l-full',
707707
right:
708-
'!right-[-7px] !h-5 !w-[7px] !rounded-r-[2px] !rounded-l-none hover:!right-[-10px] hover:!w-[10px] hover:!rounded-r-full',
709-
top: '!top-[-7px] !h-[7px] !w-5 !rounded-t-[2px] !rounded-b-none hover:!top-[-10px] hover:!h-[10px] hover:!rounded-t-full',
708+
'!right-[-8px] !h-5 !w-[7px] !rounded-r-[2px] !rounded-l-none hover:!right-[-11px] hover:!w-[10px] hover:!rounded-r-full',
709+
top: '!top-[-8px] !h-[7px] !w-5 !rounded-t-[2px] !rounded-b-none hover:!top-[-11px] hover:!h-[10px] hover:!rounded-t-full',
710710
bottom:
711-
'!bottom-[-7px] !h-[7px] !w-5 !rounded-b-[2px] !rounded-t-none hover:!bottom-[-10px] hover:!h-[10px] hover:!rounded-b-full',
711+
'!bottom-[-8px] !h-[7px] !w-5 !rounded-b-[2px] !rounded-t-none hover:!bottom-[-11px] hover:!h-[10px] hover:!rounded-b-full',
712712
}
713713

714714
return cn(baseClasses, colorClasses, positionClasses[position])

apps/sim/components/emcn/components/popover/popover.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ import { cn } from '@/lib/core/utils/cn'
5757
/**
5858
* Shared base styles for all popover interactive items.
5959
* Ensures consistent height and styling across items, folders, and back button.
60+
* Uses fast transitions (duration-75) to prevent hover state "jumping" during rapid mouse movement.
6061
*/
6162
const POPOVER_ITEM_BASE_CLASSES =
62-
'flex h-[25px] min-w-0 cursor-pointer items-center gap-[8px] rounded-[6px] px-[6px] font-base text-[var(--text-primary)] text-[12px] transition-colors dark:text-[var(--text-primary)] [&_svg]:transition-colors disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed'
63+
'flex h-[25px] min-w-0 cursor-pointer items-center gap-[8px] rounded-[6px] px-[6px] font-base text-[var(--text-primary)] text-[12px] transition-colors duration-75 dark:text-[var(--text-primary)] [&_svg]:transition-colors [&_svg]:duration-75 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed'
6364

6465
/**
6566
* Variant-specific active state styles for popover items.

apps/sim/stores/notifications/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ export function openCopilotWithMessage(message: string): void {
4242
return
4343
}
4444

45-
const messageWithInstructions = `${trimmedMessage}\n\nPlease fix this.`
46-
47-
void copilotStore.sendMessage(messageWithInstructions, { stream: true }).catch((error) => {
45+
void copilotStore.sendMessage(trimmedMessage, { stream: true }).catch((error) => {
4846
logger.error('Failed to send message to copilot', { error })
4947
})
5048

apps/sim/stores/terminal/console/store.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,18 @@ export const useTerminalConsoleStore = create<ConsoleStore>()(
110110
if (isErrorNotificationsEnabled) {
111111
try {
112112
const errorMessage = String(newEntry.error)
113+
const blockName = newEntry.blockName || 'Unknown Block'
114+
115+
// Copilot message includes block name for better debugging context
116+
const copilotMessage = `${errorMessage}\n\nError in ${blockName}.\n\nPlease fix this.`
113117

114118
useNotificationStore.getState().addNotification({
115119
level: 'error',
116120
message: errorMessage,
117121
workflowId: entry.workflowId,
118122
action: {
119123
type: 'copilot',
120-
message: errorMessage,
124+
message: copilotMessage,
121125
},
122126
})
123127
} catch (notificationError) {

0 commit comments

Comments
 (0)