01 - Preheat oven to 400°F. Line a rimmed baking sheet with parchment paper.
02 - Melt butter with olive oil in a large skillet over medium-low heat. Add sliced onions, salt, and sugar. Cook, stirring frequently, for 25–30 minutes until onions are deep golden brown and caramelized. Stir in thyme and black pepper during the final 5 minutes of cooking.
03 - Unroll thawed puff pastry and cut into 6 equal rectangles. Transfer to prepared baking sheet. Using a sharp knife, score a 1/2-inch border around each rectangle, taking care not to cut completely through the dough.
04 - Brush the scored edges of each pastry rectangle with beaten egg.
05 - Distribute caramelized onions evenly within the scored borders of each pastry rectangle. Top generously with crumbled goat cheese.
06 - Bake for 15–18 minutes until pastry is puffed, golden brown, and crisp, with cheese melted and slightly bubbly.
07 - Remove from oven and sprinkle with fresh chives or parsley if using. Serve warm or at room temperature.