Skip to content

Commit 3463c0b

Browse files
committed
Merge staging and reconcile file foundation checks
Preserve the upstream storage lock order and migration 0413; renumber pending file migrations to 0414-0420 without changing SQL. Correct aggregate file-delivery types and stale test fixtures, remove tests for the retired rollout gate, and retain the landed lifecycle requirement that ownership successors already have access.
2 parents d205f64 + 2b4fa54 commit 3463c0b

115 files changed

Lines changed: 35003 additions & 1170 deletions

File tree

Some content is hidden

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

‎apps/docs/content/docs/workflows/blocks/agent.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Live tool-call chips stream for **OpenAI, Anthropic, Azure Anthropic, Google, Ve
168168
| Anthropic | Summaries only — These generations omit full thinking; Sim requests summarized thinking on streaming runs. | `claude-fable-5-1`, `claude-fable-5`, `claude-sonnet-5-5`, `claude-sonnet-5`, `claude-opus-5-5`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-opus-4-5`, `claude-sonnet-4-5`, `claude-haiku-5-5`, `claude-haiku-4-5` |
169169
| Azure OpenAI | Summaries only — Requires OpenAI organization verification; falls back to no summaries. | `azure/gpt-6.1-sol`, `azure/gpt-6-sol`, `azure/gpt-6-luna`, `azure/gpt-6-astra`, `azure/gpt-5.6-sol`, `azure/gpt-5.6-terra`, `azure/gpt-5.6-luna`, `azure/gpt-5.5`, `azure/gpt-5.4-pro`, `azure/gpt-5.4`, `azure/gpt-5.4-mini`, `azure/gpt-5.4-nano`, `azure/gpt-5.2`, `azure/gpt-5.1`, `azure/gpt-5.1-codex`, `azure/gpt-5`, `azure/gpt-5-mini`, `azure/gpt-5-nano`, `azure/o3`, `azure/o4-mini` |
170170
| Azure Anthropic | Summaries only — These generations omit full thinking; Sim requests summarized thinking on streaming runs. | `azure-anthropic/claude-fable-5-1`, `azure-anthropic/claude-opus-5-5`, `azure-anthropic/claude-sonnet-5-5`, `azure-anthropic/claude-haiku-5-5`, `azure-anthropic/claude-opus-5`, `azure-anthropic/claude-opus-4-8`, `azure-anthropic/claude-opus-4-7`, `azure-anthropic/claude-opus-4-6`, `azure-anthropic/claude-opus-4-5`, `azure-anthropic/claude-sonnet-5`, `azure-anthropic/claude-sonnet-4-6`, `azure-anthropic/claude-sonnet-4-5`, `azure-anthropic/claude-opus-4-1`, `azure-anthropic/claude-haiku-4-5` |
171-
| Google | Summaries only | `gemini-3.8-flash`, `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash-lite`, `gemini-3.5-flash`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite` |
171+
| Google | Summaries only | `gemini-4-argon`, `gemini-3.8-flash`, `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash-lite`, `gemini-3.5-flash`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite` |
172172
| Vertex AI | Summaries only | `vertex/gemini-3.8-flash`, `vertex/gemini-3.7-flash`, `vertex/gemini-3.6-flash`, `vertex/gemini-3.5-flash-lite`, `vertex/gemini-3.5-flash`, `vertex/gemini-3.1-pro-preview`, `vertex/gemini-3.1-flash-lite`, `vertex/gemini-3-flash-preview`, `vertex/gemini-2.5-pro`, `vertex/gemini-2.5-flash`, `vertex/gemini-2.5-flash-lite` |
173173
| DeepSeek | Full thinking deltas | `deepseek-v4-pro`, `deepseek-flash`, `deepseek-v4-flash`, `deepseek-reasoner` |
174174
| xAI | Full thinking deltas | `grok-4.6`, `grok-4.5`, `grok-4.3`, `grok-4.20-multi-agent-0309` |

‎apps/sim/app/api/v2/files/uploads/[uploadId]/route.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ describe('GET /api/v2/files/uploads/[uploadId]', () => {
8888

8989
expect(v2RouteMocks.operationRate).toHaveBeenCalledWith(
9090
expect.stringContaining('files.upload.read'),
91-
expect.anything()
91+
expect.anything(),
92+
1
9293
)
9394
expect(v2RouteMocks.operationRate).not.toHaveBeenCalledWith(
9495
expect.stringContaining('files.upload.cancel'),

‎apps/sim/app/api/v2/workflows/[workflowId]/execute/route.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,13 @@ describe('POST /api/v2/workflows/[workflowId]/execute', () => {
500500
expect(mockCheckOperationRate).toHaveBeenCalledTimes(2)
501501
expect(mockCheckOperationRate).toHaveBeenCalledWith(
502502
'v2:workflows.execute:api-key:key-1',
503-
expect.anything()
503+
expect.anything(),
504+
1
504505
)
505506
expect(mockCheckOperationRate).toHaveBeenCalledWith(
506507
'v2:workflows.execute:workspace:workspace-1',
507-
expect.anything()
508+
expect.anything(),
509+
1
508510
)
509511
expect(mockPreprocessExecution).toHaveBeenCalledWith(
510512
expect.objectContaining({ rateLimitCounter: 'sync' })

‎apps/sim/app/workspace/[workspaceId]/changelog/changelog.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import { useState } from 'react'
44
import { Chip, cn, scrollFadeAttributes, scrollFadeClass, useScrollEdges } from '@sim/emcn'
55
import { Rss } from '@sim/emcn/icons'
6-
import { EmptyState } from '@/components/empty-state/empty-state'
76
import type { ChangelogRelease } from '@/lib/api/contracts/changelog'
87
import {
98
ReleaseDetailsModal,
109
ReleaseEntry,
1110
} from '@/app/workspace/[workspaceId]/changelog/components'
1211
import ChangelogLoading from '@/app/workspace/[workspaceId]/changelog/loading'
12+
import { ChangelogEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state'
1313
import { Resource } from '@/app/workspace/[workspaceId]/components/resource/resource'
1414
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
1515
import { PermissionAccessBoundary } from '@/ee/access-requests/components/permission-access-boundary'
@@ -47,10 +47,7 @@ function ChangelogContent({ workspaceId }: ChangelogProps) {
4747
<Chip onClick={() => query.refetch()}>Retry</Chip>
4848
</div>
4949
) : releases.length === 0 ? (
50-
<EmptyState
51-
title='Changelog'
52-
description='Sim publishes a release here when it ships changes to this workspace.'
53-
/>
50+
<ChangelogEmptyState />
5451
) : (
5552
<div
5653
ref={setScrollElement}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
import { cn } from '@sim/emcn'
2+
import { EmptyState } from '@/components/empty-state/empty-state'
3+
import { MASK_NO_REPEAT } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/mask'
4+
5+
/**
6+
* Skeleton ink — see the `INK` note in `tables-empty-state.tsx` for why not the surface
7+
* ramp. `mark` is the tables selection ring's opaque mix, so the latest release reads as
8+
* the one drawn entry rather than more placeholder.
9+
*/
10+
const INK = {
11+
title: 'color-mix(in srgb, var(--text-secondary) 30%, transparent)',
12+
detail: 'color-mix(in srgb, var(--text-secondary) 15%, transparent)',
13+
mark: 'color-mix(in srgb, var(--text-secondary) 46%, var(--bg))',
14+
} as const
15+
16+
/** The logs feed's falloff — a release history is the same repeating structure. */
17+
const TIMELINE_FADE =
18+
'[-webkit-mask-image:linear-gradient(to_bottom,#000_44%,transparent_100%)] [mask-image:linear-gradient(to_bottom,#000_44%,transparent_100%)]'
19+
20+
interface Release {
21+
top: number
22+
notes: readonly number[]
23+
}
24+
25+
const LATEST: Release = { top: 10, notes: [118, 92] }
26+
27+
const EARLIER: readonly Release[] = [
28+
{ top: 70, notes: [104, 126, 80] },
29+
{ top: 142, notes: [96, 112] },
30+
] as const
31+
32+
const SPINE_X = 24
33+
const NOTE_PITCH = 12
34+
35+
interface ReleaseNotesProps {
36+
release: Release
37+
}
38+
39+
function ReleaseNotes({ release }: ReleaseNotesProps) {
40+
return release.notes.map((width, index) => {
41+
const y = release.top + 26 + index * NOTE_PITCH
42+
return (
43+
<g key={y}>
44+
<circle cx='46' cy={y + 2} r='1.8' fill={INK.title} />
45+
<rect x='54' y={y} width={width} height='4' rx='2' fill={INK.detail} />
46+
</g>
47+
)
48+
})
49+
}
50+
51+
/** A release timeline: the latest release ringed at the head, earlier ones falling away below. */
52+
function ChangelogGraphic() {
53+
const latestY = LATEST.top + 8
54+
return (
55+
<svg
56+
viewBox='0 0 260 148'
57+
width={260}
58+
height={148}
59+
fill='none'
60+
aria-hidden='true'
61+
focusable='false'
62+
className={cn('block max-w-none shrink-0', TIMELINE_FADE, MASK_NO_REPEAT)}
63+
>
64+
<line x1={SPINE_X} x2={SPINE_X} y1='18' y2='160' stroke='var(--border)' strokeWidth={1.4} />
65+
66+
<circle
67+
cx={SPINE_X}
68+
cy={latestY}
69+
r='6'
70+
fill='var(--surface-2)'
71+
stroke={INK.mark}
72+
strokeWidth={1.6}
73+
/>
74+
<circle cx={SPINE_X} cy={latestY} r='2.4' fill={INK.mark} />
75+
<rect
76+
x='42'
77+
y={LATEST.top + 2}
78+
width='40'
79+
height='13'
80+
rx='6.5'
81+
fill='var(--surface-2)'
82+
stroke={INK.mark}
83+
strokeWidth={1.3}
84+
/>
85+
<rect x='50' y={LATEST.top + 6.5} width='24' height='4' rx='2' fill={INK.mark} />
86+
<rect x='92' y={LATEST.top + 6.5} width='34' height='4' rx='2' fill={INK.detail} />
87+
<ReleaseNotes release={LATEST} />
88+
89+
{EARLIER.map((release) => (
90+
<g key={release.top}>
91+
<circle cx={SPINE_X} cy={release.top + 8} r='4' fill={INK.title} />
92+
<rect x='42' y={release.top + 2} width='40' height='13' rx='6.5' fill={INK.detail} />
93+
<rect x='50' y={release.top + 6.5} width='24' height='4' rx='2' fill={INK.title} />
94+
<rect x='92' y={release.top + 6.5} width='34' height='4' rx='2' fill={INK.detail} />
95+
<ReleaseNotes release={release} />
96+
</g>
97+
))}
98+
</svg>
99+
)
100+
}
101+
102+
/** Empty state for a workspace that has no published releases yet. */
103+
export function ChangelogEmptyState() {
104+
return (
105+
<EmptyState
106+
graphic={<ChangelogGraphic />}
107+
title='Changelog'
108+
description='Sim publishes a release here when it ships changes to this workspace.'
109+
/>
110+
)
111+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
export { ChangelogEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/changelog-empty-state'
12
export { DashboardEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/dashboard-empty-state'
23
export { DocumentsEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/documents-empty-state'
34
export { FilesEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/files-empty-state'
45
export { KnowledgeEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/knowledge-empty-state'
56
export { LogsEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/logs-empty-state'
67
export { ResourceNoResults } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/resource-no-results'
78
export { TablesEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/tables-empty-state'
9+
export { TestsEmptyState } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/tests-empty-state'
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import { cn } from '@sim/emcn'
2+
import { EmptyState } from '@/components/empty-state/empty-state'
3+
import { HAIRLINE } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/hairline'
4+
import { MASK_NO_REPEAT } from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/mask'
5+
6+
/**
7+
* Skeleton ink — see the `INK` note in `tables-empty-state.tsx` for why not the surface
8+
* ramp. `mark` is the tables selection ring's opaque mix, so a status glyph reads as
9+
* drawn rather than as more placeholder.
10+
*/
11+
const INK = {
12+
title: 'color-mix(in srgb, var(--text-secondary) 30%, transparent)',
13+
detail: 'color-mix(in srgb, var(--text-secondary) 15%, transparent)',
14+
mark: 'color-mix(in srgb, var(--text-secondary) 46%, var(--bg))',
15+
} as const
16+
17+
/** The logs feed's falloff — a run report is the same repeating structure. */
18+
const REPORT_FADE =
19+
'[-webkit-mask-image:linear-gradient(to_bottom,#000_44%,transparent_100%)] [mask-image:linear-gradient(to_bottom,#000_44%,transparent_100%)]'
20+
21+
type TestStatus = 'pass' | 'fail'
22+
23+
interface ReportRow {
24+
status: TestStatus
25+
title: number
26+
detail: number
27+
}
28+
29+
/**
30+
* The failure sits second, inside the fade's opaque head, so the one row held in a card
31+
* never dissolves mid-stroke.
32+
*/
33+
const ROWS: readonly ReportRow[] = [
34+
{ status: 'pass', title: 72, detail: 110 },
35+
{ status: 'fail', title: 64, detail: 124 },
36+
{ status: 'pass', title: 80, detail: 96 },
37+
{ status: 'pass', title: 58, detail: 116 },
38+
] as const
39+
40+
const ROW_PITCH = 38
41+
const BADGE_RADIUS = 8
42+
const GLYPH = BADGE_RADIUS * 0.42
43+
44+
const MARK_STROKE = {
45+
stroke: INK.mark,
46+
strokeWidth: 1.4,
47+
strokeLinecap: 'round',
48+
strokeLinejoin: 'round',
49+
} as const
50+
51+
interface StatusBadgeProps {
52+
cx: number
53+
cy: number
54+
status: TestStatus
55+
}
56+
57+
/** A pass ticks on a hairline ring; a fail crosses on the heavier ring it shares with its card. */
58+
function StatusBadge({ cx, cy, status }: StatusBadgeProps) {
59+
const glyph =
60+
status === 'pass'
61+
? `M ${cx - GLYPH} ${cy} L ${cx - GLYPH * 0.25} ${cy + GLYPH * 0.75} L ${cx + GLYPH} ${cy - GLYPH * 0.7}`
62+
: `M ${cx - GLYPH * 0.75} ${cy - GLYPH * 0.75} L ${cx + GLYPH * 0.75} ${cy + GLYPH * 0.75} M ${cx + GLYPH * 0.75} ${cy - GLYPH * 0.75} L ${cx - GLYPH * 0.75} ${cy + GLYPH * 0.75}`
63+
return (
64+
<g>
65+
<circle
66+
cx={cx}
67+
cy={cy}
68+
r={BADGE_RADIUS}
69+
fill='var(--surface-2)'
70+
stroke={status === 'pass' ? 'var(--border)' : INK.mark}
71+
strokeWidth={status === 'pass' ? HAIRLINE.strokeWidth : 1.5}
72+
/>
73+
<path d={glyph} {...MARK_STROKE} />
74+
</g>
75+
)
76+
}
77+
78+
/** A test run report: passing rows, the one failure held in a card like the logs feed's latest run. */
79+
function TestsGraphic() {
80+
return (
81+
<svg
82+
viewBox='0 0 286 148'
83+
width={286}
84+
height={148}
85+
fill='none'
86+
aria-hidden='true'
87+
focusable='false'
88+
className={cn('block max-w-none shrink-0', REPORT_FADE, MASK_NO_REPEAT)}
89+
>
90+
{ROWS.map((row, index) => {
91+
const y = 6 + index * ROW_PITCH
92+
return (
93+
<g key={y}>
94+
{row.status === 'fail' ? (
95+
<rect
96+
x='0.5'
97+
y={y - 2}
98+
width='285'
99+
height='36'
100+
rx='8'
101+
fill='var(--surface-2)'
102+
{...HAIRLINE}
103+
/>
104+
) : null}
105+
<StatusBadge cx={22} cy={y + 16} status={row.status} />
106+
<rect x='40' y={y + 8} width={row.title} height='6' rx='3' fill={INK.title} />
107+
<rect x='40' y={y + 20} width={row.detail} height='4' rx='2' fill={INK.detail} />
108+
<rect x='236' y={y + 13} width='30' height='5' rx='2.5' fill={INK.detail} />
109+
</g>
110+
)
111+
})}
112+
</svg>
113+
)
114+
}
115+
116+
/** Empty state for a workspace with no tests yet. */
117+
export function TestsEmptyState() {
118+
return (
119+
<EmptyState
120+
graphic={<TestsGraphic />}
121+
title='Tests'
122+
description='Write tests to check your workflows behave before you deploy.'
123+
/>
124+
)
125+
}

‎apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-invalidation.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { MothershipResourceType } from '@/lib/mothership/resources/types'
33
import { dashboardKeys } from '@/hooks/queries/dashboards'
44
import { deploymentKeys, invalidateDeploymentQueries } from '@/hooks/queries/deployments'
55
import { logKeys } from '@/hooks/queries/logs'
6-
import { mothershipChatKeys } from '@/hooks/queries/mothership-chats'
6+
import { mothershipChatKeys, refreshMothershipChatDetail } from '@/hooks/queries/mothership-chats'
77
import { folderKeys } from '@/hooks/queries/utils/folder-keys'
88
import { invalidateWorkflowLists } from '@/hooks/queries/utils/invalidate-workflow-lists'
99
import { knowledgeKeys } from '@/hooks/queries/utils/knowledge-keys'
@@ -59,7 +59,7 @@ const RESOURCE_INVALIDATORS: Record<
5959
},
6060
task: (qc, wId, id) => {
6161
invalidate(qc, mothershipChatKeys.workspaceLists(wId))
62-
if (id) invalidate(qc, mothershipChatKeys.detail(id))
62+
if (id) refreshMothershipChatDetail(qc, id)
6363
},
6464
log: (qc, wId, id) => {
6565
invalidate(qc, [...logKeys.lists(), wId])

0 commit comments

Comments
 (0)