Start by heating olive oil and butter in a large skillet over medium heat. Add the sliced onions and salt, then cook slowly, stirring often. I let them soften and turn golden brown, which takes patience but builds incredible flavor.
Once the onions are deeply caramelized, stir in the minced garlic and fresh thyme. Cook for about a minute until fragrant. This step enhances the aroma and adds depth without overpowering the onions.
Pour in the beef broth and scrape up any browned bits from the bottom of the skillet. These bits are packed with flavor and enrich the sauce. Let the broth simmer gently for a few minutes.
Add the gnocchi directly into the skillet, stirring to coat them in the onion mixture. Let them cook uncovered, absorbing the broth and becoming tender. Stir occasionally to prevent sticking.
Sprinkle the grated Gruyère evenly over the gnocchi. Cover the skillet briefly so the cheese melts completely. Finish with black pepper and a few extra thyme leaves if you like.