Put a large pan of salted water on to boil. Peel the onion and finely chop it. Peel the garlic cloves and crush or finely grate them. Halve the chilli, flicking out the seeds and white pith for less heat, and finely chop the chilli.
Pour 1 tbsp oil into a large pan and bring to a medium-high heat. Carefully add the chicken and sprinkle in a pinch of salt and pepper. Fry for 3-4 mins, turning halfway, till golden brown on the outside. Scoop out of the pan onto a plate. Set aside.
Pour an extra 1 tbsp oil into the pan if needed, and reduce the temperature to medium. Slide in the chopped onion. Cook, stirring, for 4-5 mins till softened. Stir in the garlic and chilli and cook for a further min.
Pour the chopped tomatoes into the pan and add 1 tsp of the caster sugar. Return the chicken to the pan and stir well to combine. Bring to the boil, then reduce to a simmer. Partly cover the pan with a lid and cook for 12-15 mins, till slightly thickened.
Meanwhile, check the pan of water. When it's boiling, add the pasta. Cook for 8 mins, till tender with a slight bite.
While the pasta and sauce cook, pour the vinegar into a small bowl and whisk in 1 tbsp oil and a pinch of salt and pepper to form a dressing.
When the pasta is cooked, use tongs to pick it up out of the pan and transfer it to the chicken and tomato sauce (no tongs? Quickly drain the spaghetti through a colander or sieve and add to the sauce. It's better if the pasta is a little wet). Stir together till every strand is coated in sauce. Add 2-3 tbsp of the hot pasta water to the tomato sauce for a looser sauce.
Toss the dressing and the salad leaves together. Pile the spaghetti and sauce on warm plates and serve with the salad on the side.