-
Notifications
You must be signed in to change notification settings - Fork 648
feat (frontend): improve capture UI #5051
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
Conversation
Deploying windmill with
|
Latest commit: |
41ea843
|
Status: | ✅ Deploy successful! |
Preview URL: | https://e8bf32e9.windmill.pages.dev |
Branch Preview URL: | https://glm-captures-v3.windmill.pages.dev |
# Conflicts: # frontend/src/lib/components/ArgInput.svelte
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.
👍 Looks good to me! Reviewed everything up to c5e7b0b in 1 minute and 56 seconds
More details
- Looked at
2296
lines of code in14
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/lib/components/FirstStepInputs.svelte:30
- Draft comment:
Consider adding explicit handling for the case whereflowStore
or$flowStateStore
is undefined to avoid potential runtime errors. - Reason this comment was not posted:
Confidence changes required:50%
The code inFirstStepInputs.svelte
has a potential issue with theloadSchema
function. The function is called conditionally based on the presence offlowStore
and$flowStateStore
, but it does not handle the case where these are undefined. It would be better to handle this case explicitly to avoid potential runtime errors.
2. frontend/src/lib/components/flows/content/FlowInput.svelte:191
- Draft comment:
Consider adding explicit handling for the case wherepayload
is an empty object in theupdatePreviewSchemaAndArgs
function to avoid potential runtime errors. - Reason this comment was not posted:
Confidence changes required:50%
The code inFlowInput.svelte
has a potential issue with theupdatePreviewSchemaAndArgs
function. The function setspayloadData
andselectedSchema
to undefined whenpayload
is falsy, but it does not handle the case wherepayload
is an empty object. It would be better to handle this case explicitly to avoid potential runtime errors.
Workflow ID: wflow_QEDw8GaZPhw4CLCl
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on 1c940aa in 31 seconds
More details
- Looked at
33
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/flows/content/FlowInput.svelte:230
- Draft comment:
Consider usingstructuredClone
consistently or only when necessary. For example,savedPreviewArgs = structuredClone(previewArguments)
is used here but not when assigningpreviewArguments = savedPreviewArgs
. Ensure consistency and necessity of deep cloning. - Reason this comment was not posted:
Confidence changes required:50%
The use ofstructuredClone
is inconsistent and potentially unnecessary in some places.
Workflow ID: wflow_eTxvL8ofq3odA9UV
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on 7176d80 in 23 seconds
More details
- Looked at
12
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/ArgInput.svelte:748
- Draft comment:
TheschemaSkippedValues
prop is added but not explained in the PR description. Ensure its purpose and usage are clear and documented. - Reason this comment was not posted:
Confidence changes required:50%
The added propschemaSkippedValues
is used in two places, but its purpose is not clear from the PR description. It seems to be intended to skip certain schema values, but without further context, it's hard to determine if this is the correct implementation.
Workflow ID: wflow_FolVdjinDKamHwfH
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
❌ Changes requested. Incremental review on f114bef in 1 minute and 6 seconds
More details
- Looked at
33
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_Y7djKKLTzCcUGjjM
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
let compatible = false | ||
if (a.type === b.type) { | ||
if (a.type === 'object' && a.format === b.format) { | ||
if (a.oneOf && b.oneOf) { |
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 logic for checking oneOf
in isCompatibleObject
is redundant. The else
block is unnecessary since it sets compatible = true
regardless of the condition. Simplify the logic to avoid redundancy.
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.
👍 Looks good to me! Incremental review on 2acc21b in 1 minute and 9 seconds
More details
- Looked at
115
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. frontend/src/lib/components/EditableSchemaForm.svelte:539
- Draft comment:
UsingsetTimeout
with a fixed delay can lead to unpredictable behavior. Consider using a more reliable method to ensure the schema update is processed correctly. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The code uses setTimeout as a workaround, with a comment "No better solution than this, needs future rework". This suggests the developers are aware it's not ideal but haven't found a better solution yet. The comment points out a real issue but doesn't provide any concrete alternative solution. In Svelte, state updates and UI synchronization can be tricky, and sometimes setTimeout is used as a last resort.
The comment could be right that there are better solutions, like using Svelte's tick() function or reactive statements. But without understanding the exact race condition or timing issue being worked around, we can't be certain.
While the comment identifies a real code smell, it doesn't provide actionable guidance. The existing code comment already acknowledges this is a temporary solution needing rework.
Delete the comment. While it points out a legitimate concern, it's not actionable enough and the code already acknowledges the issue with a TODO comment.
2. frontend/src/lib/components/schema/schemaUtils.ts:31
- Draft comment:
The assumption thatoneOf
properties are always compatible may not be valid. Consider revisiting this logic to ensure accurate compatibility checks. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The code was actually improved to handle oneOf better than before, adding explicit compatibility checks. While the comment is technically correct that the assumption may not be valid, there's already a TODO acknowledging this limitation. The comment doesn't provide specific guidance on how to improve it.
The comment identifies a real potential issue, and the code does make an assumption about oneOf compatibility. The TODO suggests the team is already aware of this limitation.
While the concern is valid, the comment doesn't add value beyond the existing TODO comment. The code has already been improved to handle oneOf cases better than before.
Delete this comment since it doesn't provide actionable feedback beyond what's already acknowledged in the TODO comment.
3. frontend/src/lib/components/schema/schemaUtils.ts:19
- Draft comment:
isCompatibleObject
does not account for additional properties ina
orb
that might affect compatibility. Consider checking for these properties. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The function was significantly refactored to be more structured. While it's true that there could be other properties affecting compatibility, the current implementation seems intentionally focused on specific properties (type, format, oneOf) that matter for schema compatibility. The TODO comment on line 31 suggests this is a known limitation being handled incrementally. The comment is speculative without concrete examples of what properties matter.
I could be wrong about which properties matter for schema compatibility. There might be important schema properties I'm not considering.
Without specific examples of which additional properties matter for compatibility, and given the intentional TODO about handling oneOf compatibility, this comment is too vague to be actionable.
Delete the comment as it's speculative and doesn't provide concrete guidance on which additional properties need checking.
4. frontend/src/lib/components/schema/schemaUtils.ts:72
- Draft comment:
UsingJSON.stringify
for object comparison can be inefficient and may not handle all cases correctly. Consider using a deep comparison utility instead. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
While JSON.stringify can have edge cases with object key ordering and special values like undefined, in this context we're comparing schema objects that should be well-formed JSON. The comparison is just an optimization - if it fails, the code falls back to more detailed compatibility checks. The suggested change would add complexity without clear benefit.
The comment raises a valid technical point about JSON.stringify limitations. A deep comparison utility could handle edge cases better.
The current approach is simple and sufficient given the fallback logic and the well-defined schema object structure. The suggested change would add complexity without meaningful benefit in this specific use case.
Delete the comment. The current implementation is appropriate for this specific use case, and the suggested change would add unnecessary complexity.
Workflow ID: wflow_QYCU0mhlozWZ1TFg
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on 6765692 in 1 minute and 7 seconds
More details
- Looked at
3556
lines of code in38
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/RunFormAdvancedPopup.svelte:32
- Draft comment:
Consider refactoring the logic for loading worker groups into a reusable function or store action to avoid code duplication. This pattern is repeated in multiple files. - Reason this comment was not posted:
Confidence changes required:50%
The code in multiple files is fetching worker tags using the same logic. This is a clear case of code duplication, which can lead to maintenance issues. It would be better to refactor this into a reusable function or a store action.
Workflow ID: wflow_3D89IexuMzIvLI1W
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on f107344 in 24 seconds
More details
- Looked at
18
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/schema/EditableSchemaDrawer.svelte:158
- Draft comment:
Reassigningschema
to itself is unnecessary. Consider removingschema = schema;
as it doesn't change the state. - Reason this comment was not posted:
Confidence changes required:50%
The code uses a pattern where the schema is reassigned to itself, which is unnecessary and can be misleading. This pattern appears in multiple places.
Workflow ID: wflow_6HomwY6oNvwIy3CF
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on 80866db in 23 seconds
More details
- Looked at
17
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/schema/schemaUtils.ts:28
- Draft comment:
The added check for compatibility between 'number' and 'integer' types is a valid improvement. - Reason this comment was not posted:
Confidence changes required:0%
The added code inisCompatibleObject
correctly handles the compatibility between 'number' and 'integer' types, which is a valid improvement.
Workflow ID: wflow_vjxYZOHLV3heOoCU
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on 0282cf4 in 45 seconds
More details
- Looked at
48
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/flows/content/FlowInput.svelte:317
- Draft comment:
DuplicateresetArgs
function. Consider removing one of the definitions to avoid redundancy. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_o6PCP5jRO0MZGwRZ
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
👍 Looks good to me! Incremental review on 41ea843 in 29 seconds
More details
- Looked at
49
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/lib/components/schema/EditableSchemaDrawer.svelte:194
- Draft comment:
Consider ensuring that theschema
is consistently updated across all components usingbind:schema
to avoid potential synchronization issues. This applies to other instances ofbind:schema
in this file and inEditableSchemaWrapper.svelte
. - Reason this comment was not posted:
Confidence changes required:50%
The code in both files uses thebind:schema
directive multiple times. This can lead to potential issues if the schema is modified in one place and not updated in others. It would be better to ensure that the schema is consistently updated across all components.
Workflow ID: wflow_PJu5Kf6s1j6qVyxE
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Enhances frontend schema management and input handling with schema diff support, improved UI components, and better keyboard event handling.
ArgInput.svelte
,EditableSchemaForm.svelte
, andSchemaForm.svelte
to manage added, removed, and modified schema properties.SideBarTab.svelte
for improved navigation inFlowInput.svelte
.CaptureTable.svelte
andFlowPreviewContent.svelte
.SideBarTab.svelte
for dropdown navigation.EditableSchemaForm.svelte
andSchemaForm.svelte
to handle schema diffs and dispatch changes.SimpleEditor.svelte
to improve placeholder visibility.schemaUtils.ts
for computing and applying schema diffs.AddPropertyV2.svelte
andEditableSchemaDrawer.svelte
for better schema property management.FirstStepInputs.svelte
,HistoricInputs.svelte
, andSavedInputsPicker.svelte
to prevent default actions on Escape key.This description was created by
for 41ea843. It will automatically update as commits are pushed.