-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Roam editor state per repo and branch #179898
Comments
State that I would love to see transferred (nonexhaustive list):
|
From discussion with @bpasero today:
|
I spent time looking at existing usages of the storage service, and there are additional suggestions and learnings:
|
@joyceerhl I have two more considerations to share: Participation Session state vs. Workspace state
|
You have to keep in mind that you cannot assume that you can always participate in the In other words: yes, we could enhance
Good catch, that is not possible anymore for when data roams and so maybe Git should revisit that approach. Ideally maybe they could use a workspace identifier that applies in all machines and environments. |
This makes sense, for working changes we already have scenarios where we need to ask the user for confirmation, e.g. if a file was changed locally and there are also incoming changes for that file, we cannot simply overwrite the local copy.
Yes, this is actually what we already do by polling the server, because sometimes we do not have a reliable Continue On trigger (e.g. the Continue On flow from web to desktop git clone involves two local windows, and we do not want to apply the state in the first intermediate window). I'll also note my goal has always been to get to a point where state syncs continuously, but since I'm not there yet owing to perf concerns, Continue On is a convenient trigger to perform a store (similar to the |
Yeah, I tried this and agree it's not so nice. Maybe then we expose the uri resolver elsewhere, e.g. an event property: export interface IWorkspaceStorageValueChangeEvent {
readonly scope: StorageScope.WORKSPACE;
readonly key: string;
readonly target: StorageTarget.USER | undefined;
/**
* A utility for translating absolute URIs from another
* workspace into URIs for the current workspace if the
* workspaces share a common workspace identity.
* @param uri An absolute resource URI referenced in the
* storage value that changed.
* @returns A transformed resource URI that applies to
* the current workspace, or the original URI if no
* transformation was possible.
*/
readonly uriResolver?: (uri: URI) => URI;
} I think this would also involve modifying
|
Notes from today's discussion:
|
Notes from today's discussion: Initial E2E prototype
Later
|
We now have support for Unfortunately while trying to adopt this combination for breakpoints, I discovered that breakpoints rely on a non-standard
This looks like a serialized URI, so hopefully debug can just change how it stores breakpoint data in the storage service so that the external property is recognized as a URI. In the meantime I will look for another initial adopter. |
Closing this issue as we now support the |
@joyceerhl Some early feedback, I use the |
Today with Cloud Changes we support roaming uncommitted changes for the same repo and branch across instances of VS Code. This smooths the transition from github.dev to a GitHub codespace and other Continue On transitions from the remote indicator, and also enables working on two clones of the same repo on two different machines.
To further streamline these transitions, we'd like to roam additional editor state like open editors and notebook controller affinity. I've started a prototype of roaming open editors in #179507. Briefly, this works by allowing workbench parts and contributions to register handlers for storing and resuming state in an edit session payload, with access to a
uriHandler
that knows how to convert URIs backed by the same version control state across filesystems. Further details are in the PR. Once this model passes initial adoption from open editors and notebooks, it can be adopted by additional workbench contributions and parts in future.Related issues:
The text was updated successfully, but these errors were encountered: