Skip to content

Commit 078bdc9

Browse files
committed
fix UI bugs
1 parent 81e6410 commit 078bdc9

File tree

11 files changed

+22
-26
lines changed

11 files changed

+22
-26
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ export function Knowledge() {
134134
<div className='flex flex-1 flex-col overflow-auto px-[24px] pt-[28px] pb-[24px]'>
135135
<div>
136136
<div className='flex items-start gap-[12px]'>
137-
<div className='flex h-[26px] w-[26px] items-center justify-center rounded-[6px] border border-[#1E5A3E] bg-[#0F3D2C]'>
138-
<Database className='h-[14px] w-[14px] text-[#34D399]' />
137+
<div className='flex h-[26px] w-[26px] items-center justify-center rounded-[6px] border border-[#5BB377] bg-[#E8F7EE] dark:border-[#1E5A3E] dark:bg-[#0F3D2C]'>
138+
<Database className='h-[14px] w-[14px] text-[#5BB377] dark:text-[#34D399]' />
139139
</div>
140140
<h1 className='font-medium text-[18px]'>Knowledge Base</h1>
141141
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ export function LogsToolbar({
295295
{/* Header Section */}
296296
<div className='flex items-start justify-between'>
297297
<div className='flex items-start gap-[12px]'>
298-
<div className='flex h-[26px] w-[26px] items-center justify-center rounded-[6px] border border-[#7A5F11] bg-[#514215]'>
299-
<Library className='h-[14px] w-[14px] text-[#FBBC04]' />
298+
<div className='flex h-[26px] w-[26px] items-center justify-center rounded-[6px] border border-[#D4A843] bg-[#FDF6E3] dark:border-[#7A5F11] dark:bg-[#514215]'>
299+
<Library className='h-[14px] w-[14px] text-[#D4A843] dark:text-[#FBBC04]' />
300300
</div>
301301
<h1 className='font-medium text-[18px]'>Logs</h1>
302302
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ export default function Templates({
175175
<div className='flex flex-1 flex-col overflow-auto px-[24px] pt-[28px] pb-[24px]'>
176176
<div>
177177
<div className='flex items-start gap-[12px]'>
178-
<div className='flex h-[26px] w-[26px] items-center justify-center rounded-[6px] border border-[#1A5070] bg-[#153347]'>
179-
<Layout className='h-[14px] w-[14px] text-[#33b4ff]' />
178+
<div className='flex h-[26px] w-[26px] items-center justify-center rounded-[6px] border border-[#5BA8D9] bg-[#E8F4FB] dark:border-[#1A5070] dark:bg-[#153347]'>
179+
<Layout className='h-[14px] w-[14px] text-[#5BA8D9] dark:text-[#33b4ff]' />
180180
</div>
181181
<h1 className='font-medium text-[18px]'>Templates</h1>
182182
</div>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ export function OutputSelect({
350350
e.preventDefault()
351351
e.stopPropagation()
352352
setHighlightedIndex((prev) => {
353-
// If no selection or at end, go to start. Otherwise increment
354353
if (prev === -1 || prev >= flattenedOutputs.length - 1) {
355354
return 0
356355
}
@@ -362,7 +361,6 @@ export function OutputSelect({
362361
e.preventDefault()
363362
e.stopPropagation()
364363
setHighlightedIndex((prev) => {
365-
// If no selection or at start, go to end. Otherwise decrement
366364
if (prev <= 0) {
367365
return flattenedOutputs.length - 1
368366
}
@@ -471,14 +469,12 @@ export function OutputSelect({
471469
>
472470
<div className='space-y-[2px]'>
473471
{Object.entries(groupedOutputs).map(([blockName, outputs]) => {
474-
// Calculate the starting index for this group
475472
const startIndex = flattenedOutputs.findIndex((o) => o.blockName === blockName)
476473

477474
const firstOutput = outputs[0]
478475
const blockConfig = getBlock(firstOutput.blockType)
479476
const blockColor = getOutputColor(firstOutput.blockId, firstOutput.blockType)
480477

481-
// Determine the icon to use
482478
let blockIcon: string | React.ComponentType<{ className?: string }> = blockName
483479
.charAt(0)
484480
.toUpperCase()

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export function OAuthRequiredModal({
407407
<div className='flex flex-1 items-center gap-[8px] text-[12px] text-[var(--text-primary)]'>
408408
<span>{getScopeDescription(scope)}</span>
409409
{newScopesSet.has(scope) && (
410-
<span className='inline-flex items-center gap-[6px] rounded-[6px] bg-[rgba(245,158,11,0.2)] px-[7px] py-[1px] font-medium text-[#fcd34d] text-[11px]'>
410+
<span className='inline-flex items-center gap-[6px] rounded-[6px] bg-[#fde68a] px-[7px] py-[1px] font-medium text-[#a16207] text-[11px] dark:bg-[rgba(245,158,11,0.2)] dark:text-[#fcd34d]'>
411411
New
412412
</span>
413413
)}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
13271327

13281328
const parts = tag.split('.')
13291329
if (parts.length >= 3 && blockGroup) {
1330-
const arrayFieldName = parts[1] // e.g., "channels", "files", "users"
1330+
const arrayFieldName = parts[1]
13311331
const block = useWorkflowStore.getState().blocks[blockGroup.blockId]
13321332
const blockConfig = block ? (getBlock(block.type) ?? null) : null
13331333
const mergedSubBlocks = getMergedSubBlocks(blockGroup.blockId)
@@ -1566,7 +1566,6 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
15661566
</span>
15671567
</PopoverItem>
15681568
{group.nestedTags.map((nestedTag) => {
1569-
// Skip the root tag since it's now shown as the clickable header
15701569
if (nestedTag.fullTag === rootTag) {
15711570
return null
15721571
}
@@ -1662,7 +1661,6 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
16621661
)
16631662
}
16641663

1665-
// Direct tag (no children)
16661664
const globalIndex = nestedTag.fullTag
16671665
? flatTagList.findIndex((item) => item.tag === nestedTag.fullTag)
16681666
: -1

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal/custom-tool-modal.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ try {
237237
},
238238
currentValue: functionCode,
239239
onGeneratedContent: (content) => {
240-
handleFunctionCodeChange(content) // Use existing handler to also trigger dropdown checks
241-
setCodeError(null) // Clear error on successful generation
240+
handleFunctionCodeChange(content)
241+
setCodeError(null)
242242
},
243243
onStreamChunk: (chunk) => {
244244
setFunctionCode((prev) => {
@@ -288,7 +288,6 @@ try {
288288
}
289289
}, [open])
290290

291-
// Auto-scroll selected parameter into view
292291
useEffect(() => {
293292
if (!showSchemaParams || schemaParamSelectedIndex < 0) return
294293

@@ -356,7 +355,6 @@ try {
356355
}
357356
}
358357

359-
/** Extracts parameters from JSON schema for autocomplete */
360358
const schemaParameters = useMemo(() => {
361359
try {
362360
if (!jsonSchema) return []
@@ -375,7 +373,6 @@ try {
375373
}
376374
}, [jsonSchema])
377375

378-
/** Memoized schema validation result */
379376
const isSchemaValid = useMemo(() => validateJsonSchema(jsonSchema), [jsonSchema])
380377

381378
const handleSave = async () => {
@@ -469,7 +466,6 @@ try {
469466
code: functionCode || '',
470467
},
471468
})
472-
// Get the ID from the created tool
473469
savedToolId = result?.[0]?.id
474470
}
475471

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const SubflowNodeComponent = memo(({ data, id }: NodeProps<SubflowNodeDat
144144
ref={blockRef}
145145
onClick={() => setCurrentBlockId(id)}
146146
className={cn(
147-
'relative cursor-pointer select-none rounded-[8px] border border-[var(--divider)]',
147+
'relative cursor-pointer select-none rounded-[8px] border border-[var(--border)]',
148148
'transition-block-bg transition-ring',
149149
'z-[20]'
150150
)}
@@ -162,7 +162,7 @@ export const SubflowNodeComponent = memo(({ data, id }: NodeProps<SubflowNodeDat
162162
{/* Header Section */}
163163
<div
164164
className={cn(
165-
'workflow-drag-handle flex cursor-grab items-center justify-between rounded-t-[8px] border-[var(--divider)] border-b bg-[var(--surface-2)] py-[8px] pr-[12px] pl-[8px] [&:active]:cursor-grabbing'
165+
'workflow-drag-handle flex cursor-grab items-center justify-between rounded-t-[8px] border-[var(--border)] border-b bg-[var(--surface-2)] py-[8px] pr-[12px] pl-[8px] [&:active]:cursor-grabbing'
166166
)}
167167
onMouseDown={(e) => {
168168
e.stopPropagation()

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/team-management/components/member-invitation-card/member-invitation-card.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ const PermissionSelector = React.memo<PermissionSelectorProps>(
4545
onClick={() => !disabled && onChange(option.value)}
4646
disabled={disabled}
4747
title={option.description}
48-
className='h-[22px] min-w-[38px] px-[6px] py-0 text-[11px]'
48+
className={cn(
49+
'h-[22px] min-w-[38px] px-[6px] py-0 text-[11px]',
50+
value === option.value &&
51+
'bg-[var(--border-1)] hover:bg-[var(--border-1)] dark:bg-[var(--surface-5)] dark:hover:bg-[var(--border-1)]'
52+
)}
4953
>
5054
{option.label}
5155
</Button>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export const PermissionSelector = React.memo<PermissionSelectorProps>(
4141
className={cn(
4242
'px-[8px] py-[4px] text-[12px]',
4343
radiusClasses,
44-
disabled && 'cursor-not-allowed'
44+
disabled && 'cursor-not-allowed',
45+
value === option.value &&
46+
'bg-[var(--border-1)] hover:bg-[var(--border-1)] dark:bg-[var(--surface-5)] dark:hover:bg-[var(--border-1)]'
4547
)}
4648
>
4749
{option.label}

0 commit comments

Comments
 (0)