v0.3.30: duplication, control bar fixes

This commit is contained in:
Waleed Latif
2025-08-18 08:57:26 -07:00
committed by GitHub
2 changed files with 7 additions and 13 deletions

View File

@@ -32,7 +32,6 @@ import {
TooltipTrigger,
} from '@/components/ui'
import { useSession } from '@/lib/auth-client'
import { isDev } from '@/lib/environment'
import { createLogger } from '@/lib/logs/console/logger'
import { cn } from '@/lib/utils'
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
@@ -414,7 +413,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
<Tooltip>
<TooltipTrigger asChild>
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
<Trash2 className='h-5 w-5' />
<Trash2 className='h-4 w-4' />
</div>
</TooltipTrigger>
<TooltipContent>{getTooltipText()}</TooltipContent>
@@ -499,7 +498,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
<TooltipTrigger asChild>
{isDisabled ? (
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
<Copy className='h-5 w-5' />
<Copy className='h-4 w-4' />
</div>
) : (
<Button
@@ -564,9 +563,9 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
{isDisabled ? (
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
{isAutoLayouting ? (
<RefreshCw className='h-5 w-5 animate-spin' />
<RefreshCw className='h-4 w-4 animate-spin' />
) : (
<Layers className='h-5 w-5' />
<Layers className='h-4 w-4' />
)}
</div>
) : (
@@ -722,7 +721,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
<TooltipTrigger asChild>
{isDisabled ? (
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
<Store className='h-5 w-5' />
<Store className='h-4 w-4' />
</div>
) : (
<Button
@@ -776,7 +775,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
isDebugging && 'text-amber-500'
)}
>
<Bug className='h-5 w-5' />
<Bug className='h-4 w-4' />
</div>
) : (
<Button variant='outline' onClick={handleDebugToggle} className={buttonClass}>
@@ -1003,8 +1002,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
{renderToggleButton()}
{isExpanded && <ExportControls />}
{isExpanded && renderAutoLayoutButton()}
{!isDev && isExpanded && renderDuplicateButton()}
{isDev && renderDuplicateButton()}
{renderDuplicateButton()}
{renderDeleteButton()}
{!isDebugging && renderDebugModeToggle()}
{isExpanded && renderPublishButton()}

View File

@@ -1212,10 +1212,6 @@ export const useWorkflowRegistry = create<WorkflowRegistry>()(
}))
}
// Set as active workflow and update store
set({ activeWorkflowId: id })
useWorkflowStore.setState(newState)
// Workflow has already been persisted to the database via the duplication endpoint
logger.info(