I'm going to pick on Sadiq Khan here, but the point applies generally. A bit of brouhaha blew up after Khan appeared with Cameron on Remain platform. Cameron here is the man who lead the charge in what everyone, even the Tories, admit was a racist campaign. McDonnell, not unreasonably given what happened in Scotland, pointed out that sharing a platform with the Tories was unhelpful, a similar point that noted Corbhynite and hard-left extremist Hilary Benn has also made. The storm being whipped by this is is probably due less to the actual content of McDonnell's comments and more due to the Guardian having one it's periodic fits where it realizes it hasn't run an article in a whole week about how intensely divided Labour is, having focused too much on the Conservatives have a massive fight, and have grabbed the nearest issue to hand.
Now Khan is entirely free to make his own decisions here. He's evidently judged that appearing on the platform will help the Remain campaign to victory and has seen that as a goal that's worth getting even if he has to appear on a platform with an unpleasant extremist. I would differ in that I don't think this will help the Remain campaign and I don't think it will help Khan or Labour.
Indeed the only person it helps is Cameron. What this does is mean that he and his party will suffer no consequences from having run a truly appalling campaign, that could be fairly summed up as 'if you want an Imam for a mayor vote Labour'.  Recall that Michael Fallon dismissed the Tory campaign as just being the "rough and tumble of politics", which effectively becomes the party line. To try and dismiss such a campaign along those lines is startling. But the fact that Cameron hasn't been told to fuck off when it came to campaigning does allow it to be seen it that light. It treats at as just something that politicians do in campaigning and no hard-feelings. Which isn't right; there should be consequences for doing that and one of those consequences should be not being able to get stardust from the man of the moment. Like I said there's no benefit to Labour or Khan in doing this; the only one who benefits is Cameron from being able to pretend that that whole campaign was just rough and tumble politics rather than the nasty, deliberate hysterics that it was.
That Cameron is a shameless individual, who would cowardly hide behind parliamentary privilege to libel a member of the public, is no surprise. But that point would have been emphasized more with a cool 'get stuffed'. The potential unintended consequence is treating as a 'that's just politics' matter means that it will be much easier for the Tories to slip into running such a campaign again, as they obviously will , and also much harder for their opponents to claim that this is a disgraceful thing to be doing.
 A play on this infamous campaign.
 Once it was clear that Goldsmith would lose I think it was fairly obvious that the campaign was just being used a testing ground for these tactics. Expect them to be deployed at the next general election, if not a variant of them against Rosena Allin-Khan in the Tooting by-election.