I have thought a lot about the possibility of a less racist USA for my own TL and, for what it's worth, I came to the following conclusions:
- The good guys have to 'win' Reconstruction; and
- The constitution has to be replaced.
Obviously, just saying that is not terribly helpful by itself. I've only touched upon the US in the background of my TL but these are the general outlines:
- The Civil War drags on which (combined with an even more polarised antebellum period) leads to Northern opinion being more radicalised.
- The war doesn't finish until 1869, by which point Confederate resistance is basically just brutal guerrilla fighting combined with Sherman going full-Sherman on the whole South.
- Lincoln isn't assassinated and wins a third term in 1868 before declining to seek a fourth one.
- Following his resignation, Lincoln then pulls a full De Gaulle and returns to the Senate in 1878, promulgating a new constitution in 1880 and serving two more terms as president after that.
- The new constitution allows for a much more centralised, directorial American state which can impose multi-racial rule in the South, among a whole bunch of other things. I guess by this point the world's your oyster as regards changes.
Anyway, those steps are just how i did it. And I did it in a very general way. So, obviously, feel free to tell me I'm full of shit.
FWIW I don't think it's true that it was inevitable that Reconstruction could fail, I just think you have to try and construct a slightly different model of nationhood. Obviously that's not a simple thing to do (hence Lincoln returning and the new constitution) but I think it's at least theoretically doable. As I said, I've left the details a bit vague because I'm not sure what they'd have to have been but if you're aiming for something like this in your TL I'd absolutely fascinated to see the results.
As for the Empire evolving into the Commonwealth, I think the easiest way of doing this would be to have Joseph Chamberlain leading the Liberal party and not defecting to the Tories. The obvious POD in this context would be finding a way for him to support Irish Home Rule in the 1880s, perhaps leading to a federal UK and progressing on to a federal Empire over the following 50 years or so...
Britain not intervening in WWI is fairly easy to do, I think. There are lots of plausible TLs on this site which have managed it. For my money, I think having Haldane as Foreign Secretary from 1905 might by the simplest way to do the trick.
I also don't think that keeping the US and the UK friendly in this TL should be much of a problem. If nothing else, if you're going to have the Empire evolving into a federation, by the 1930s Canada should be influential enough that its leaders will absolutely stop any policy that looks like leading to a militarisation of the border. From there onwards, I think you're looking at Germany or France as the enemy in Europe (depending on the end to your WWI) and China or Japan being the enemy in the Pacific.
Anyway, I'm rambling on. Let me know how this goes because I think you might be on to something really interesting. There are way too many CSA-wins TLs on this forum and not enough civil-rights-wins.