I am writing this as I eat lunch at work.
Before work this morning, I took another look at the star system generator and found out where the negative masses were coming from. Smaller, lighter planets that are nonetheless heavy enough to attract hydrogen and helium tend to lose those gases over time. To allow for this, there was a calculation of mass lost due to gas loss over the life of the planet. Alas, this loss was being calculated without respect to the fact that there was only a finite amount of gas to lose. As a result, mass of gas loss was being calculated as exceeding the total mass of the gas present. Oops. There were no more negative mass planets after that.
Also, I added the feature for generating a star system with a habitable planet. No changes were made to the simulation core, but instead when this feature is used the GUI code just keeps generating systems until one with a habitable planet is found. This sometimes means it takes up to fifteen seconds to generate an acceptable star system, but it beats repeatedly hitting the New menu item tens of times until a suitable system emerges.
Some interesting systems do get generated. While most habitable worlds belong to type F and G stars, one will sometimes appear for other types of stars, or as a moon of a gas giant or other type of planet. I've had multiple habitable worlds appear very rarely, and once there was a habitable world whose moon was marginally habitable, as well.
So what will I work on this evening? Probably the moons, calculation of atmospheric compositions, and the export feature. If I'm feeling very ambitious, I may start code cleanup. This thing is looking closer to completion. It should generate all the data I should need as inputs to a planet generator.
For now, I should get back to finishing my lunch.