diff --git a/apps/sim/app/api/careers/submit/route.ts b/apps/sim/app/api/careers/submit/route.ts
index 10c1bab2d4..bf0d492e05 100644
--- a/apps/sim/app/api/careers/submit/route.ts
+++ b/apps/sim/app/api/careers/submit/route.ts
@@ -1,8 +1,8 @@
import { render } from '@react-email/components'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
-import CareersConfirmationEmail from '@/components/emails/careers-confirmation-email'
-import CareersSubmissionEmail from '@/components/emails/careers-submission-email'
+import CareersConfirmationEmail from '@/components/emails/careers/careers-confirmation-email'
+import CareersSubmissionEmail from '@/components/emails/careers/careers-submission-email'
import { sendEmail } from '@/lib/email/mailer'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tool-input/tool-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tool-input/tool-input.tsx
index ffd21cfcb2..845112ad3e 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tool-input/tool-input.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tool-input/tool-input.tsx
@@ -1642,19 +1642,19 @@ export function ToolInput({
{tool.usageControl === 'auto' && (
- Auto: The model decides when to
- use the tool
+ The model decides when to use the
+ tool
)}
{tool.usageControl === 'force' && (
- Force: Always use this tool in
- the response
+ Always use this tool in the
+ response
)}
{tool.usageControl === 'none' && (
- Deny: Never use this tool
+ Never use this tool
)}
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/account/account.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/account/account.tsx
index 8faf32af0f..37ec50e7a3 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/account/account.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/account/account.tsx
@@ -26,7 +26,7 @@ export function Account(_props: AccountProps) {
const router = useRouter()
const brandConfig = useBrandConfig()
- // React Query hooks - with placeholderData to show cached data immediately (no skeleton loading!)
+ // React Query hooks - with placeholderData to show cached data immediately
const { data: profile } = useUserProfile()
const updateProfile = useUpdateUserProfile()
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/creator-profile/creator-profile.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/creator-profile/creator-profile.tsx
index 238c278f7b..fbc61919b1 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/creator-profile/creator-profile.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/creator-profile/creator-profile.tsx
@@ -41,7 +41,7 @@ export function CreatorProfile() {
const { data: session } = useSession()
const userId = session?.user?.id || ''
- // React Query hooks - with placeholderData to show cached data immediately (no skeleton loading!)
+ // React Query hooks - with placeholderData to show cached data immediately
const { data: organizations = [] } = useOrganizations()
const { data: existingProfile } = useCreatorProfile(userId)
const saveProfile = useSaveCreatorProfile()
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/credentials/credentials.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/credentials/credentials.tsx
index 2169c78e57..25c4c61df4 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/credentials/credentials.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/credentials/credentials.tsx
@@ -5,7 +5,6 @@ import { Check, ChevronDown, ExternalLink, Search } from 'lucide-react'
import { useRouter, useSearchParams } from 'next/navigation'
import { Button } from '@/components/emcn'
import { Input, Label } from '@/components/ui'
-import { useSession } from '@/lib/auth-client'
import { createLogger } from '@/lib/logs/console/logger'
import { OAUTH_PROVIDERS } from '@/lib/oauth/oauth'
import { cn } from '@/lib/utils'
@@ -26,11 +25,9 @@ interface CredentialsProps {
export function Credentials({ onOpenChange, registerCloseHandler }: CredentialsProps) {
const router = useRouter()
const searchParams = useSearchParams()
- const { data: session } = useSession()
- const userId = session?.user?.id
const pendingServiceRef = useRef(null)
- // React Query hooks - with placeholderData to show cached data immediately (no skeleton loading!)
+ // React Query hooks - with placeholderData to show cached data immediately
const { data: services = [] } = useOAuthConnections()
const connectService = useConnectOAuthService()
const disconnectService = useDisconnectOAuthService()
@@ -38,51 +35,28 @@ export function Credentials({ onOpenChange, registerCloseHandler }: CredentialsP
// Local UI state
const [searchTerm, setSearchTerm] = useState('')
const [pendingService, setPendingService] = useState(null)
- const [_pendingScopes, setPendingScopes] = useState([])
const [authSuccess, setAuthSuccess] = useState(false)
const [showActionRequired, setShowActionRequired] = useState(false)
const prevConnectedIdsRef = useRef>(new Set())
const connectionAddedRef = useRef(false)
- // Check for OAuth callback
+ // Check for OAuth callback - just show success message
useEffect(() => {
const code = searchParams.get('code')
const state = searchParams.get('state')
const error = searchParams.get('error')
- // Handle OAuth callback
if (code && state) {
- // This is an OAuth callback - try to restore state from localStorage
- try {
- const stored = localStorage.getItem('pending_oauth_state')
- if (stored) {
- const oauthState = JSON.parse(stored)
- logger.info('OAuth callback with restored state:', oauthState)
-
- // Mark as pending if we have context about what service was being connected
- if (oauthState.serviceId) {
- setPendingService(oauthState.serviceId)
- setShowActionRequired(true)
- }
-
- // Clean up the state (one-time use)
- localStorage.removeItem('pending_oauth_state')
- } else {
- logger.warn('OAuth callback but no state found in localStorage')
- }
- } catch (error) {
- logger.error('Error loading OAuth state from localStorage:', error)
- localStorage.removeItem('pending_oauth_state') // Clean up corrupted state
- }
-
- // Set success flag
+ logger.info('OAuth callback successful')
setAuthSuccess(true)
- // Clear the URL parameters
- router.replace('/workspace')
+ // Clear URL parameters without changing the page
+ const url = new URL(window.location.href)
+ url.searchParams.delete('code')
+ url.searchParams.delete('state')
+ router.replace(url.pathname + url.search)
} else if (error) {
logger.error('OAuth error:', { error })
- router.replace('/workspace')
}
}, [searchParams, router])
@@ -132,6 +106,7 @@ export function Credentials({ onOpenChange, registerCloseHandler }: CredentialsP
scopes: service.scopes,
})
+ // better-auth will automatically redirect back to this URL after OAuth
await connectService.mutateAsync({
providerId: service.providerId,
callbackURL: window.location.href,
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/files/files.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/files/files.tsx
index 0bf3ceb3da..0e79ebf392 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/files/files.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/files/files.tsx
@@ -55,7 +55,7 @@ export function Files() {
const params = useParams()
const workspaceId = params?.workspaceId as string
- // React Query hooks - with placeholderData to show cached data immediately (no skeleton loading!)
+ // React Query hooks - with placeholderData to show cached data immediately
const { data: files = [] } = useWorkspaceFiles(workspaceId)
const { data: storageInfo } = useStorageInfo(isBillingEnabled)
const uploadFile = useUploadWorkspaceFile()
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/general/general.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/general/general.tsx
index ba4df7e57c..e4b5c9ed09 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/general/general.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/general/general.tsx
@@ -34,7 +34,7 @@ export function General() {
const [isSuperUser, setIsSuperUser] = useState(false)
const [loadingSuperUser, setLoadingSuperUser] = useState(true)
- // React Query hooks - with placeholderData to show cached data immediately (no skeleton loading!)
+ // React Query hooks - with placeholderData to show cached data immediately
const { data: settings, isLoading } = useGeneralSettings()
const updateSetting = useUpdateGeneralSetting()
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/privacy/privacy.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/privacy/privacy.tsx
index 2f7e7f3721..003c683795 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/privacy/privacy.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/privacy/privacy.tsx
@@ -13,7 +13,7 @@ const TOOLTIPS = {
}
export function Privacy() {
- // React Query hooks - with placeholderData to show cached data immediately (no skeleton loading!)
+ // React Query hooks - with placeholderData to show cached data immediately
const { data: settings } = useGeneralSettings()
const updateSetting = useUpdateGeneralSetting()
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/subscription/subscription.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/subscription/subscription.tsx
index e7ee7eb38a..274be344bf 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/subscription/subscription.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/subscription/subscription.tsx
@@ -469,6 +469,15 @@ export function Subscription({ onOpenChange }: SubscriptionProps) {
/>
+ {/* Enterprise Usage Limit Notice */}
+ {subscription.isEnterprise && (
+
+
+ Contact enterprise for support usage limit changes
+
+
+ )}
+
{/* Cost Breakdown */}
{/* TODO: Re-enable CostBreakdown component in the next billing period
once sufficient copilot cost data has been collected for accurate display.
@@ -554,14 +563,6 @@ export function Subscription({ onOpenChange }: SubscriptionProps) {
{/* Billing usage notifications toggle */}
{subscription.isPaid && }
- {subscription.isEnterprise && (
-
-
- Contact enterprise for support usage limit changes
-
@@ -631,9 +632,6 @@ function BillingUsageNotificationsToggle() {
const updateSetting = useUpdateGeneralSetting()
const isLoading = updateSetting.isPending
- // Settings are automatically loaded by SettingsLoader provider
- // No need to load here - Zustand is synced from React Query
-
return (