She was presumably claiming a resulting and/or constructive trust, which is notoriously difficult to win.
Ideally, you should always demand some share of a property, as soon as you contribute anything significant, whether to upkeep, extensions or to pay off a mortgage etc.
In reality, people don’t because it’s tricky to arrange while the property has a mortgage on it - you’d have to get permission from the mortgage lender, get reassessed, they may insist both of you are on the mortgage. Eugh! A headache and expensive.
If you’re not going that route, as a minimum, think about it carefully and write down what you’ve agreed