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

Fix recent workspace tracking for devcontainer workspaces #14925

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

sgraband
Copy link
Contributor

What it does

Ensure devcontainer workspaces are correctly added to recentWorkspaces.
Previously, incorrect URI handling caused invalid workspace entries.
Now, the workspace path is passed instead of the full URI.
Also the setMostRecentlyUsedWorkspace is now called with the correct workspace.
Renamed the ContainerConnectionOptions.workspaceUri to workspacePath for consistency.

How to test

  1. Open a devcontainer from a workspace
  2. Notice that is has been added to the recentWorkspaces
  3. Open some other workspaces
  4. Open the same devcontainer again
  5. Observe that it is being opened and now at the top of the recentWorkspaces again

(Same steps for reproducing the issue on current master, except there the entry is not moved to the top and another weird entry is added)

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

Ensure devcontainer workspaces are correctly added to recentWorkspaces.
Previously, incorrect URI handling caused invalid workspace entries.
Now, the workspace path is passed instead of the full URI.
Also the setMostRecentlyUsedWorkspace is now called with the correct workspace.
Renamed the ContainerConnectionOptions.workspaceUri to workspacePath for consistency.

Signed-off-by: Simon Graband <[email protected]>
@sgraband sgraband requested a review from jonah-iden February 14, 2025 13:34
Copy link
Contributor

@jonah-iden jonah-iden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't even know this was broken. Thanks alot for the fix. Seems to work fine.

There is only still the issue for me that opening a recent workspace creates a new container instead of reusing the existing one. I thought this was working once but i think that has nothing to do with these changes

@sgraband
Copy link
Contributor Author

Thank you for the fast review! Do we have a ticket for the issue you have metioned?

@jonah-iden
Copy link
Contributor

i don't think so

@sgraband sgraband merged commit 7d2ddd7 into master Feb 17, 2025
10 of 11 checks passed
@github-actions github-actions bot added this to the 1.59.0 milestone Feb 17, 2025
@sgraband
Copy link
Contributor Author

Can you reproduce this everytime? For me this sometimes works and sometimes does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants