Transfer the cod to a medium saucepan, add the onion and bay leaf, cover with fresh water by 2 inches, and bring to a gentle simmer over medium-low heat. Cook the salt cod until it flakes easily when poked with a fork, 10 to 12 minutes. Using a slotted spoon, transfer the cod to a plate, leaving the onion and bay leaf in the pan, and set aside until the fish is cool enough to handle.
Bring the water the salt cod was simmered in to a boil, drop in the potato, and cook until tender, about 10 minutes. Drain in a colander. Toss the bay leaf, keep the onion.
Dump the potato and onion into a bowl and mash them well. If the onion refuses to submit, really have at it, cutting it with a knife, if needed.
Remove any skin, bones, and miscellaneous bits and bobs from the cooled cod, then shred it. My grandmother vovó Costa used to dump the cod on one half of a tea towel, fold over the other half, and massage it, rubbing the towel back and forth with the heel of her hand until it left nothing but little clouds of finely shredded fish. The food processor does the same thing in 10 seconds. Sorry, vovó. Stir the cod shreds, garlic, and parsley into the potato mixture. Season with salt and pepper to taste. It's not a bad idea to over-season a bit here, as the batter will tame the flavor some. Set aside.