Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Bug in stately.ai/viz #244

Open
IgnusG opened this issue Aug 31, 2021 · 3 comments
Open

Bug in stately.ai/viz #244

IgnusG opened this issue Aug 31, 2021 · 3 comments

Comments

@IgnusG
Copy link

IgnusG commented Aug 31, 2021

First of all a disclaimer

Really sorry if this is the wrong repository. I cannot find any reference to bug tracking or other contact information on the stately.ai website so I followed it here through links. I feel like it's a closed-source continuation/sister of this project?

If this is the wrong project I'd be grateful if you could point me to the right repository or similar and apologies for the noise on this issue board 😅

The issue

Rendering problem with the following state machine:

State machine code
createMachine({
  id: "loginProcess",
  initial: "welcome",
  states: {
    welcome: {
      on: {
        LOGIN: { target: "login" },
        REGISTER: { target: "register" },
      },
    },
    login: {
      initial: "normal",
      states: {
        normal: {
          on: {
            LOGIN_INCORRECT: { target: "incorrectTry" },
          },
        },
        incorrectTry: {
          on: {
            LOGIN_INCORRECT: { target: "" },
          },
        },
        alreadyRegistered: {
          on: {
            LOGIN_INCORRECT: { target: "incorrectTry" },
          },
        },
      },
      after: {
        300e3: { target: "welcome" },
      },
      on: {
        LOGIN_SUCCESSFUL: { target: "loggedIn" },
        FORGOT_PASSWORD: { target: "forgotPassword" },
      },
    },
    forgotPassword: {
      type: "final",
    },
    register: {
      on: {
        ALREADY_REGISTERED: { target: "login.alreadyRegistered" },
        REGISTRATION_SUCCESSFUL: { target: "loggedIn" },
      },
    },
    loggedIn: {
      type: "final",
    },
  },
});

A wild arrow seems to appear not leading to the right block:

image

@IgnusG IgnusG changed the title Bug in stately.ai Bug in stately.ai/viz Aug 31, 2021
@davidkpiano
Copy link
Member

This is the right place, thanks for the report! That is indeed strange; we'll investigate 🔎

@JonasMa
Copy link

JonasMa commented Oct 22, 2021

Are there any updates on this?
I have the same issue withy my machine viz since I introduced substates.
I can't really figure out what the problem seems to be. I played around with the machine mentioned above and got two wrong arrows by changing the welcome state to welcome: { on: { LOGIN: { target: "login" }, REGISTER: { target: "forgotPassword" }, }, },
Any help is appreciated

@nirajhx
Copy link

nirajhx commented Jan 19, 2022

I am facing the same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants