The best advice I can give for anybody that faces problems while developing a custom action state in FlexBE is to begin copying the code from the example_action_state.py, which is created by default in src when you run the create_repo command. That was a very helpful thing the author Philipp Schillinger did for us, users.
That said, if you compare with your code, you will notice that the "comments" are placed wrong - the inputs, outputs, and outcomes should come after the class definition (class TurnState(EventState):). The app somehow uses this metadata for creating the boxes there.
Another thing that must be consistent is this "comments" and your class constructor. Note that in your constructor you have the outcomes done and failed but have written just <= done above. Another thing that can lead to unexpected results is indentation: remember this is Python... make sure you do not mix tabs with spaces.