It's a shitty move, but ultimately, in between the bullshit narrative, they also did the thing - not you - so the promotion rightfully belongs to them.
Execution trumps ideas, impact trumps raw effort, and such. Isn't this the entrepreneurial narrative?
Sure thats obviously how it works today.
Now what do I do next time someone comes and asks how to do something?