I'm going to get it repaired but would like to take steps to prevent / delay this from happening again.
According to this article the 'optimum' charge for a Li-ion battery is 40%-80%, but more generally the advice seems to be to avoid leaving your laptop permanently plugged in.
One approach could to be plug the laptop into the mains through a simple timer, which could cut the power from 00:00 - 12:00, so that each day from when I switch the laptop on at 09:00 to 12:00 the battery would drain and then be recharged.
Aside from any performance issues of the laptop running on battery v.s. mains power, are there any drawbacks to this approach, and could I reasonably expect an improvement in the lifespan of the battery? Any advice on timing schedules - I could set the timer weekly rather than daily, for example - also appreciated.