The swelling will last quite a long while and only go away gradually. For months from now, your knee will still swell if you do too much activity for it. You certainly did too much in one day for your poor knee! Rest, ice and elevation will help, but it will take several days before your knee is back to what it was. In short, you joined the ODIC (the Over Did It Club). Most of us have done that and usually no long-term harm is done.
Actually, it stands to reason that when you're up and about your knee is going to swell more than when you're resting. The trick is not to do more activity than what causes slight and temporary swelling.
Your surgeon was happy.


That's the important thing to remember.
Don't worry about your therapist not being happy. PTs tend to get a bit obsessive about ROM (Range of Motion) numbers, because that's the way the insurance companies judge their performance. Because of that, it sometimes seems as if common sense flies out the window. They forget that swelling is going to impede your ROM and they push for fast progress.
It's only 5 weeks since your surgery and you're doing fine. This recovery is more like a marathon than a sprint. It takes a full year for you to achieve 100% recovery, although you will feel much better long before that.
There's no need to rush to achieve ROM. There's no "window of opportunity". In fact, ROM can continue to improve for a year, or even longer, after a TKR.
Oh yes, the "miracle babes" who go back to work early! There are a few (very few) who genuinely have a fast recovery, but they are the exception. Most people find that, if they do go back to work early, they suffer increased pain and swelling.
Just yesterday, I read someone's comment, thus: "Went back to work at 3 weeks. Still paying for it now, at 4 months."
It's better to let your knee take its time than to try and rush it. Of course, some people just can't afford to stay home for the optimum time, and I feel very sad for them.
I have a friend who went back to work one week after a TKR, and he boasts about it. What he doesn't say is that he went in a wheelchair, he only did about 3 hours a day, his wife drove him to and from work, and did everything else for him. He went from his bed to the shower, dressed, and then went to his wheelchair and work. When he came home, he went straight back to bed, took his pain pills and rested for another 20 hours. He doesn't tell anyone all that, but just talks about how he went back to work a week after major surgery.