Skip to content

Commit fe27adf

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/timeout-lims
2 parents ee06ee3 + 4ba2252 commit fe27adf

File tree

68 files changed

+501
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+501
-397
lines changed

apps/sim/app/(auth)/sso/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { redirect } from 'next/navigation'
22
import { getEnv, isTruthy } from '@/lib/core/config/env'
3-
import SSOForm from '@/app/(auth)/sso/sso-form'
3+
import SSOForm from '@/ee/sso/components/sso-form'
44

55
export const dynamic = 'force-dynamic'
66

apps/sim/app/api/organizations/[id]/invitations/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { hasWorkspaceAdminAccess } from '@/lib/workspaces/permissions/utils'
2929
import {
3030
InvitationsNotAllowedError,
3131
validateInvitationsAllowed,
32-
} from '@/executor/utils/permission-check'
32+
} from '@/ee/access-control/utils/permission-check'
3333

3434
const logger = createLogger('OrganizationInvitations')
3535

apps/sim/app/api/workflows/[id]/execute/route.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
612612
blockId: string,
613613
blockName: string,
614614
blockType: string,
615+
executionOrder: number,
615616
iterationContext?: IterationContext
616617
) => {
617618
logger.info(`[${requestId}] 🔷 onBlockStart called:`, { blockId, blockName, blockType })
@@ -624,6 +625,7 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
624625
blockId,
625626
blockName,
626627
blockType,
628+
executionOrder,
627629
...(iterationContext && {
628630
iterationCurrent: iterationContext.iterationCurrent,
629631
iterationTotal: iterationContext.iterationTotal,
@@ -662,6 +664,7 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
662664
error: callbackData.output.error,
663665
durationMs: callbackData.executionTime || 0,
664666
startedAt: callbackData.startedAt,
667+
executionOrder: callbackData.executionOrder,
665668
endedAt: callbackData.endedAt,
666669
...(iterationContext && {
667670
iterationCurrent: iterationContext.iterationCurrent,
@@ -689,6 +692,7 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
689692
output: callbackData.output,
690693
durationMs: callbackData.executionTime || 0,
691694
startedAt: callbackData.startedAt,
695+
executionOrder: callbackData.executionOrder,
692696
endedAt: callbackData.endedAt,
693697
...(iterationContext && {
694698
iterationCurrent: iterationContext.iterationCurrent,

apps/sim/app/api/workspaces/invitations/route.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('Workspace Invitations API Route', () => {
102102
inArray: vi.fn().mockImplementation((field, values) => ({ type: 'inArray', field, values })),
103103
}))
104104

105-
vi.doMock('@/executor/utils/permission-check', () => ({
105+
vi.doMock('@/ee/access-control/utils/permission-check', () => ({
106106
validateInvitationsAllowed: vi.fn().mockResolvedValue(undefined),
107107
InvitationsNotAllowedError: class InvitationsNotAllowedError extends Error {
108108
constructor() {

apps/sim/app/api/workspaces/invitations/route.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { getFromEmailAddress } from '@/lib/messaging/email/utils'
2121
import {
2222
InvitationsNotAllowedError,
2323
validateInvitationsAllowed,
24-
} from '@/executor/utils/permission-check'
24+
} from '@/ee/access-control/utils/permission-check'
2525

2626
export const dynamic = 'force-dynamic'
2727

@@ -38,7 +38,6 @@ export async function GET(req: NextRequest) {
3838
}
3939

4040
try {
41-
// Get all workspaces where the user has permissions
4241
const userWorkspaces = await db
4342
.select({ id: workspace.id })
4443
.from(workspace)
@@ -55,10 +54,8 @@ export async function GET(req: NextRequest) {
5554
return NextResponse.json({ invitations: [] })
5655
}
5756

58-
// Get all workspaceIds where the user is a member
5957
const workspaceIds = userWorkspaces.map((w) => w.id)
6058

61-
// Find all invitations for those workspaces
6259
const invitations = await db
6360
.select()
6461
.from(workspaceInvitation)

apps/sim/app/chat/[identifier]/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import {
1414
ChatMessageContainer,
1515
EmailAuth,
1616
PasswordAuth,
17-
SSOAuth,
1817
VoiceInterface,
1918
} from '@/app/chat/components'
2019
import { CHAT_ERROR_MESSAGES, CHAT_REQUEST_TIMEOUT_MS } from '@/app/chat/constants'
2120
import { useAudioStreaming, useChatStreaming } from '@/app/chat/hooks'
21+
import SSOAuth from '@/ee/sso/components/sso-auth'
2222

2323
const logger = createLogger('ChatClient')
2424

apps/sim/app/chat/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export { default as EmailAuth } from './auth/email/email-auth'
22
export { default as PasswordAuth } from './auth/password/password-auth'
3-
export { default as SSOAuth } from './auth/sso/sso-auth'
43
export { ChatErrorState } from './error-state/error-state'
54
export { ChatHeader } from './header/header'
65
export { ChatInput } from './input/input'

apps/sim/app/workspace/[workspaceId]/knowledge/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { redirect } from 'next/navigation'
22
import { getSession } from '@/lib/auth'
33
import { verifyWorkspaceMembership } from '@/app/api/workflows/utils'
4-
import { getUserPermissionConfig } from '@/executor/utils/permission-check'
4+
import { getUserPermissionConfig } from '@/ee/access-control/utils/permission-check'
55
import { Knowledge } from './knowledge'
66

77
interface KnowledgePageProps {
@@ -23,7 +23,6 @@ export default async function KnowledgePage({ params }: KnowledgePageProps) {
2323
redirect('/')
2424
}
2525

26-
// Check permission group restrictions
2726
const permissionConfig = await getUserPermissionConfig(session.user.id)
2827
if (permissionConfig?.hideKnowledgeBaseTab) {
2928
redirect(`/workspace/${workspaceId}`)

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

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,12 @@ function FileCard({ file, isExecutionFile = false, workspaceId }: FileCardProps)
104104
}
105105

106106
return (
107-
<div className='flex flex-col gap-[8px] rounded-[6px] bg-[var(--surface-1)] px-[10px] py-[8px]'>
108-
<div className='flex items-center justify-between'>
109-
<div className='flex items-center gap-[8px]'>
110-
<span className='truncate font-medium text-[12px] text-[var(--text-secondary)]'>
111-
{file.name}
112-
</span>
113-
</div>
114-
<span className='font-medium text-[12px] text-[var(--text-tertiary)]'>
107+
<div className='flex flex-col gap-[4px] rounded-[6px] bg-[var(--surface-1)] px-[8px] py-[6px]'>
108+
<div className='flex min-w-0 items-center justify-between gap-[8px]'>
109+
<span className='min-w-0 flex-1 truncate font-medium text-[12px] text-[var(--text-secondary)]'>
110+
{file.name}
111+
</span>
112+
<span className='flex-shrink-0 font-medium text-[12px] text-[var(--text-tertiary)]'>
115113
{formatFileSize(file.size)}
116114
</span>
117115
</div>
@@ -142,20 +140,18 @@ export function FileCards({ files, isExecutionFile = false, workspaceId }: FileC
142140
}
143141

144142
return (
145-
<div className='flex w-full flex-col gap-[6px] rounded-[6px] bg-[var(--surface-2)] px-[10px] py-[8px]'>
143+
<div className='mt-[4px] flex flex-col gap-[6px] rounded-[6px] border border-[var(--border)] bg-[var(--surface-2)] px-[10px] py-[8px] dark:bg-transparent'>
146144
<span className='font-medium text-[12px] text-[var(--text-tertiary)]'>
147145
Files ({files.length})
148146
</span>
149-
<div className='flex flex-col gap-[8px]'>
150-
{files.map((file, index) => (
151-
<FileCard
152-
key={file.id || `file-${index}`}
153-
file={file}
154-
isExecutionFile={isExecutionFile}
155-
workspaceId={workspaceId}
156-
/>
157-
))}
158-
</div>
147+
{files.map((file, index) => (
148+
<FileCard
149+
key={file.id || `file-${index}`}
150+
file={file}
151+
isExecutionFile={isExecutionFile}
152+
workspaceId={workspaceId}
153+
/>
154+
))}
159155
</div>
160156
)
161157
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
import { ScrollArea } from '@/components/ui/scroll-area'
1919
import { BASE_EXECUTION_CHARGE } from '@/lib/billing/constants'
2020
import { cn } from '@/lib/core/utils/cn'
21+
import { formatDuration } from '@/lib/core/utils/formatting'
2122
import { filterHiddenOutputKeys } from '@/lib/logs/execution/trace-spans/trace-spans'
2223
import {
2324
ExecutionSnapshot,
@@ -453,7 +454,7 @@ export const LogDetails = memo(function LogDetails({
453454
Duration
454455
</span>
455456
<span className='font-medium text-[13px] text-[var(--text-secondary)]'>
456-
{log.duration || '—'}
457+
{formatDuration(log.duration, { precision: 2 }) || '—'}
457458
</span>
458459
</div>
459460

0 commit comments

Comments
 (0)