codesandbox / codesandbox/codesandbox-client
Editing own Next.js sandbox files when not signed in modifies original and creates a fork
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
🐛 bug report
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project
adheres to. - I have searched the issue tracker for an issue that matches the one I want
to file, without success.
Description of the problem
Editing a file of your own Next.js sandbox while not signed in and saving the file prompts you to sign in and fork the sandbox. Signing in forks it and redirects you to the fork. Going to the original sandbox show an unsaved change in that file that contains your change prior to forking.
How has this issue affected you? What are you trying to accomplish?
Modifying the package.json of my sandbox without noticing that I'm signed out.
To Reproduce
- Sign out
- Visit a Next.js sandbox that you own
- Change something
- Try to save
- Click the "Sign in" button when prompted to fork
- You'll be redirected to a forked sandbox. Visit the original one
- See the file changed (not saved when I tried with package.json, but saved when tried with a normal file)
Link to sandbox: N/A (optional)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | Website |
| Browser | Brave/1.38.111 Chromium: 101.0.4951.54 (Official Build) (x86_64) |
| Operating System | macOS Monterey/12.3.1 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the reproduction steps with an owned Next.js sandbox while signed out, then trace the save, sign-in, and fork flow. Pay particular attention to the package.json case and a normal file, and verify that saving does not alter the original sandbox before the fork; confirm the resulting fork still receives the intended change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100