When the host saves a file, it triggers code actions on the guest which never complete
This was mentioned in https://github.com/MicrosoftDocs/live-share/issues/3504, but that's been tagged as a feature request and asks about having settings to enable/disable. However, I think this is a more serious bug.
If the host Saves a Dart file, I see this in the guest:

It never finishes. I'm not sure whether the command is really running on the client, or if the hosts notification is just being sent over to the guest, but either case this seems like a bug:
- If the action is really running on the guest, I don't think it should - the host saved and any actions are being run there
- If the action is not being run on the guest and it's just the notification being send to the client, it should correctly disappear when the action finishes
Thanks for the issue. This is bizarre!
AFAIK, Live Share doesn't do any remoting of notifications, so I don't think that's what's going on here..
Maybe when the save gets remoted to the guest, the guest fires the code action as if it was the guest that performed the save (I don't know if we're actually distinguishing between a host and a guest save today).. Should be easy enough to figure out what's going on with it under the debugger. @aletsdelarosa could you take a look?
Maybe when the save gets remoted to the guest, the guest fires the code action as if it was the guest that performed the save
I'm not familiar with how you're sending the save over, but the code action is set up in editor.codeActionsOnSave so if you're making VS Code think the file was saved, that's probably why it's firing. Who should fix that though, I'm not sure. It's possible in the extension we could detect when the saved file is not a local file, but fixing it in every extension seems like a drag - it'd be better if VS Code just didn't fire those code actions for "remote saves".
Ah! That's likely what's happening.
Live Share already creates a workspace settings file for the guest in a session that overrides some VS Code settings. What do you think about having it also override the editor.codeActionsOnSave setting to not include any code actions, as they would always be run on the host in response to a save?
What do you think about having it also override the
editor.codeActionsOnSavesetting to not include any code actions, as they would always be run on the host in response to a save?
On the surface that sounds pretty reasonable to me :-) I didn't realise you were already overriding some settings, so it also doesn't seem like a weird thing to do here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically in 2 days.
Thank you for filing the issue. We're unable to prioritize a fix for this currently, but we will re-evaluate in the next quarter.