Don't worry about the long tops..if there is ample moisture in ground the crop is not effected..actually opposite...you'll be having bumper crop..so take your watering cans out and give them good drink, and when you think you've got fins growing from the amount of water you've used..do another round..you'll be suprised how much water potatoes use.
As for onion..if the tops break off from the neck..thats it..they might make some more growth..but I would dig what ever is there up and use them first.
Well done you...there you see ...you can grow veg..next year you are already that bit of wiser and you can do it all again with hopefully even better results.. ;)