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(ui): crash when using notes nodes or missing node/field templates #6412

Merged
merged 5 commits into from
May 21, 2024

Conversation

psychedelicious
Copy link
Collaborator

Summary

Notes nodes used some overly-strict redux selectors. The selectors are now more chill. Also fixed an issue where you couldn't edit a notes node title.

Found another class of error related to the overly strict reducers that caused errors when loading a workflow that had missing templates. Fixed this with fallback wrapper component, works like an error boundary when a template isn't found.

Related Issues / Discussions

https://discord.com/channels/1020123559063990373/1149506274971631688/1242256425527545949

QA Instructions

  • Add a notes node to a workflow. Edit the notes title.
  • Load a workflow that has nodes that aren't installed. Should get a fallback UI for each missing node.
  • Load a workflow that references a node with different inputs than are in the template - like an old version of a node. Should get a fallback field warning for both missing templates, or missing inputs.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

Some asserts were bubbling up in places where they shouldn't have, causing errors when a node has a field without a matching template, or vice-versa.

To resolve this without sacrificing the runtime safety provided by asserts, a `InvocationFieldCheck` component now wraps all field components. This component renders a fallback when a field doesn't exist, so the inner components can safely use the asserts.
@github-actions github-actions bot added the frontend PRs that change frontend files label May 21, 2024
@github-actions github-actions bot added the python PRs that change python files label May 21, 2024
@blessedcoolant blessedcoolant merged commit aa0c59b into main May 21, 2024
14 checks passed
@blessedcoolant blessedcoolant deleted the psyche/fix/ui/notes-node-error branch May 21, 2024 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files python PRs that change python files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants