Skip to content

Commit bd9824c

Browse files
revert(ui): drop chat identifier error rendering and profile-name toast
1 parent 4476fd3 commit bd9824c

2 files changed

Lines changed: 7 additions & 17 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]
    • settings/components/general
    • w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat

apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ import {
1414
Label,
1515
Switch,
1616
Tooltip,
17-
toast,
1817
} from '@sim/emcn'
1918
import { createLogger } from '@sim/logger'
20-
import { getErrorMessage } from '@sim/utils/errors'
2119
import { Camera, Check, Info, Pencil } from 'lucide-react'
2220
import Image from 'next/image'
2321
import { useRouter } from 'next/navigation'
@@ -151,7 +149,6 @@ export function General() {
151149
setIsEditingName(false)
152150
} catch (error) {
153151
logger.error('Error updating name:', error)
154-
toast.error(getErrorMessage(error, 'Failed to update name'))
155152
setName(profile?.name || '')
156153
}
157154
}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ export function ChatDeploy({
326326
disabled={chatSubmitting}
327327
onValidationChange={setIsIdentifierValid}
328328
isEditingExisting={!!existingChat}
329-
error={errors.identifier}
330329
/>
331330

332331
<div>
@@ -474,7 +473,6 @@ interface IdentifierInputProps {
474473
disabled?: boolean
475474
onValidationChange?: (isValid: boolean) => void
476475
isEditingExisting?: boolean
477-
error?: string
478476
}
479477

480478
const getDomainPrefix = (() => {
@@ -489,15 +487,12 @@ function IdentifierInput({
489487
disabled = false,
490488
onValidationChange,
491489
isEditingExisting = false,
492-
error,
493490
}: IdentifierInputProps) {
494-
const {
495-
isChecking,
496-
error: availabilityError,
497-
isValid,
498-
} = useIdentifierValidation(value, originalIdentifier, isEditingExisting)
499-
500-
const displayError = error || availabilityError
491+
const { isChecking, error, isValid } = useIdentifierValidation(
492+
value,
493+
originalIdentifier,
494+
isEditingExisting
495+
)
501496

502497
useEffect(() => {
503498
onValidationChange?.(isValid)
@@ -522,7 +517,7 @@ function IdentifierInput({
522517
<div
523518
className={cn(
524519
'relative flex items-stretch overflow-hidden rounded-sm border border-[var(--border-1)] bg-[var(--surface-5)]',
525-
displayError && 'border-[var(--text-error)]'
520+
error && 'border-[var(--text-error)]'
526521
)}
527522
>
528523
<div className='flex items-center whitespace-nowrap bg-[var(--surface-5)] pr-1.5 pl-2 font-medium text-[var(--text-secondary)] text-sm'>
@@ -563,9 +558,7 @@ function IdentifierInput({
563558
)}
564559
</div>
565560
</div>
566-
{displayError && (
567-
<p className='mt-[6.5px] text-[var(--text-error)] text-caption'>{displayError}</p>
568-
)}
561+
{error && <p className='mt-[6.5px] text-[var(--text-error)] text-caption'>{error}</p>}
569562
<p className='mt-[6.5px] truncate text-[var(--text-secondary)] text-xs'>
570563
{isEditingExisting && value ? (
571564
<>

0 commit comments

Comments
 (0)