Skip to content

Commit 96f134b

Browse files
authored
fix(variables): fixed floating variables, added autcomplete off to prevent suggested values (#1908)
* fixed variables * add autocomplete=off to prevent suggestions for subblock values
1 parent 7695556 commit 96f134b

File tree

19 files changed

+333
-256
lines changed

19 files changed

+333
-256
lines changed

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/delete-chunk-modal/delete-chunk-modal.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client'
22

33
import { useState } from 'react'
4-
import { Loader2, Trash2 } from 'lucide-react'
4+
import { Loader2 } from 'lucide-react'
5+
import { Trash } from '@/components/emcn/icons/trash'
56
import {
67
AlertDialog,
78
AlertDialogAction,
@@ -97,7 +98,7 @@ export function DeleteChunkModal({
9798
</>
9899
) : (
99100
<>
100-
<Trash2 className='mr-2 h-4 w-4' />
101+
<Trash className='mr-2 h-4 w-4' />
101102
Delete
102103
</>
103104
)}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use client'
22

33
import { Suspense, startTransition, useCallback, useEffect, useState } from 'react'
4-
import { ChevronLeft, ChevronRight, Circle, CircleOff, FileText, Plus, Trash2 } from 'lucide-react'
4+
import { ChevronLeft, ChevronRight, Circle, CircleOff, FileText, Plus } from 'lucide-react'
55
import { useParams, useSearchParams } from 'next/navigation'
66
import { Tooltip } from '@/components/emcn'
7+
import { Trash } from '@/components/emcn/icons/trash'
78
import { Button, Checkbox, SearchHighlight } from '@/components/ui'
89
import { createLogger } from '@/lib/logs/console/logger'
910
import {
@@ -369,7 +370,7 @@ export function Document({
369370
disabled={!userPermissions.canEdit}
370371
className='h-8 w-8 p-0 text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50'
371372
>
372-
<Trash2 className='h-4 w-4' />
373+
<Trash className='h-4 w-4' />
373374
</Button>
374375
</Tooltip.Trigger>
375376
<Tooltip.Content side='top'>Delete Chunk</Tooltip.Content>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import {
1414
Loader2,
1515
Plus,
1616
RotateCcw,
17-
Trash2,
1817
} from 'lucide-react'
1918
import { useParams, useRouter } from 'next/navigation'
2019
import { Tooltip } from '@/components/emcn'
20+
import { Trash } from '@/components/emcn/icons/trash'
2121
import {
2222
AlertDialog,
2323
AlertDialogAction,
@@ -1070,7 +1070,7 @@ export function KnowledgeBase({
10701070
}
10711071
className='h-8 w-8 p-0 text-gray-500 hover:text-red-600 disabled:opacity-50'
10721072
>
1073-
<Trash2 className='h-4 w-4' />
1073+
<Trash className='h-4 w-4' />
10741074
</Button>
10751075
</Tooltip.Trigger>
10761076
<Tooltip.Content side='top'>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client'
22

3-
import { LibraryBig, MoreHorizontal, Trash2 } from 'lucide-react'
3+
import { LibraryBig, MoreHorizontal } from 'lucide-react'
44
import Link from 'next/link'
5+
import { Trash } from '@/components/emcn/icons/trash'
56
import { Button } from '@/components/ui/button'
67
import {
78
DropdownMenu,
@@ -107,7 +108,7 @@ export function KnowledgeHeader({ breadcrumbs, options }: KnowledgeHeaderProps)
107108
onClick={options.onDeleteKnowledgeBase}
108109
className='flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 font-[380] text-red-600 text-sm hover:bg-secondary/50 focus:bg-secondary/50 focus:text-red-600'
109110
>
110-
<Trash2 className='h-4 w-4' />
111+
<Trash className='h-4 w-4' />
111112
Delete Knowledge Base
112113
</DropdownMenuItem>
113114
</div>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/deploy-modal/components/chat-deploy/components/auth-selector.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useState } from 'react'
2-
import { Check, Copy, Eye, EyeOff, Plus, RefreshCw, Trash2 } from 'lucide-react'
2+
import { Check, Copy, Eye, EyeOff, Plus, RefreshCw } from 'lucide-react'
3+
import { Trash } from '@/components/emcn/icons/trash'
34
import { Button, Card, CardContent, Input, Label } from '@/components/ui'
45
import { getEnv, isTruthy } from '@/lib/env'
56
import { cn, generatePassword } from '@/lib/utils'
@@ -266,7 +267,7 @@ export function AuthSelector({
266267
disabled={disabled}
267268
className='h-7 w-7 opacity-70'
268269
>
269-
<Trash2 className='h-4 w-4' />
270+
<Trash className='h-4 w-4' />
270271
</Button>
271272
</div>
272273
</li>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { MouseEvent as ReactMouseEvent } from 'react'
44
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react'
5-
import { History, Plus, Trash2 } from 'lucide-react'
5+
import { History, Plus } from 'lucide-react'
66
import {
77
Button,
88
Popover,
@@ -12,6 +12,7 @@ import {
1212
PopoverSection,
1313
PopoverTrigger,
1414
} from '@/components/emcn'
15+
import { Trash } from '@/components/emcn/icons/trash'
1516
import { createLogger } from '@/lib/logs/console/logger'
1617
import {
1718
CopilotMessage,
@@ -387,7 +388,7 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(({ panelWidth }, ref
387388
}}
388389
aria-label='Delete chat'
389390
>
390-
<Trash2 className='h-[10px] w-[10px]' />
391+
<Trash className='h-[10px] w-[10px]' />
391392
</Button>
392393
</div>
393394
</PopoverItem>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client'
22

33
import { useMemo, useRef, useState } from 'react'
4-
import { Plus, Trash2 } from 'lucide-react'
4+
import { Plus } from 'lucide-react'
5+
import { Trash } from '@/components/emcn/icons/trash'
56
import { Button } from '@/components/ui/button'
67
import { Input } from '@/components/ui/input'
78
import { MAX_TAG_SLOTS } from '@/lib/knowledge/consts'
@@ -301,6 +302,7 @@ export function DocumentTagEntry({
301302
onFocus={handleFocus}
302303
onBlur={handleBlur}
303304
disabled={disabled}
305+
autoComplete='off'
304306
className={cn(
305307
'w-full border-0 text-transparent caret-foreground placeholder:text-muted-foreground/50 focus-visible:ring-0 focus-visible:ring-offset-0',
306308
isDuplicate && 'border-red-500 bg-red-50'
@@ -393,6 +395,7 @@ export function DocumentTagEntry({
393395
value={cellValue}
394396
readOnly
395397
disabled={disabled || isReadOnly}
398+
autoComplete='off'
396399
className='w-full cursor-pointer border-0 text-transparent caret-foreground placeholder:text-muted-foreground/50 focus-visible:ring-0 focus-visible:ring-offset-0'
397400
onClick={handleTypeDropdownClick}
398401
onFocus={handleTypeFocus}
@@ -464,6 +467,7 @@ export function DocumentTagEntry({
464467
onDrop={handlers.onDrop}
465468
onDragOver={handlers.onDragOver}
466469
disabled={disabled}
470+
autoComplete='off'
467471
className='w-full border-0 text-transparent caret-foreground placeholder:text-muted-foreground/50 focus-visible:ring-0 focus-visible:ring-offset-0'
468472
/>
469473
<div className='pointer-events-none absolute inset-0 flex items-center overflow-hidden bg-transparent px-3 text-sm'>
@@ -507,7 +511,7 @@ export function DocumentTagEntry({
507511
className='-translate-y-1/2 absolute top-1/2 right-2 h-8 w-8 opacity-0 group-hover:opacity-100'
508512
onClick={() => handleDeleteRow(rowIndex)}
509513
>
510-
<Trash2 className='h-4 w-4 text-muted-foreground' />
514+
<Trash className='h-4 w-4 text-muted-foreground' />
511515
</Button>
512516
</td>
513517
) : null

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/eval-input/eval-input.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { useMemo, useRef } from 'react'
2-
import { Plus, Trash } from 'lucide-react'
2+
import { Plus } from 'lucide-react'
33
import { Tooltip } from '@/components/emcn'
44
import { Button } from '@/components/emcn/components/button/button'
55
import { Input } from '@/components/emcn/components/input/input'
66
import { Textarea } from '@/components/emcn/components/textarea/textarea'
7+
import { Trash } from '@/components/emcn/icons/trash'
78
import { Label } from '@/components/ui/label'
89
import { cn } from '@/lib/utils'
910
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/formatted-text'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client'
22

33
import { useState } from 'react'
4-
import { Plus, Trash2 } from 'lucide-react'
4+
import { Plus } from 'lucide-react'
5+
import { Trash } from '@/components/emcn/icons/trash'
56
import { Button } from '@/components/ui/button'
67
import { Input } from '@/components/ui/input'
78
import { Label } from '@/components/ui/label'
@@ -234,6 +235,7 @@ export function KnowledgeTagFilters({
234235
value={cellValue}
235236
readOnly
236237
disabled={disabled || isLoading}
238+
autoComplete='off'
237239
className='w-full cursor-pointer border-0 text-transparent caret-foreground placeholder:text-muted-foreground/50 focus-visible:ring-0 focus-visible:ring-offset-0'
238240
onClick={handleDropdownClick}
239241
onFocus={handleFocus}
@@ -321,6 +323,7 @@ export function KnowledgeTagFilters({
321323
}
322324
}}
323325
disabled={disabled}
326+
autoComplete='off'
324327
className='w-full border-0 text-transparent caret-foreground placeholder:text-muted-foreground/50 focus-visible:ring-0 focus-visible:ring-offset-0'
325328
/>
326329
<div className='pointer-events-none absolute inset-0 flex items-center overflow-hidden bg-transparent px-3 text-sm'>
@@ -347,7 +350,7 @@ export function KnowledgeTagFilters({
347350
className='-translate-y-1/2 absolute top-1/2 right-2 h-8 w-8 opacity-0 group-hover:opacity-100'
348351
onClick={() => handleDeleteRow(rowIndex)}
349352
>
350-
<Trash2 className='h-4 w-4 text-muted-foreground' />
353+
<Trash className='h-4 w-4 text-muted-foreground' />
351354
</Button>
352355
</td>
353356
) : null

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ function McpInputWithTags({
113113
onDragOver={handleDragOver}
114114
placeholder={placeholder}
115115
disabled={disabled}
116+
autoComplete='off'
116117
className={cn(!isPassword && 'text-transparent caret-foreground')}
117118
/>
118119
{!isPassword && (

0 commit comments

Comments
 (0)