fix Vue node border styles in different states (executing, error, selected) (#6018)

- Use exact tokens from Figma
- Fix issue in which node is stuck in `executing` state after it errors

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6018-fix-Vue-node-border-styles-in-different-states-executing-error-selected-2896d73d365081f39000fc3e42811f0d)
by [Unito](https://www.unito.io)
This commit is contained in:
Christian Byrne
2025-10-11 12:20:06 -07:00
committed by GitHub
parent a0c02dfca6
commit bb83b0107c
5 changed files with 42 additions and 24 deletions

View File

@@ -319,10 +319,9 @@ const { latestPreviewUrl, shouldShowPreviewImg } = useNodePreviewState(
)
const borderClass = computed(() => {
return (
(hasAnyError.value && 'border-error') ||
(executing.value && 'border-node-executing')
)
if (hasAnyError.value) return 'border-node-stroke-error'
if (executing.value) return 'border-node-stroke-executing'
return 'border-node-stroke'
})
const outlineClass = computed(() => {

View File

@@ -17,14 +17,17 @@ export const useNodeExecutionState = (
nodeLocatorIdMaybe: MaybeRefOrGetter<string | undefined>
) => {
const locatorId = computed(() => toValue(nodeLocatorIdMaybe) ?? '')
const { nodeLocationProgressStates } = storeToRefs(useExecutionStore())
const { nodeLocationProgressStates, isIdle } =
storeToRefs(useExecutionStore())
const progressState = computed(() => {
const id = locatorId.value
return id ? nodeLocationProgressStates.value[id] : undefined
})
const executing = computed(() => progressState.value?.state === 'running')
const executing = computed(
() => !isIdle.value && progressState.value?.state === 'running'
)
const progress = computed(() => {
const state = progressState.value