-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Feat/web workflow improvements #27981
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/web workflow improvements #27981
Conversation
…anggenius#27802) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Add `default` field to VariableEntity model to support default values - Pass default value in WorkflowToolProviderController parameter mapping - Clear default value when corresponding option is removed from select - Fix state cleanup issue when deleting select options - Initialize inputs with default values in debug chat and prompt panel - Only apply defaults when input fields are empty or undefined
- Add related_id extraction in list operator file handler - Support related_id in file filtering conditions - Enable related_id in file ordering operations - Add comparison operators for related_id in if-else node
- Add key prop to ValueContent to force re-render on variable change - Prevent clear action in read-only mode for variable inspect trigger
Use type-id combination instead of title as Command.Item value to ensure uniqueness and avoid conflicts when different items share the same title.
…lasses - Import RiDraggable icon from remixicon - Add draggable icon that appears on hover for better UX - Adjust padding when hovering to accommodate the drag handle - Improve visual feedback during drag interactions
- Replace multiple conditional blocks with nested ternary operators - Improve code readability and reduce lines of code - Maintain the same rendering priority: loading > failed > exception > success - No functional changes to the component behavior
- Add filter to exclude variables with hide=true from rendering - Prevent hidden configuration variables from being displayed in the form - Improve user experience by showing only relevant input fields
- Use actual icon when icon_type is "image" - Use robot emoji fallback only for non-image icon types - Fix reversed condition in icon assignment
- Update upload file name when document is renamed - Maintain consistency between document and upload file names - Only update when data_source_info contains upload_file_id
- Import checkKeys utility to validate variable names - Filter out invalid keys before checking prompt variables - Improve variable validation logic to prevent invalid variable references
- Add srcs array parameter to AudioPlayer and VideoPlayer components - Maintain backward compatibility with existing src prop - Refactor gallery components to use single player with multiple sources - Fix progress bar click handling in VideoPlayer (distinguish click from drag) - Improve layout with proper spacing instead of <br/> tags - Add null/empty source filtering for robustness - Render <source> elements for better browser compatibility
- Use optional chaining to safely access currentNodeVar.var property - Prevent runtime errors when currentNodeVar exists but var is undefined - Improve defensive programming in variable inspect component - Fix three conditional checks to validate var property existence
- Add html-entities package to decode HTML entities in placeholder text - Use decode() function to properly display special characters - Prevent display of raw HTML entities like <, >, " in placeholder - Fix user experience when bot name contains special characters
Summary of ChangesHello @Xiu-Lan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a comprehensive set of improvements to the web workflow, focusing on enhancing user experience, fixing critical bugs, and refining backend functionalities. The changes span across various modules, from input variable handling and media playback to plugin management and workflow editor UI, ensuring a more robust and intuitive application. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces several web workflow improvements, including bug fixes and new features. Key changes involve adding default value support for user input variables, implementing a related_id field for file operations, and fixing issues related to app icon logic, duplicate command items, hidden prompt variables, and null safety checks. The changes also enhance media players to support multiple sources and add a visual drag handle for question classifiers. Overall, the changes improve the robustness, functionality, and user experience of the web application.
|
Hi! I'm I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
|
Please fix the CI as well. |
4e000c7 to
7d4432f
Compare
Simplify the dictionary formatting in UploadFile name update operation by condensing the multi-line update dictionary into a single line. - Change: Convert 3-line update dict to 1-line format - Impact: Code readability improvement, no functional change
|
/gemini review |
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.
Code Review
This pull request introduces a variety of features and bug fixes across the web application and API, significantly improving the web workflow experience. Key features include support for default values in user input variables, the ability to handle multiple media sources in audio/video players, and synchronization of document renames with uploaded files. Numerous bugs have also been addressed, such as fixing duplicate values in the 'goto-anything' command palette, preventing hidden variables from appearing where they shouldn't, and resolving UI behavior issues in the variable inspection panel.
The code changes are generally well-implemented and contribute to a more robust and user-friendly platform. I have one major point of feedback regarding a potential performance issue in two of the new frontend components, which could lead to infinite render loops. Addressing this will ensure the stability of the new features.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
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.
Code Review
This pull request introduces a substantial set of improvements and bug fixes across the web and API components. Key features include support for default values in user input variables, multiple sources for media players, and synchronization of document renames. The bug fixes address issues with UI components, variable handling, and data logic, enhancing the overall stability and user experience. The code changes are generally well-implemented. My review includes one suggestion to refactor duplicated logic into a custom hook to improve code maintainability.
web/app/components/app/configuration/prompt-value-panel/index.tsx
Outdated
Show resolved
Hide resolved
…nput.tsx" This reverts commit c93e690.
…l/index.tsx" This reverts commit ca26b48.
- Remove duplicate `default` field definition in VariableEntity class - Change `default` type from restricted Union to Any to support all variable types (bool, dict, list, etc.) - Enhance CHECKBOX validation to support flexible value conversions: * String values: "true"/"false", "1"/"0", "yes"/"no", "on"/"off" * Numeric values: 1 → True, 0 → False - Fix test failure in test_validate_inputs_with_default_value - Ensure Pydantic doesn't coerce bool to int during validation This resolves the issue where bool default values were being converted to int (True → 1, False → 0) due to overly restrictive type annotation.
Co-authored-by: crazywoola <[email protected]> Co-authored-by: johnny0120 <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Wood <[email protected]>
Co-authored-by: crazywoola <[email protected]> Co-authored-by: johnny0120 <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Wood <[email protected]>
Issues Index
e30c5fab396ff6eb11ba47ee0899ab6258fb33e8b771e7b00459e4ca4e14b52b22981308a65d592bf280cc8e0815ed9e2a87697f34e8a7b3260adIssue Categories
Bugs Fixed (7)
Features Implemented (5)
Refactorings (1)
Statistics
Affected Components
Frontend (Web)
Backend (API)
Workflow System