State machine visualization