-
Notifications
You must be signed in to change notification settings - Fork 756
feat: ai flow chat prompt and UX improvements #5942
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
feat: ai flow chat prompt and UX improvements #5942
Conversation
Deploying windmill with
|
Latest commit: |
2408c92
|
Status: | ✅ Deploy successful! |
Preview URL: | https://191115f0.windmill.pages.dev |
Branch Preview URL: | https://hc-ai-flow-chat-prompt-and-u.windmill.pages.dev |
…t-and-ux-improvements
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.
Caution
Changes requested ❌
Reviewed everything up to b00c55d in 2 minutes and 37 seconds. Click for details.
- Reviewed
2197
lines of code in26
files - Skipped
0
files when reviewing. - Skipped posting
8
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/FlowGraphV2.svelte:478
- Draft comment:
The attribute--background-color={false}
appears in the component properties (line 479). This is unexpected since CSS custom properties typically expect a color value, not a boolean. Please verify if this was intended or remove it if it’s a leftover. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. frontend/src/lib/components/VirtualItem.svelte:57
- Draft comment:
The derived value for the AI module action is determined using the component's label (line 57). Using a label may result in collisions if it isn’t a unique identifier. Consider using a dedicated unique ID (for example, a stored module ID) for fetching the AI action. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. frontend/src/lib/components/propertyPicker/PropPicker.svelte:46
- Draft comment:
The reactive assignment$: $pickablePropertiesFiltered = pickableProperties
directly sets a derived store from props. Directly assigning to a derived store can lead to unexpected update behavior. Consider refactoring this logic so that the derived store is computed frompickableProperties
without direct reassignment. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte:79
- Draft comment:
The functioninsertNewModuleAtIndex
usespush(history, flowStore.val)
to save the current state to history (line 79). Be cautious that pushing the entire flow state on every insertion might lead to performance or memory issues in very large flows. Consider limiting the history size or performing a differential save if feasible. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. frontend/src/lib/components/copilot/chat/flow/core.ts:463
- Draft comment:
Typo: The variable name 'setFlowInputsSchemaSchema' seems redundant. Should it be 'setFlowInputsSchema'? Please verify and correct if necessary. - Reason this comment was not posted:
Comment was on unchanged code.
6. frontend/src/lib/components/flows/map/FlowErrorHandlerItem.svelte:53
- Draft comment:
Typographical note: The svelte-ignore directive here uses underscores (a11y_click_events_have_key_events
). Typically, these directives use hyphens (e.g.,a11y-click-events-have-key-events
). Please confirm if the change is intentional. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This appears to be a deliberate change from hyphens to underscores in the svelte-ignore directives. Since this is a Svelte-specific syntax, we should be very confident about whether this is actually an issue before keeping the comment. Without knowing the Svelte compiler's requirements or preferences for these directives, we can't be certain this is actually a problem. The code likely still works with either syntax. I might be underestimating the importance of consistent directive syntax across the codebase. There could be linting rules or team conventions I'm not aware of. However, per the review rules, we should not keep comments unless we have strong evidence they are correct. This seems more like a style preference question than a clear issue. Delete this comment as it's speculative and we don't have strong evidence that the underscore syntax is actually incorrect.
7. frontend/src/lib/components/flows/map/FlowErrorHandlerItem.svelte:54
- Draft comment:
Typographical note: The svelte-ignore directive here uses underscores (a11y_no_static_element_interactions
). Typically, these directives use hyphens (e.g.,a11y-no-static-element-interactions
). Please confirm if this change was intentional. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This is a change in the diff, but it's not clear if this is actually an issue. The comment is speculative, asking to "confirm if this change was intentional" rather than definitively stating it's wrong. Without knowing Svelte's official standards or if this would cause any actual problems, we shouldn't make assumptions. I might be missing official Svelte documentation that specifies the correct format. The change could potentially break something. Even if there is a preferred format, this is likely something that would be caught by linting if it was actually problematic. The comment is asking for confirmation rather than stating a definitive issue. Delete this comment as it's speculative and asks for confirmation rather than pointing out a definitive issue. If this was problematic, it would likely be caught by build tools.
8. frontend/src/lib/components/flows/map/VirtualItem.svelte:77
- Draft comment:
The class attribute on line 77 appears to be incomplete and possibly contains a typo. It currently reads: 'class="flex flex-row gap-1 justify-between {center'. It looks like there might be missing closing braces or additional text to properly finish the interpolation. Please verify and fix the intended class string. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_XPLRW9RbgbSw3nCr
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
/ai review the PR please |
Claude finished @rubenfiszel's task —— View job PR Code Review for AI Flow Chat Enhancements ✅Completed comprehensive review of the PR for code quality, bugs, security issues, and best practices. Todo List
Review SummaryThis PR introduces significant improvements to the AI flow chat functionality with better change management, diff visualization, and user experience. I've identified several issues that should be addressed: ✅ Positive Aspects
|
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
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.
Important
Looks good to me! 👍
Reviewed 4af307c in 49 seconds. Click for details.
- Reviewed
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/flow/core.ts:683
- Draft comment:
Typo fix: Inserted missing 'set' to clarify the instruction ('should set the property type'). - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative, pointing out a typo fix. It doesn't provide a suggestion or ask for clarification on the code itself. It doesn't align with the rules for useful comments.
Workflow ID: wflow_uwYk3irieEZyWRUX
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Important
Looks good to me! 👍
Reviewed dc84154 in 1 minute and 33 seconds. Click for details.
- Reviewed
59
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
3
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/flow/FlowAIChat.svelte:237
- Draft comment:
Added the 'summary' property to inlineScript. Ensure that step.summary is always defined and validated upstream since it's now required. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the author to ensure that a property is defined and validated upstream. This falls under the rule of not asking the author to ensure behavior is intended or tested. The comment does not provide a specific suggestion or point out a specific issue with the code.
2. frontend/src/lib/components/copilot/chat/flow/core.ts:83
- Draft comment:
Updated the summary description to specify ‘3-5 words’. Consider enforcing a maximum length if appropriate. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte:102
- Draft comment:
Changed destructuring to include 'summary' from inlineScript and pass it to createInlineScriptModule. Verify that inlineScript always provides a valid summary. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify that inlineScript always provides a valid summary. This falls under the rule of not asking the author to ensure behavior is intended or to double-check things. Therefore, this comment should be removed.
Workflow ID: wflow_v9UgCdg3bvQjrsjR
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
dc84154
to
2dc8099
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.
Caution
Changes requested ❌
Reviewed 2dc8099 in 1 minute and 44 seconds. Click for details.
- Reviewed
149
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/FlowPreviewContent.svelte:281
- Draft comment:
Good improvement: the additional check using aiChatManager.flowAiChatHelpers ensures that removed modules don’t trigger a restart. Consider extracting the condition into a well‐named variable for clarity. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. frontend/src/lib/components/flows/header/FlowPreviewButtons.svelte:55
- Draft comment:
The derived store 'upToDisabled' now also checks if getModuleAction(selectedId) returns 'removed'. This guards against performing up-to tests on removed modules. The pattern is consistent, though consider adding inline comments if not obvious to future maintainers. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_n0q8FNM47CNKdWqp
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
<div | ||
class={twMerge('flex flex-col w-full', deletable && action === 'removed' ? 'opacity-50' : '')} | ||
> | ||
{deletable} |
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.
The modification now conditions the opacity style on 'deletable && action === "removed"'. However, the literal {deletable} is output inside the div, which may unintentionally render a boolean value. Likely a leftover debugging statement.
{deletable} |
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.
Important
Looks good to me! 👍
Reviewed fbb3ac1 in 2 minutes and 36 seconds. Click for details.
- Reviewed
304
lines of code in9
files - Skipped
0
files when reviewing. - Skipped posting
5
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/utils.ts:711
- Draft comment:
Possible typo in the pluralize function: the template literal for the customPlural branch has an extra '}' which might cause an incorrect output. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. frontend/src/lib/utils.ts:465
- Draft comment:
The else clause in removeKeysWithEmptyValues is redundant. The arrow function uses ': {}' which has no effect. Consider removing it for clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. frontend/src/lib/components/ModuleTest.svelte:110
- Draft comment:
Avoid using the non-null assertion (!) on testModulesState[modId]. Ensure proper initialization to prevent runtime errors if the state is undefined. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The code uses the nullish coalescing operator to ensure testModulesState[modId] exists with default values. The non-null assertion is actually safe here because we just initialized the object. The suggestion to remove it doesn't add any safety since we know the object exists. The original code is actually fine. Could there be a race condition where testModulesState[modId] becomes null between lines 110 and 112? Could there be other code modifying this state? No race condition is possible here because this is all synchronous code within a single onMount callback. The assignment and access happen atomically. The comment should be deleted because the non-null assertion is actually safe here - we just initialized the object with default values one line above.
4. frontend/src/lib/components/ResourcePicker.svelte:47
- Draft comment:
Consider removing or disabling debug console.log statements before production; they may clutter output. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. frontend/src/lib/components/apps/editor/settingsPanel/DecisionTreeGraphEditor.svelte:102
- Draft comment:
The debounced function 'debouncedNodes' is used to update renderCount and refresh nodes. Consider renaming it to better reflect its purpose (e.g. 'debounceRenderUpdate') for improved code clarity. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The current name 'debouncedNodes' is somewhat descriptive as it relates to debouncing node updates. While 'debounceRenderUpdate' might be marginally more descriptive, the benefit is minimal. The function is simple, local in scope, and its purpose is clear from the implementation. This feels like a nitpick that doesn't meaningfully improve code quality. The suggested name might be technically more accurate since it updates both nodes and renderCount. The current name only captures part of what the function does. While technically true, the current name is sufficient for its context and the change would provide minimal value. The function is small and its purpose is clear from its implementation. Delete this comment as it suggests a minor rename that doesn't meaningfully improve code clarity or maintainability.
Workflow ID: wflow_p7C3AlsidU6Mv8nD
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Important
Looks good to me! 👍
Reviewed 2408c92 in 41 seconds. Click for details.
- Reviewed
27
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/Editor.svelte:1522
- Draft comment:
Good cleanup: disposing aiChatEditorHandler with optional chaining. Verify that 'clear()' is the intended method for resource cleanup. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. frontend/src/lib/components/InputTransformForm.svelte:338
- Draft comment:
Optional chaining (arg?.value and arg?.expr) protects against undefined arg. This reactive statement now safely tracks changes. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_G49kPggCZykXrGpt
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Important
Enhances AI flow chat prompts and user experience with new components, improved flow management, and refined AI interaction handling.
AIChangesWarningModal.svelte
for warning users about pending AI changes.ModuleAcceptReject.svelte
for accepting or rejecting AI module actions.AIChatManager.svelte.ts
to handle AI chat interactions more effectively, including new methods for managing AI changes.FlowBuilder.svelte
to handle AI changes with new warning and confirmation logic.FlowModuleSchemaMap.svelte
and related components to support AI-driven module actions.FlowPreviewButtons.svelte
to disable actions when AI changes are pending.PropPicker.svelte
andVirtualItem.svelte
to integrate AI module action indicators.FlowGraphV2.svelte
to better visualize flow changes and AI interactions.utils.ts
to include a debouncing utility for improved performance.This description was created by
for 2408c92. You can customize this summary. It will automatically update as commits are pushed.