Conversation
kresimir-coko
requested changes
Feb 17, 2026
Collaborator
kresimir-coko
left a comment
There was a problem hiding this comment.
Evo jedan relativno bitan komentar od mog Claude-a (koji ja ne bi uvatija)
1. resolvePath can throw on invalid paths (Medium)
canInsertMentionForProperty calls resolvePath(parameters, resolvedPath), which throws on invalid paths (the object-resolve-path library throws on invalid paths). In the old code this would also bubble up unhandled, but in the new handleDrop code path this could silently break drop behavior. Consider wrapping in a try/catch:
export const canInsertMentionForProperty = (
propertyType: string,
parameters: Record<string, unknown>,
path: string
): boolean => {
if (propertyType === 'STRING') {
return true;
}
try {
const resolvedPath = transformPathForObjectAccess(encodePath(path));
const existingValue = resolvePath(parameters, resolvedPath);
return !existingValue || String(existingValue).startsWith('=');
} catch {
return true;
}
};
client/src/pages/platform/workflow-editor/utils/encodingUtils.ts
Outdated
Show resolved
Hide resolved
...tor/components/properties/components/property-mentions-input/PropertyMentionsInputEditor.tsx
Outdated
Show resolved
Hide resolved
client/src/pages/platform/workflow-editor/components/datapills/DataPill.tsx
Show resolved
Hide resolved
...ow-editor/components/properties/components/property-mentions-input/PropertyMentionsInput.tsx
Outdated
Show resolved
Hide resolved
…ghost, clean up drop highlight
|
| }; | ||
|
|
||
| const target = event.currentTarget; | ||
| const clone = target.cloneNode(true) as HTMLDivElement; |
Collaborator
There was a problem hiding this comment.
Zanima me, zašto nam triba ovaj clone? Je li možda draggable dovoljan? Prvi put vidin, i čini se okej ali bi volija da i ja i ti znamo zašto nam je cloneNode potreban
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fixes: #2920
Enable dragging data pills from the Data Pill Panel and dropping them into
PropertyMentionsInputeditors to insert mention nodes at the drop position. Extract shared validation logic intocanInsertMentionForPropertyutility to eliminate duplication between click and drop insertion paths.Add visual drop-target feedback (green highlight) on property inputs during drag using
isDraggingDataPillstate in Zustand storeExtract shared validation logic (
canInsertMentionForProperty) intoencodingUtils.tsto eliminate duplication between click-to-insert and drop-to-insert code pathsdynamic value has to be enabled for drag & drop to work
Screencast.from.2026-02-16.16-43-47.webm