Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export function Chat() {
const [chatMessage, setChatMessage] = useState('')
const [promptHistory, setPromptHistory] = useState<string[]>([])
const [historyIndex, setHistoryIndex] = useState(-1)
const [moreMenuOpen, setMoreMenuOpen] = useState(false)

// Refs
const inputRef = useRef<HTMLInputElement>(null)
Expand Down Expand Up @@ -836,7 +837,7 @@ export function Chat() {

<div className='flex flex-shrink-0 items-center gap-[8px]'>
{/* More menu with actions */}
<Popover variant='default'>
<Popover variant='default' open={moreMenuOpen} onOpenChange={setMoreMenuOpen}>
<PopoverTrigger asChild>
<Button
variant='ghost'
Expand All @@ -858,6 +859,7 @@ export function Chat() {
onClick={(e) => {
e.stopPropagation()
if (activeWorkflowId) exportChatCSV(activeWorkflowId)
setMoreMenuOpen(false)
}}
disabled={workflowMessages.length === 0}
>
Expand All @@ -868,6 +870,7 @@ export function Chat() {
onClick={(e) => {
e.stopPropagation()
if (activeWorkflowId) clearChat(activeWorkflowId)
setMoreMenuOpen(false)
}}
disabled={workflowMessages.length === 0}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ function AuthSelector({
<Label className='mb-[6.5px] block pl-[2px] font-medium text-[13px] text-[var(--text-primary)]'>
{authType === 'email' ? 'Allowed emails' : 'Allowed SSO emails'}
</Label>
<div className='scrollbar-hide flex max-h-32 min-h-9 flex-wrap items-center gap-x-[8px] gap-y-[4px] overflow-y-auto rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[6px] py-[4px] focus-within:outline-none dark:bg-[var(--surface-9)]'>
<div className='scrollbar-hide flex max-h-32 flex-wrap items-center gap-x-[8px] gap-y-[4px] overflow-y-auto rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[8px] py-[6px] focus-within:outline-none dark:bg-[var(--surface-9)]'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: min-h-9 removed - container might collapse when empty

Suggested change
<div className='scrollbar-hide flex max-h-32 flex-wrap items-center gap-x-[8px] gap-y-[4px] overflow-y-auto rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[8px] py-[6px] focus-within:outline-none dark:bg-[var(--surface-9)]'>
<div className='scrollbar-hide flex min-h-9 max-h-32 flex-wrap items-center gap-x-[8px] gap-y-[4px] overflow-y-auto rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[8px] py-[6px] focus-within:outline-none dark:bg-[var(--surface-9)]'>
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx
Line: 783:783

Comment:
**logic:** `min-h-9` removed - container might collapse when empty

```suggestion
          <div className='scrollbar-hide flex min-h-9 max-h-32 flex-wrap items-center gap-x-[8px] gap-y-[4px] overflow-y-auto rounded-[4px] border border-[var(--surface-11)] bg-[var(--surface-6)] px-[8px] py-[6px] focus-within:outline-none dark:bg-[var(--surface-9)]'>
```

How can I resolve this? If you propose a fix, please make it concise.

{invalidEmails.map((email, index) => (
<EmailTag
key={`invalid-${index}`}
Expand All @@ -798,7 +798,7 @@ function AuthSelector({
disabled={disabled}
/>
))}
<Input
<input
type='text'
value={emailInputValue}
onChange={(e) => setEmailInputValue(e.target.value)}
Expand All @@ -810,10 +810,7 @@ function AuthSelector({
? 'Add another email'
: 'Enter emails or domains (@example.com)'
}
className={cn(
'h-6 min-w-[180px] flex-1 border-none bg-transparent p-0 text-[13px] focus-visible:ring-0 focus-visible:ring-offset-0',
emails.length > 0 || invalidEmails.length > 0 ? 'pl-[4px]' : 'pl-[4px]'
)}
className='min-w-[180px] flex-1 border-none bg-transparent p-0 font-medium font-sans text-foreground text-sm outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-50'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: text-foreground doesn't follow codebase CSS variable pattern - should use text-[var(--text-primary)]

Suggested change
className='min-w-[180px] flex-1 border-none bg-transparent p-0 font-medium font-sans text-foreground text-sm outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-50'
className='min-w-[180px] flex-1 border-none bg-transparent p-0 font-medium font-sans text-[var(--text-primary)] text-sm outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-50'
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx
Line: 813:813

Comment:
**style:** `text-foreground` doesn't follow codebase CSS variable pattern - should use `text-[var(--text-primary)]`

```suggestion
              className='min-w-[180px] flex-1 border-none bg-transparent p-0 font-medium font-sans text-[var(--text-primary)] text-sm outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-50'
```

How can I resolve this? If you propose a fix, please make it concise.

disabled={disabled}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useEffect, useState } from 'react'
import { Loader2, Plus } from 'lucide-react'
import { Loader2 } from 'lucide-react'
import { Button, Combobox, Input, Label, Textarea } from '@/components/emcn'
import {
Modal,
Expand Down Expand Up @@ -118,7 +118,7 @@ export function TemplateDeploy({

setLoadingCreators(true)
try {
const response = await fetch('/api/creator-profiles')
const response = await fetch('/api/creators')
if (response.ok) {
const data = await response.json()
const profiles = (data.profiles || []).map((profile: any) => ({
Expand Down Expand Up @@ -321,24 +321,23 @@ export function TemplateDeploy({
{creatorOptions.length === 0 && !loadingCreators ? (
<Button
type='button'
variant='outline'
variant='primary'
onClick={() => {
try {
const event = new CustomEvent('open-settings', {
detail: { tab: 'creator-profile' },
detail: { tab: 'template-profile' },
})
window.dispatchEvent(event)
logger.info('Opened Settings modal at creator-profile section')
logger.info('Opened Settings modal at template-profile section')
} catch (error) {
logger.error('Failed to open Settings modal for creator profile', {
logger.error('Failed to open Settings modal for template profile', {
error,
})
}
}}
className='gap-[8px]'
>
<Plus className='h-[14px] w-[14px] text-[var(--text-muted)]' />
<span className='text-[var(--text-muted)]'>Create a Creator Profile</span>
<span>Create Template Profile</span>
</Button>
) : (
<Combobox
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
'use client'

import { Check } from 'lucide-react'
import {
Button,
Modal,
ModalContent,
ModalDescription,
ModalFooter,
ModalHeader,
ModalTitle,
} from '@/components/emcn'
import { Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from '@/components/emcn'
import { client } from '@/lib/auth/auth-client'
import { createLogger } from '@/lib/logs/console/logger'
import {
Expand Down Expand Up @@ -339,63 +331,63 @@ export function OAuthRequiredModal({

return (
<Modal open={isOpen} onOpenChange={(open) => !open && onClose()}>
<ModalContent className='sm:max-w-md'>
<ModalHeader>
<ModalTitle>Additional Access Required</ModalTitle>
<ModalDescription>
The "{toolName}" tool requires access to your {providerName} account to function
properly.
</ModalDescription>
</ModalHeader>
<div className='flex flex-col gap-4 py-4'>
<div className='flex items-center gap-4'>
<div className='rounded-full bg-muted p-2'>
<ProviderIcon className='h-5 w-5' />
</div>
<div className='flex-1'>
<p className='font-medium text-sm'>Connect {providerName}</p>
<p className='text-muted-foreground text-sm'>
You need to connect your {providerName} account to continue
</p>
<ModalContent className='w-[460px]'>
<ModalHeader>Connect {providerName}</ModalHeader>
<ModalBody>
<div className='flex flex-col gap-[16px]'>
<div className='flex items-center gap-[14px]'>
<div className='flex h-[40px] w-[40px] flex-shrink-0 items-center justify-center rounded-[8px] bg-[var(--surface-6)]'>
<ProviderIcon className='h-[18px] w-[18px]' />
</div>
<div className='flex-1'>
<p className='font-medium text-[13px] text-[var(--text-primary)]'>
Connect your {providerName} account
</p>
<p className='text-[12px] text-[var(--text-tertiary)]'>
The "{toolName}" tool requires access to your account
</p>
</div>
</div>
</div>

{displayScopes.length > 0 && (
<div className='rounded-md border bg-muted/50'>
<div className='border-b px-4 py-3'>
<h4 className='font-medium text-sm'>Permissions requested</h4>
{displayScopes.length > 0 && (
<div className='rounded-[8px] border bg-[var(--surface-6)]'>
<div className='border-b px-[14px] py-[10px]'>
<h4 className='font-medium text-[13px] text-[var(--text-primary)]'>
Permissions requested
</h4>
</div>
<ul className='max-h-[330px] space-y-[10px] overflow-y-auto px-[14px] py-[12px]'>
{displayScopes.map((scope) => (
<li key={scope} className='flex items-start gap-[10px]'>
<div className='mt-[3px] flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center'>
<Check className='h-[10px] w-[10px] text-[var(--text-primary)]' />
</div>
<div className='flex-1 text-[12px] text-[var(--text-primary)]'>
<span>{getScopeDescription(scope)}</span>
{newScopesSet.has(scope) && (
<span className='ml-[8px] rounded-[4px] border border-amber-500/30 bg-amber-500/10 px-[6px] py-[2px] text-[10px] text-amber-300'>
New
</span>
)}
</div>
</li>
))}
</ul>
</div>
<ul className='max-h-[400px] space-y-3 overflow-y-auto px-4 py-3'>
{displayScopes.map((scope) => (
<li key={scope} className='flex items-start gap-2 text-sm'>
<div className='mt-1 rounded-full bg-muted p-0.5'>
<Check className='h-3 w-3' />
</div>
<div className='text-muted-foreground'>
<span>{getScopeDescription(scope)}</span>
{newScopesSet.has(scope) && (
<span className='ml-2 rounded-[4px] border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-300'>
New
</span>
)}
</div>
</li>
))}
</ul>
</div>
)}
</div>
)}
</div>
</ModalBody>
<ModalFooter>
<Button variant='outline' onClick={onClose} className='h-[32px] px-[12px]'>
<Button variant='active' onClick={onClose}>
Cancel
</Button>
<Button
variant='primary'
type='button'
onClick={handleConnectDirectly}
className='h-[32px] px-[12px]'
className='!bg-[var(--brand-tertiary-2)] !text-[var(--text-inverse)] hover:!bg-[var(--brand-tertiary-2)]/90'
>
Connect Now
Connect
</Button>
</ModalFooter>
</ModalContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,6 @@ export function Panel() {
setHasHydrated(true)
}, [setHasHydrated])

/**
* Focus Copilot user input when the Copilot tab becomes active or when
* the panel loads with Copilot already selected, after hydration.
*/
useEffect(() => {
if (!_hasHydrated || activeTab !== 'copilot') {
return
}

copilotRef.current?.focusInput()
}, [_hasHydrated, activeTab])

/**
* Handles tab click events
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ export function ApiKeys({ onOpenChange, registerCloseHandler }: ApiKeysProps) {
{isLoading ? (
<div className='flex flex-col gap-[16px]'>
<div className='flex flex-col gap-[8px]'>
<Skeleton className='h-[14px] w-[70px]' />
<Skeleton className='h-5 w-[70px]' />
<div className='text-[13px] text-[var(--text-muted)]'>
<Skeleton className='h-[13px] w-[140px]' />
<Skeleton className='h-5 w-[140px]' />
</div>
</div>
<div className='flex flex-col gap-[8px]'>
<Skeleton className='h-[14px] w-[55px]' />
<Skeleton className='h-5 w-[55px]' />
<ApiKeySkeleton />
<ApiKeySkeleton />
</div>
Expand Down Expand Up @@ -624,10 +624,10 @@ function ApiKeySkeleton() {
<div className='flex items-center justify-between gap-[12px]'>
<div className='flex min-w-0 flex-col justify-center gap-[1px]'>
<div className='flex items-center gap-[6px]'>
<Skeleton className='h-[14px] w-[80px]' />
<Skeleton className='h-[13px] w-[140px]' />
<Skeleton className='h-5 w-[80px]' />
<Skeleton className='h-5 w-[140px]' />
</div>
<Skeleton className='h-[13px] w-[100px]' />
<Skeleton className='h-5 w-[100px]' />
</div>
<Skeleton className='h-[26px] w-[48px] rounded-[6px]' />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,13 @@ export function EnvironmentVariables({ registerBeforeLeaveHandler }: Environment
{isLoading ? (
<>
<div className='flex flex-col gap-[8px]'>
<Skeleton className='h-[14px] w-[70px]' />
<Skeleton className='h-5 w-[70px]' />
<div className='text-[13px] text-[var(--text-muted)]'>
<Skeleton className='h-[13px] w-[160px]' />
<Skeleton className='h-5 w-[160px]' />
</div>
</div>
<div className='flex flex-col gap-[8px]'>
<Skeleton className='h-[14px] w-[55px]' />
<Skeleton className='h-5 w-[55px]' />
{Array.from({ length: 2 }, (_, i) => (
<div key={`personal-${i}`} className={GRID_COLS}>
<Skeleton className='h-9 rounded-[6px]' />
Expand Down
Loading