She must not have much trial experience if this is the first time a judge has ruled that her line of cross-examination was irrelevant.
The Judge is not supposed to comment on the reasons for evidentiary rulings in front of the jury. If a proper objection is made that a question is irrelevant, the proper ruling is “sustained” and nothing else. “I’m going to sustain that objection because this line of questioning is irrelevant,” even if quite true, is an improper comment, if the jury is present. In Texas anyway.
That being said, the proper response is to object to the comment, ask the Judge to instruct the jury to ignore the comment, and then ask for a mistrial, either on the grounds that the Judge refused to instruct the jury, or on the grounds that the Judge’s comment was so egregious the Defendant cannot get a fair trial from this jury. You don’t just jump straight to requesting a mistrial.
I don’t see a reversal in one comment about an evidentiary ruling. But His Honor should keep in mind that some criminal defendant’s best hope is the Judge, the prosecutor, or both, will do something really stupid. That lesson ought to be easy to remember in Cook County, home of the Chicago Seven trial.