Melt butter in a 5-quart Dutch oven over medium-high heat. Add mushrooms and salt and cook for 8 minutes, stirring occasionally, until their released liquid evaporates and some edges brown.
Add shallot and cook for 2 minutes, then garlic and thyme for 30 seconds.
Pour in broth and milk and bring to a gentle simmer. Add gnocchi, cover and cook over medium-low heat for 4 minutes.
Uncover, stir carefully and add spinach and pepper. Cook for 2 to 3 minutes until spinach wilts and gnocchi are tender throughout, adding reserved water only if the sauce becomes dry.
Remove from the heat and fold in Parmesan. Rest for 2 minutes and serve in 4 bowls while the sauce still flows between the gnocchi.