Repository navigation
Fix issues surrounding persisted workspaces. - #18
Conversation
c149443 to
f97ca76
Compare
jsjoeio
left a comment
There was a problem hiding this comment.
woohoo! 🎉 (thanks for letting me pair on this and see how you figured it out!)
| const folder = toWorkspaceFolder(recent.folderUri); | ||
| workspace.folders = [folder]; | ||
|
|
||
| window.history.replaceState(null, '', `?folder=${encodePath(folder.uri.path)}`); |
There was a problem hiding this comment.
❓ Does this mean that if you open localhost:8080 (without passing a folder via the CLI), it will check for a recent folder and then append that as a query param to the URL?
(followup: what's the reason for doing this? Is this so the open folder is always in the URL or something else)
There was a problem hiding this comment.
Correct. This ensures the user gets a URL which matches the format generated by VS Code when they explicitly open a new folder. It also lets them share a link to a specific folder which is especially useful now that this state is stored in the browser.
- Moved URI helper.
f97ca76 to
5b733b1
Compare
jsjoeio
left a comment
There was a problem hiding this comment.
Woohoo!
👏 Thanks for leaving detailed comments like this and explaining the why behind our changes.
This PR addresses coder/code-server#4487, specifically extending VS Code’s existing desktop workspace behaviors to the browser. This may also address
—ignore-last-openedby making the new tab behavior match the user’s initial path arguments.https://github.com/cdr/vscode/blob/c1494438479e8382794576f2c621081d52b4fdc1/src/vs/workbench/browser/web.main.ts#L223-L243