Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore "Continue On" support in core #141293

Closed
joyceerhl opened this issue Jan 24, 2022 · 6 comments
Closed

Explore "Continue On" support in core #141293

joyceerhl opened this issue Jan 24, 2022 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan virtual-workspaces Issues related to Virtual Workspace

Comments

@joyceerhl
Copy link
Collaborator

The GitHub Repositories extension exposes a 'Continue On' entrypoint via its package.json schema. This allows extensions to register ways to continue working with a virtual workspace, such as workspaces provided by the GitHub Repositories extension, in a different environment. For example:

"contributes": {
	"virtualWorkspaces": {
		"menus": {
			"continueOn": [
				{
					"command": "remoteHub.clone",
					"group": "0_local@1",
					"when": "!isWeb && remoteHub:hasVirtualFolders"
				},
				{
					"command": "remoteHub.openInCodespaces",
					"when": "remoteHub:virtualFolderProviders =~ /\\bgithub\\b/",
					"group": "1_codespaces@1"
				}
			]
		}
	},

This issue tracks exploring of moving the continueOn menu contribution point into core.

@joyceerhl joyceerhl added feature-request Request for new features or functionality virtual-workspaces Issues related to Virtual Workspace labels Jan 24, 2022
@joyceerhl joyceerhl self-assigned this Jan 24, 2022
@joyceerhl joyceerhl added this to the February 2022 milestone Jan 24, 2022
@joyceerhl joyceerhl modified the milestones: February 2022, March 2022 Feb 25, 2022
@joyceerhl joyceerhl modified the milestones: March 2022, April 2022 Mar 24, 2022
@joyceerhl joyceerhl modified the milestones: April 2022, May 2022 Apr 26, 2022
@joyceerhl
Copy link
Collaborator Author

joyceerhl commented May 4, 2022

  • For an initial prototype we will focus only on transferring uncommitted changes, since this yields the highest value for users. The work for this looks like:
    • Define data format for passing file contents and changes from extensions to core
      • Initially we will only deal with text editors but eventually we would need to support custom editors as well
      • Untitled files and hot exit files should also be transferred
      • Must be able to reconcile file paths e.g. if the source file contents are coming from a different filesystem provider than the destination where they are being applied
    • Define a workspace identifier which can be used to lookup and retrieve an edit session
      • UUID -> json blob
      • Remote git origin
    • Implement mechanism for extension to provide edit session context to core
      • Investigate whether the SCM API already exposes working changes
    • Implement minimal storage service--will meet with Daniel re: extending the settings sync service for our needs here
    • Implement mechanism for storing and fetching edit session context in core
      • For a bare bones prototype this could be an explicit gesture like a command to trigger a POST, and another command to trigger a GET
    • Implement mechanism for applying edit session context in core (we do not want to have to involve extensions in this if possible, since that happens too late in the lifecycle)
  • Beyond the proof of concept here is a nonexhaustive list of things we will want to tackle:
    • Passing the edit session ID as a query parameter
    • Handling the edit session ID in the workbench (desktop) or embedder (web)
    • Making the UI readonly while an edit session is being applied
    • Surfacing the new "continue edit session" and "list edit sessions" functionality in the UI
    • Adopting the contribution point across extensions
      • @SiddhanthUnnithan mentioned wanting to be able to Continue On from a local folder in vscode.dev to the same instance in VS Code desktop
    • Dealing with workspaces being in an inconsistent state (e.g. being several refs behind)

@joyceerhl
Copy link
Collaborator Author

joyceerhl commented Jun 1, 2022

Current status: have a proof of concept in a dev branch. Will work on getting this into main behind an experimental flag in June.

@joyceerhl
Copy link
Collaborator Author

Current status:

  • You can store and resume edit sessions across VS Code clients (e.g. from vscode.dev to desktop) or devices (e.g. from your laptop to your desktop) by setting workbench.experimental.editSessions.enabled and then using the Store Current Edit Session and Apply Latest Edit Session commands.
  • You will be prompted to sign in using either GitHub or Microsoft authentication when you first store or resume an edit session on a new device. Make sure to use the same credentials across your devices. You can always sign out later from the accounts menu.
  • Work to automatically store and resume edit sessions when switching from one device to another is in progress. You can already try out a desktop -> web flow by opening a virtual Azure Repos or GitHub repository on desktop, then using the Remote Repositories > Continue Working On > Open on the Web command to open the same repo and your edits in vscode.dev. You will require the latest pre-release of Remote Repositories, latest VS Code Insiders, and workbench.experimental.editSessions.enabled to try this flow out. GIF:
desktop-to-web.mp4

@fisher-m
Copy link

fisher-m commented Jul 7, 2022

Is it possible to use the new "edit sessions" feature on a network with out access to the Internet? For instance, could you self host the syncing service?

@joyceerhl
Copy link
Collaborator Author

@fisher-m that's currently not possible. Please file a feature request if you would like to see this supported, I'd also like to learn more about the use case for this scenario. Thank you!

@joyceerhl
Copy link
Collaborator Author

joyceerhl commented Sep 4, 2022

We have an experimental implementation of Continue On in core as of 1.71: https://code.visualstudio.com/updates/v1_71#_bring-your-changes-with-you-when-moving-across-development-environments. Closing this issue in favor of #160047.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan virtual-workspaces Issues related to Virtual Workspace
Projects
None yet
Development

No branches or pull requests

2 participants