Two things have been going on here:
First, the feed thing is HUGE. We have a name for it when thin horses completely change as they get fit and fat. We say "They can't stand prosperity!" They do not get nasty as much as their 'true' disposition comes out. They become the horse they were in the first place -- frequently why they became unwanted and were 'thrown away' to begin with. This is not always true, but it fits an awful lot of the time.
Second -- this.
She started putting pressure on you a long time before last week. You just did not 'read' her interactions correctly or soon enough. I guarantee that she stepped into your space and you backed up or 'gave ground' to her at some time. Probably, several times in the last 5 months, she took advantage or she put pressure on you and you obligingly stepped back and gave ground to her. While it did not tell you anything at the time, it told her that she was above you on the pecking order. Little subtle interactions and changes in body language told her everything she needed to know. She thought she had the 'green light' to push you completely out of her space and control you. Now, you are finally stepping up and doing something about it.
Horses just don't have very many surprises up their sleeves. People just take too long to recognize many of them.
As far as being affectionate -- most horses are just tolerant of people petting on them, to a point, especially when it comes to hugging and petting around on their faces. Some are more tolerant than others, but they are just NOT an affectionate species like cats and dogs are. Most horses like petting and scratching a lot better when it is confined to the shoulders and withers. These are the places they cannot reach easily themselves and these are the places that they chose to mutually groom each other.
If I have ever, but EVER seen a post that needed to be stapled to every horse to be given to every owner and them forced to learn it verbatim...this is it.
I will also add, that dragging out anything with a horse that is of an age to learn what it needs to, to being handled or ridden, is a mistake in itself much of the time. It simply does not take months to get a horse lunging, handled, grooming/tacking, or being ridden. And the longer a human drags it out, usually the more problems they are going to have.
And you also should lose the notion that this horse will continue to test you, as if you are handling it right, your first HCTJM should set her straight. Respect or an obedient horse does not have to be retaught every day, unless you aren't doing it right.