I am an undergraduate senior studying computer science and engineering continuing to work in deep learning and Artificial Intelligence.
I had been working on some datasets from June 2021. My supervisor could not give me time and did not reply to my calls, or texts over the medium he had instructed us to use. One day, he told us to share the research findings and materials with one of my lab mates. This meant that he'll collaborate with us on the work and he gained access to the data on what does and doesn't work well. He tweaked our work and approached our supervisor to publish it. Our supervisor also told us to implement some ideas. But that lab mate intervened saying he had implemented it. I don't know what their conversation was, but that lab mate told us that they would work separately from now on and submit after we've submitted our work somewhere. In the meanwhile, our undergraduate semester finals started, and we all took a break with the supervisor's permission. Sadly, that lab mate submitted that work to a journal without giving us any heads up and with the approval of our supervisor within the exams.
I feel betrayed and insulted because they did not give me authorship or acknowledgment that they got ideas from my experimental findings of 6+ months to quickly generate the manuscript. What do I do now? Where should I go with my work because they already have almost perfect performance on the same datasets? I am really depressed and demotivated to continue any work. Please help. Was this ethical?