I'm going to repeat what Skeezks said, birds have to hide illness in the wild. Our feathered friends in our homes do the same. It's a survival trait. Please be gentle with yourself. Your being with Dolly at the end let her know she was loved.
side note - it is not unusual for there to be a burst of energy before something passes. Dolly was not suffering. It's a common occurrence.
Sorry, what I'm saying isn't coming out well. I'm sorry for your loss.