Heat oven to 400° F. Heat 2 tablespoons of the oil in a large skillet over medium-high heat. Add the mushrooms, carrots, celery, onion, thyme, ½ teaspoon salt, and ¼ teaspoon pepper. Cook, stirring occasionally, until the vegetables are tender, 12 to 15 minutes. Add the flour and cook, stirring, for 30 seconds. Add the broth and peas; bring to a boil.
Transfer the mushroom mixture into an 8-inch square baking dish. Lay the pastry on top and cut several vents in it. Place the baking dish on a rimmed baking sheet and bake until the crust is golden, 25 to 30 minutes. Let rest 15 minutes before serving.
Meanwhile, in a large bowl, toss the romaine with the almonds, vinegar, the remaining 2 tablespoons of oil, and ¼ teaspoon each salt and pepper. Serve with the potpie.