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

Bug: Can't copy and paste repos into a new workspace #3599

Open
BekahHW opened this issue Jun 20, 2024 · 7 comments
Open

Bug: Can't copy and paste repos into a new workspace #3599

BekahHW opened this issue Jun 20, 2024 · 7 comments
Labels
🐛 bug Something isn't working core team work Work that the OpenSauced core team takes on workspaces

Comments

@BekahHW
Copy link
Member

BekahHW commented Jun 20, 2024

Describe the bug

I want to copy and paste a list to create a new workspace, but nothing happens when I try to paste or type in the input box.

image

Steps to reproduce

  1. Create a new workspace
  2. Select Import Repositories
  3. Try to paste in open-sauced/app
  4. Nothing happens.

Notes

  • I was able to import on beta, however, when I tried to Create the workspace, it said there was an error.
@BekahHW BekahHW added 🐛 bug Something isn't working 👀 needs triage labels Jun 20, 2024
Copy link

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please comment on this issue.

For full info on how to contribute, please check out our contributors guide.

@nickytonline
Copy link
Member

If you open the network tab in the devtools, is there a particular error the API is returning?

@BekahHW
Copy link
Member Author

BekahHW commented Jun 20, 2024

@nickytonline no errors. You can do it with no problem?

@nickytonline
Copy link
Member

Yep, it works fine. No problem in production.

@brandonroberts
Copy link
Contributor

What keys in your Local Storage for app.opensauced.pizza? If there is a key for bulk-add-repos, delete it, refresh the page, and try again

@BekahHW
Copy link
Member Author

BekahHW commented Jun 21, 2024

@brandonroberts there is not.

@nickytonline
Copy link
Member

nickytonline commented Jun 29, 2024

I just came across this issue while adding a repository to my Nick's Swift Picks workspace.

I figured out what the problem is. We hit a localStorage max for the browser.

When this issue mentioned by @BekahHW occurs, you'll notice there is no bulk-add-repos key created in local storage. Since this isn't created, anytime we try to paste or type, nothing happens because the text area is a controlled input relying on the useLocalStorage hook.

const [pastedInput, setPastedInput] = useLocalStorage("bulk-add-repos", "");

The useSWR hook caches a lot, so we could look into seeing if we can lower how much of loclaStorage it consumes. Aside from that, I would suggest a wrapper hook around useLocalStorage so that in the event it can't write to local storage, we can default to useState instead.

For @bdougie if you're ever giving demos, until this is fixed, simply delete one of the SWR local storage key/values, e.g. app-cache-magenta or app-cache-* where * is a part of the key we rotate occasionally.

It also might be worth programmatically deleting the previous app-cache-* since it's no longer used and would potentially take up a considerable amount of space. Something like this that would run in _app.tsx, e.g.

const PREVIOUS_APP_CACHE_KEY = "app-cache-magenta";

if (PREVIOUS_APP_CACHE_KEY in localStorage) {
	localStorage.removeItem(PREVIOUS_APP_CACHE_KEY);
}

@nickytonline nickytonline added core team work Work that the OpenSauced core team takes on and removed 👀 needs triage labels Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working core team work Work that the OpenSauced core team takes on workspaces
Projects
None yet
Development

No branches or pull requests

3 participants