Skip to content

Commit 2fbe0de

Browse files
authored
fix(settings): fix broken api keys, help modal, logs, workflow renaming (#1945)
* fix(settings): fix broken api keys, help modal, logs, workflow renaming * fix build * cleanup * use emcn
1 parent 6315cc1 commit 2fbe0de

File tree

45 files changed

+1314
-1211
lines changed

Some content is hidden

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

45 files changed

+1314
-1211
lines changed

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
RotateCcw,
1717
} from 'lucide-react'
1818
import { useParams, useRouter } from 'next/navigation'
19-
import { Tooltip } from '@/components/emcn'
19+
import { Button, Tooltip } from '@/components/emcn'
2020
import { Trash } from '@/components/emcn/icons/trash'
2121
import {
2222
AlertDialog,
@@ -28,7 +28,6 @@ import {
2828
AlertDialogHeader,
2929
AlertDialogTitle,
3030
} from '@/components/ui/alert-dialog'
31-
import { Button } from '@/components/ui/button'
3231
import { Checkbox } from '@/components/ui/checkbox'
3332
import { SearchHighlight } from '@/components/ui/search-highlight'
3433
import type { DocumentSortField, SortOrder } from '@/lib/knowledge/documents/types'
@@ -1006,7 +1005,6 @@ export function KnowledgeBase({
10061005
<Tooltip.Trigger asChild>
10071006
<Button
10081007
variant='ghost'
1009-
size='sm'
10101008
onClick={(e) => {
10111009
e.stopPropagation()
10121010
handleRetryDocument(doc.id)
@@ -1024,7 +1022,6 @@ export function KnowledgeBase({
10241022
<Tooltip.Trigger asChild>
10251023
<Button
10261024
variant='ghost'
1027-
size='sm'
10281025
onClick={(e) => {
10291026
e.stopPropagation()
10301027
handleToggleEnabled(doc.id)
@@ -1059,7 +1056,6 @@ export function KnowledgeBase({
10591056
<Tooltip.Trigger asChild>
10601057
<Button
10611058
variant='ghost'
1062-
size='sm'
10631059
onClick={(e) => {
10641060
e.stopPropagation()
10651061
handleDeleteDocument(doc.id)
@@ -1070,7 +1066,7 @@ export function KnowledgeBase({
10701066
}
10711067
className='h-8 w-8 p-0 text-gray-500 hover:text-red-600 disabled:opacity-50'
10721068
>
1073-
<Trash className='h-4 w-4' />
1069+
<Trash className='h-[14px] w-[14px]' />
10741070
</Button>
10751071
</Tooltip.Trigger>
10761072
<Tooltip.Content side='top'>
@@ -1097,7 +1093,6 @@ export function KnowledgeBase({
10971093
<div className='flex items-center gap-1'>
10981094
<Button
10991095
variant='ghost'
1100-
size='sm'
11011096
onClick={prevPage}
11021097
disabled={!hasPrevPage || isLoadingDocuments}
11031098
className='h-8 w-8 p-0'
@@ -1138,7 +1133,6 @@ export function KnowledgeBase({
11381133

11391134
<Button
11401135
variant='ghost'
1141-
size='sm'
11421136
onClick={nextPage}
11431137
disabled={!hasNextPage || isLoadingDocuments}
11441138
className='h-8 w-8 p-0'

apps/sim/app/workspace/[workspaceId]/knowledge/components/primary-button/primary-button.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
'use client'
22

3-
import { Button } from '@/components/ui/button'
3+
import { Button } from '@/components/emcn'
44
import { cn } from '@/lib/utils'
55

66
interface PrimaryButtonProps {
77
children: React.ReactNode
88
onClick?: () => void
99
disabled?: boolean
10-
size?: 'sm' | 'default' | 'lg'
1110
className?: string
1211
type?: 'button' | 'submit' | 'reset'
1312
}
@@ -16,7 +15,6 @@ export function PrimaryButton({
1615
children,
1716
onClick,
1817
disabled = false,
19-
size = 'sm',
2018
className,
2119
type = 'button',
2220
}: PrimaryButtonProps) {
@@ -25,9 +23,9 @@ export function PrimaryButton({
2523
type={type}
2624
onClick={onClick}
2725
disabled={disabled}
28-
size={size}
26+
variant='primary'
2927
className={cn(
30-
'flex items-center gap-1 bg-[var(--brand-primary-hex)] font-[480] text-white shadow-[0_0_0_0_var(--brand-primary-hex)] transition-all duration-200 hover:bg-[var(--brand-primary-hover-hex)] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]',
28+
'flex h-8 items-center gap-1 px-[8px] py-[6px] font-[480] shadow-[0_0_0_0_var(--brand-primary-hex)] transition-all duration-200 hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]',
3129
disabled && 'disabled:cursor-not-allowed disabled:opacity-50',
3230
className
3331
)}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import { useMemo, useState } from 'react'
44
import { Check, ChevronDown, LibraryBig, Plus } from 'lucide-react'
55
import { useParams } from 'next/navigation'
6-
import { Tooltip } from '@/components/emcn'
7-
import { Button } from '@/components/ui/button'
6+
import { Button, Tooltip } from '@/components/emcn'
87
import {
98
DropdownMenu,
109
DropdownMenuContent,
@@ -111,7 +110,7 @@ export function Knowledge() {
111110
{/* Sort Dropdown */}
112111
<DropdownMenu>
113112
<DropdownMenuTrigger asChild>
114-
<Button variant='outline' size='sm' className={filterButtonClass}>
113+
<Button variant='outline' className={filterButtonClass}>
115114
{currentSortLabel}
116115
<ChevronDown className='ml-2 h-4 w-4 text-muted-foreground' />
117116
</Button>

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { ReactNode } from 'react'
22
import { Loader2, RefreshCw, Search } from 'lucide-react'
3-
import { Tooltip } from '@/components/emcn'
4-
import { Button } from '@/components/ui/button'
3+
import { Button, Tooltip } from '@/components/emcn'
54
import { Input } from '@/components/ui/input'
65
import { cn } from '@/lib/utils'
76
import { soehne } from '@/app/fonts/soehne/soehne'
@@ -49,7 +48,7 @@ export function Controls({
4948
placeholder='Search workflows...'
5049
value={searchQuery}
5150
onChange={(e) => setSearchQuery?.(e.target.value)}
52-
className='h-9 w-full rounded-[11px] border-[#E5E5E5] bg-[var(--white)] pr-10 pl-9 dark:border-[#414141] dark:bg-[var(--surface-elevated)]'
51+
className='h-9 w-full border-[#E5E5E5] bg-[var(--white)] pr-10 pl-9 dark:border-[#414141] dark:bg-[var(--surface-elevated)]'
5352
/>
5453
{searchQuery && (
5554
<button
@@ -77,9 +76,8 @@ export function Controls({
7776
<Tooltip.Trigger asChild>
7877
<Button
7978
variant='ghost'
80-
size='icon'
8179
onClick={resetToNow}
82-
className='h-9 rounded-[11px] hover:bg-secondary'
80+
className='h-9 w-9 p-0 hover:bg-secondary'
8381
disabled={isRefetching}
8482
>
8583
{isRefetching ? (
@@ -97,9 +95,8 @@ export function Controls({
9795
<Tooltip.Trigger asChild>
9896
<Button
9997
variant='ghost'
100-
size='icon'
10198
onClick={onExport}
102-
className='h-9 rounded-[11px] hover:bg-secondary'
99+
className='h-9 w-9 p-0 hover:bg-secondary'
103100
aria-label='Export CSV'
104101
>
105102
<svg
@@ -123,7 +120,6 @@ export function Controls({
123120
<div className='inline-flex h-9 items-center rounded-[11px] border bg-card p-1 shadow-sm'>
124121
<Button
125122
variant='ghost'
126-
size='sm'
127123
onClick={() => setLive((v) => !v)}
128124
className={cn(
129125
'h-7 rounded-[8px] px-3 font-normal text-xs',
@@ -140,7 +136,6 @@ export function Controls({
140136
<div className='inline-flex h-9 items-center rounded-[11px] border bg-card p-1 shadow-sm'>
141137
<Button
142138
variant='ghost'
143-
size='sm'
144139
onClick={() => setViewMode('logs')}
145140
className={cn(
146141
'h-7 rounded-[8px] px-3 font-normal text-xs',
@@ -154,7 +149,6 @@ export function Controls({
154149
</Button>
155150
<Button
156151
variant='ghost'
157-
size='sm'
158152
onClick={() => setViewMode('dashboard')}
159153
className={cn(
160154
'h-7 rounded-[8px] px-3 font-normal text-xs',

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ export interface AggregateMetrics {
99
export function KPIs({ aggregate }: { aggregate: AggregateMetrics }) {
1010
return (
1111
<div className='mb-2 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4'>
12-
<div className='rounded-[12px] border bg-card p-4 shadow-sm'>
12+
<div className='border bg-card p-4 shadow-sm'>
1313
<div className='text-muted-foreground text-xs'>Total executions</div>
1414
<div className='mt-1 font-[440] text-[22px] leading-6'>
1515
{aggregate.totalExecutions.toLocaleString()}
1616
</div>
1717
</div>
18-
<div className='rounded-[12px] border bg-card p-4 shadow-sm'>
18+
<div className='border bg-card p-4 shadow-sm'>
1919
<div className='text-muted-foreground text-xs'>Success rate</div>
2020
<div className='mt-1 font-[440] text-[22px] leading-6'>
2121
{aggregate.successRate.toFixed(1)}%
2222
</div>
2323
</div>
24-
<div className='rounded-[12px] border bg-card p-4 shadow-sm'>
24+
<div className='border bg-card p-4 shadow-sm'>
2525
<div className='text-muted-foreground text-xs'>Failed executions</div>
2626
<div className='mt-1 font-[440] text-[22px] leading-6'>
2727
{aggregate.failedExecutions.toLocaleString()}
2828
</div>
2929
</div>
30-
<div className='rounded-[12px] border bg-card p-4 shadow-sm'>
30+
<div className='border bg-card p-4 shadow-sm'>
3131
<div className='text-muted-foreground text-xs'>Active workflows</div>
3232
<div className='mt-1 font-[440] text-[22px] leading-6'>{aggregate.activeWorkflows}</div>
3333
</div>

0 commit comments

Comments
 (0)