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

don't duplicate persistent share links when importing #9219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jwunderl
Copy link
Member

When loading a persistent share link, check if we already have the header for it, and if so load it. Here's a build:

https://arcade.makecode.com/app/1542f0098ae8cd9614e77e373590f0623ff8129d-57379544fb

@eanders-ms question, when you first login to a browser do we sync all the headers? I tried to check if this would have trouble immediately following logging in or cache being cleared, but the project I was testing always ended up being loaded while the page reloaded so I couldn't test if there was a case where loading old projects could run into an issue or anything of the sort.

@eanders-ms
Copy link
Contributor

@jwunderl yes, when a user logs in we sync all cloud headers. It's asynchronous, of course, so there might be a bit of a race condition in the scenario where:

  • headers aren't synced
  • the user clicks "remix" from multiplayer
  • the editor loads before the headers are synced.

@abchatra
Copy link
Collaborator

Probably should wait for the headers to load then?

@abchatra abchatra closed this Nov 10, 2022
@abchatra abchatra reopened this Nov 10, 2022
@eanders-ms
Copy link
Contributor

@jwunderl we fixed this a different way, with the no-cache header, correct? Can we close this?

@jwunderl
Copy link
Member Author

jwunderl commented May 8, 2023

That fix was for a cahcing issue if you open the same persistent link multiple times; this pr would make it so that when you import a persistent share link, if you were the one who originally authored the project / created the link, it opens the existing project instead of cloning the project (so e.g. opening the link as the author, making a change, and resharing updates the link instead of forking the project)

I believe we had a user report being surprised that it created a copy rather than 'continuing' their project from the latest version as it was labelled persistent. That said, we might consider this as a similar case to #9499 and think of it as an intentional copy / suggest the user search for the existing project if they want to update the link. We could also put up a 'continue or copy?' modal but I feel like we've been avoiding those

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

Successfully merging this pull request may close these issues.

3 participants