Cheesy Chicken Melt With Onion Relish

4 teaspoons vegetable oil
2 boneless, skinless chicken breasts, about 1 pound (450g), sliced lengthwise into 4 flat 1/2-inch-thick pieces
1 teaspoon kosher salt
1/2 yellow onion, sliced
1 teaspoon distilled white vinegar
1/2 red onion, thinly sliced
1/2 bunch scallions, white and green parts, thinly sliced
2 tablespoons fried shallots
3 tablespoons salted butter
4 slices rye bread
4 slices good melting cheese, such as Colby Jack or Muenster

Heat a large sauté pan with 2 teaspoons of the vegetable oil over high heat until it is smoking. Season the chicken with 3/4 teaspoon of the salt and gently place it in the pan. Cook on one side until almost cooked all the way through, about 5 minutes. Flip the chicken and cook on the other side for about 30 seconds, or until it is no longer pink. Transfer the chicken to a plate to rest.
Immediately add the yellow onion and the remaining 2 teaspoons vegetable oil to the pan. Stir and cook for 5 minutes, or until the onion is dark and smells amazing but is not burnt. If it’s getting too dark, lower the heat. Add the vinegar, along with the liquid that has collected on the plate where the chicken is resting, and turn the heat to low. Simmer the onion for 2 to 4 minutes, or until the liquid has evaporated. Transfer the onion to a bowl, using a rubber spatula to scrape the pan out completely. When the onion has cooled down a little, about 5 minutes, add the red onion, scallions, fried shallots, and remaining 1/4 teaspoon salt and stir to combine.
Melt 2 tablespoons of the butter in the same pan. Lay out two slices of bread on your work surface and place a slice of cheese on each. Top each piece of cheese with half of the onions, two pieces of chicken, and another slice of cheese, and cover with another slice of bread. Place the sandwiches in the pan with the melted butter. Cook over medium heat, about 3 minutes, until the cheese on the bottom slice is melted and the bread is nicely toasted. Add the remaining 1 tablespoon butter to the pan and flip the sandwiches. Cook them for another 1 to 2 minutes, until the cheese is melted and the bottom is toasty. Remove the sandwiches from the pan, cut them in half, and insert a frilly toothpick or cocktail sword near the top in each half and serve.