So going right back to your original post, is this picture just as you found it before you did any work?
More information please, may we assume there were 2 red wires and 2 black wires in the empty terminals arrowed which are now in a junction box?
View attachment 400062
In you new junction box you quote
Which you now know is the fan cable
What happened to the other cable between the ceiling rose and the switch (what type of switch is it - wall or ceiling?)? That is the black wire (in a cable with a red wire) that was in the terminal with the yellow wire. THIS COULD BE AN IMPORTANT FIRST QUESTION TO ANSWER.
You haven't answered why the red/black cables have turned into brown/blue. More details please
However you also say the yellow as a switched live, under what circumstances?
That's lots of questions and we need information to assist you but may not need all of it, please answer little definite information at a time . More pictures if there is anything left to picture may help.