Kim Aylott, aka Bushell, punched the victim in the pool room at the Hornblower Tavern in Old Market Place, then smashed a pint glass over his head, York Crown Court heard.
The victim, who was named in court, suffered a 1cm cut to his head but did not need hospital treatment.
Aylott, 32, from Ripon, was arrested and charged with assault occasioning actual bodily harm. She admitted the offence and appeared for sentence on Thursday.
Prosecutor Jessica Randell said the glass attack happened at tea-time on February 4, when people were “minding their own business and enjoying their evening”.
Defence barrister Brooke Morrison said Aylott and her ex-partner had been playing pool and “chatting quite amicably” before getting into an argument about money and her new relationship with another man, whereupon Aylott became “frustrated” and punched the victim in the face, before striking him with the pint glass.
Aylott, was “extremely apologetic” for the attack. She and the victim had been in a turbulent, six-year relationship which ended in 2018.
The former waitress was now on benefits and dependent on alcohol, added Ms Morrison. She also had long-standing mental health and drug problems and was taking medication for depression.
Ms Morrison said that Aylott - who currently lives at a hostel, had sought help from a substance-abuse charity and was looking for new work after gaining an NVQ in retail.
She said an immediate prison sentence would be “severely detrimental” to (Aylott’s) mental health” and instead urged the judge to impose a community punishment so her client could get the help she needed to turn her life around and continue her recent sobriety.
Recorder Andrew Haslam QC told Aylott: “Your problems are linked in part to excessive alcohol consumption and linked, no doubt, to an addiction to drugs.”
However, he cited reports from Aylott’s doctor and housing-support officer which “speak highly of you”.
He said he had also noted how Aylott had self-referred herself to the Horizons drug-and-alcohol support group.
“Substantial mitigation has saved you from immediate prison,” added Mr Haslam.
For the offence of ABH, Aylott was given a two-year community order with a four-month doorstep curfew and 30-day rehabilitation programme designed to address her alcohol-and-drug misuse, mental-health issues and violent behaviour.
For breaching the suspended sentence, she was fined £100 and ordered to pay £150 costs, as well as an £85 victim surcharge.