In a large Dutch oven or heavy pot, heat the olive oil over medium heat. Add the thinly sliced onions, sugar, salt, and pepper. Cook, stirring occasionally, for 25-30 minutes until the onions are deeply caramelized and golden brown.
Pour the white wine into the pot with the caramelized onions, scraping the bottom to loosen any browned bits. Let the wine simmer for 2-3 minutes until it has mostly evaporated.
Add the chicken broth, chicken breasts, bay leaf, and thyme to the pot. Bring the soup to a boil, then reduce the heat to low, cover, and simmer gently for 20 minutes, or until the chicken is cooked through and easily shreds with a fork.
While the soup simmers, preheat your oven's broiler. Place the French bread slices on a baking sheet and toast under the broiler for 1-2 minutes per side until golden and crisp.
Remove the cooked chicken breasts from the soup and shred them using two forks. Return the shredded chicken to the pot and discard the bay leaf. Taste the soup and adjust seasoning with more salt and pepper if needed.
Ladle the hot soup into four oven-safe bowls placed on a baking sheet. Top each bowl with a slice of toasted French bread and sprinkle generously with the shredded Gruyère cheese.
Carefully place the baking sheet with the bowls under the broiler for 2-4 minutes, watching closely, until the cheese is completely melted, bubbly, and lightly browned in spots. Serve immediately.