-
Notifications
You must be signed in to change notification settings - Fork 374
[fix] add InputSlot and dot error state #5813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🎭 Playwright Test Results❌ Some tests failed ⏰ Completed at: 09/28/2025, 12:01:22 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
const hasInputSlotError = (inputName: string): boolean => { | ||
const nodeValidationErrors = executionStore.lastNodeErrors?.[nodeData.id] | ||
if (!nodeValidationErrors?.errors) return false | ||
return nodeValidationErrors.errors.some( | ||
(err) => | ||
err.type === 'required_input_missing' && | ||
err.extra_info?.input_name === inputName | ||
) | ||
} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be something we could query a store for, if we set it up?
af441c7
to
eac6b80
Compare
49d8c21
to
5c21b1f
Compare
652d136
to
cf01d9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is much cleaner, yes.
return hasSlotError.value | ||
? 'ring-2 ring-error dark-theme:ring-error ring-offset-0 rounded-full' | ||
: '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: cn
handles boolean/undefined/string, so it's pretty common to do condition && 'class list'
which is simpler than a ternary with an empty string branch.
v-memo="[ | ||
nodeData.inputs?.length, | ||
nodeData.outputs?.length, | ||
executionStore.lastNodeErrors | ||
]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty rare that you actually need v-memo. Could you see if it's necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i actually removed it during debugging but put it back because i figured i'd get chastised for removing it :Joy:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove it, happy to follow on
const slotColor = computed(() => getSlotColor(props.slotData.type)) | ||
const slotColor = computed(() => { | ||
if (hasSlotError.value) { | ||
return 'var(--color-error)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this would do anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's how the dot turns red.
cf01d9f
to
79125a5
Compare
9bd814c
to
eb08928
Compare
Summary
Error states were not getting propagated down to the InputSlots from the API Repsonse
I created a provider and injected error state. It seemed like a way better idea than prop drilling or building a composable that only two nodes (
InputSlot
andOutputSlot
) would need.Changes
The follow are now error code red when an input node has errors:
This treatment was okay after feedback from design.
Screenshots - Error State
┆Issue is synchronized with this Notion page by Unito