Skip to content
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

fix: Only show error state on components w/ errors for node validation #3968

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

mfortman11
Copy link
Collaborator

Example when a new template is built while fields are totally empty the whole flow is shown under the error state.
This doesn't help a user find the true issue.

Screenshot 2024-09-30 at 4 13 15 PM

Instead of using the existing validation object where every node in the run is include like below

[
    {
        "id": "ChatInput-YMDGB",
        "errors": []
    },
    {
        "id": "ParseData-7Ko68",
        "errors": []
    },
    {
        "id": "Prompt-8fpEU",
        "errors": []
    },
    {
        "id": "ChatOutput-FDN3P",
        "errors": []
    },
    {
        "id": "OpenAIEmbeddings-gUrsp",
        "errors": []
    },
    {
        "id": "OpenAIModel-wMnJl",
        "errors": []
    },
    {
        "id": "AstraDB-hk8MJ",
        "errors": [
            "Astra DB is missing Database.",
            "Astra DB is missing Collection Name.",
            "Astra DB is missing Astra DB Application Token."
        ]
    }
]

I now filter this to only include the nodes w/ errors

Screenshot 2024-09-30 at 4 12 29 PM

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Sep 30, 2024
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Sep 30, 2024
Copy link
Collaborator

@Yukiyukiyeah Yukiyukiyeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 1, 2024
@mfortman11 mfortman11 merged commit e63c377 into langflow-ai:main Oct 1, 2024
25 of 26 checks passed
@mfortman11 mfortman11 deleted the node-validation-states branch October 1, 2024 15:22
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
langflow-ai#3968)

* Only show error state on components w/ errors for node validation

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants