Preheat your oven to 400 degrees F.
Pat the chicken thighs dry with a paper towel, then season on both sides with salt and pepper.
Melt butter in large braiser or sauté pan over medium high heat. Sear the chicken thighs until they are nice and golden brown, 3-4 minutes each side.
Remove the chicken thighs from the pan and add the mushrooms. Add more fat if needed, and cook them until they're turning brown and losing moisture.
Add the diced onions and sauté until the onions gain a golden brown color, then stir in the garlic, red pepper flakes, and thyme for a minute.
Whisk in flour and cook for 2 minutes, then whisk in the chicken broth, white wine, and cream.
Add the chicken back to the pan, add the gnocchi, and put it in the oven for 15-20 minutes.
Once the chicken is fully cooked, bring the pan out of the oven, mix in the parmesan cheese and spinach, let it wilt down for a couple of minutes.
Serve nice and hot.