Skip to content

Commit 3ea69af

Browse files
committed
ack PR comments
1 parent 5bc20d2 commit 3ea69af

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,25 @@ interface BlockExecutionData {
3030
durationMs: number
3131
}
3232

33+
/**
34+
* Migrated logs have special properties to indicate they came from the old logging system
35+
*/
36+
interface MigratedWorkflowState extends WorkflowState {
37+
_migrated: true
38+
_note?: string
39+
}
40+
41+
/**
42+
* Type guard to check if a workflow state is from a migrated log
43+
*/
44+
function isMigratedWorkflowState(state: WorkflowState): state is MigratedWorkflowState {
45+
return (state as MigratedWorkflowState)._migrated === true
46+
}
47+
3348
interface ExecutionSnapshotData {
3449
executionId: string
3550
workflowId: string
36-
workflowState: WorkflowState
51+
workflowState: WorkflowState | MigratedWorkflowState
3752
executionMetadata: {
3853
trigger: string
3954
startedAt: string
@@ -178,8 +193,7 @@ export function ExecutionSnapshot({
178193
)
179194
}
180195

181-
const isMigratedLog = (data.workflowState as any)?._migrated === true
182-
if (isMigratedLog) {
196+
if (isMigratedWorkflowState(data.workflowState)) {
183197
return (
184198
<div
185199
className={cn('flex flex-col items-center justify-center gap-[16px] p-[32px]', className)}
@@ -194,7 +208,7 @@ export function ExecutionSnapshot({
194208
is not available.
195209
</div>
196210
<div className='text-[12px] text-[var(--text-tertiary)]'>
197-
Note: {(data.workflowState as any)?._note}
211+
Note: {data.workflowState._note}
198212
</div>
199213
</div>
200214
)

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export function GeneralDeploy({
338338
: 'Live Workflow'}
339339
</ModalHeader>
340340
<ModalBody className='!p-0 min-h-0 flex-1'>
341-
<div className='flex h-full w-full overflow-hidden rounded-[4px] border border-[var(--border)]'>
341+
<div className='flex h-full w-full overflow-hidden'>
342342
<div className='h-full flex-1'>
343343
<WorkflowPreview
344344
workflowState={workflowToShow}

apps/sim/app/workspace/[workspaceId]/w/components/preview/components/block-details-sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ function BlockDetailsSidebarContent({
482482

483483
if (!blockConfig) {
484484
return (
485-
<div className='flex h-full w-80 flex-col border-[var(--border)] border-l bg-[var(--surface-1)]'>
485+
<div className='flex h-full w-80 flex-col overflow-hidden rounded-r-[8px] border-[var(--border)] border-l bg-[var(--surface-1)]'>
486486
<div className='flex items-center gap-[8px] bg-[var(--surface-4)] px-[12px] py-[8px]'>
487487
<div className='flex h-[18px] w-[18px] items-center justify-center rounded-[4px] bg-[var(--surface-3)]' />
488488
<span className='font-medium text-[14px] text-[var(--text-primary)]'>
@@ -513,7 +513,7 @@ function BlockDetailsSidebarContent({
513513
: 'gray'
514514

515515
return (
516-
<div className='flex h-full w-80 flex-col border-[var(--border)] border-l bg-[var(--surface-1)]'>
516+
<div className='flex h-full w-80 flex-col overflow-hidden rounded-r-[8px] border-[var(--border)] border-l bg-[var(--surface-1)]'>
517517
{/* Header - styled like editor */}
518518
<div className='flex flex-shrink-0 items-center gap-[8px] bg-[var(--surface-4)] px-[12px] py-[8px]'>
519519
<div

apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ export function WorkflowPreview({
280280
type: nodeType,
281281
position: absolutePosition,
282282
draggable: false,
283-
className: executionStatus ? `execution-${executionStatus}` : undefined,
283+
className:
284+
executionStatus && executionStatus !== 'not-executed'
285+
? `execution-${executionStatus}`
286+
: undefined,
284287
data: {
285288
type: block.type,
286289
config: blockConfig,
@@ -333,7 +336,6 @@ export function WorkflowPreview({
333336
sourceHandle: edge.sourceHandle,
334337
targetHandle: edge.targetHandle,
335338
data: executionStatus ? { executionStatus } : undefined,
336-
className: executionStatus === 'not-executed' ? 'execution-not-executed' : undefined,
337339
}
338340
})
339341
}, [edgesStructure, workflowState.edges, isValidWorkflowState, executedBlocks])
@@ -362,7 +364,7 @@ export function WorkflowPreview({
362364
>
363365
<style>{`
364366
${cursorStyle ? `.preview-mode .react-flow__pane { cursor: ${cursorStyle} !important; }` : ''}
365-
367+
366368
/* Execution status styling for nodes */
367369
.preview-mode .react-flow__node.execution-success {
368370
border-radius: 8px;

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ import { useSession } from '@/lib/auth/auth-client'
1818
import { cn } from '@/lib/core/utils/cn'
1919
import { quickValidateEmail } from '@/lib/messaging/email/validation'
2020
import { useWorkspacePermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
21+
import { EmailTag } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/components/email-tag'
22+
import { PermissionsTable } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/components/permissions-table'
2123
import { API_ENDPOINTS } from '@/stores/constants'
22-
import type { PermissionType, UserPermissions } from '.'
23-
import { EmailTag, PermissionsTable } from '.'
24+
import type { PermissionType, UserPermissions } from './components/types'
2425

2526
const logger = createLogger('InviteModal')
2627

0 commit comments

Comments
 (0)