posit-dev / posit-dev/positron
Counter for new files behaves differently for different file types
Open
Nobody has claimed this yet.
area: core
bug
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
Positron Version:
Steps to reproduce the issue:
- Open a new R script:
Untitled-1. Don't save. - Open a new Python script:
Untitled-2. The R script from Step 1 goes away. I think it shouldn't. Don't save. - Open a new Quarto document:
Untitled-3. The Python script from Step 2 goes away. I think it shouldn't. Don't save. - Open a new Jupyter notebook:
Untitled-1.ipynb. Counter resets! And the extensionipynbis visible in the editor. I think this is expected/good behaviour. Don't save. - Open a new R script:
Untitled-4. Counter resuming from Step 3. - Open a new Python script:
Untitled-5. AndUntitled-4is gone. Save this script. - Open a new Quarto document:
Untitled-6. - Open a new Jupyter notebook:
Untitled-2.ipynb. This is expected and nice.
https://github.com/posit-dev/positron/assets/5965649/244a715b-604b-443d-b4fc-3e05e750da3c
What did you expect to happen?
I expected:
- Counter to continue for the same file types
- New files not getting rid of previously created new files
- Behaviour is good if I put any content in the file, even without saving, but I think it should be the same for no content new files as well
- The extension (.R, .py, etc.) to be shown for all files
Were there any error messages in the output or Developer Tools console?
None
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
Reproduce the sequence in Positron, covering unsaved empty R, Python, Quarto, and Jupyter files, and observe how names, extensions, and counters change. Trace the editor's new-file handling from that behavior; done means counters continue per file type, empty files remain open, and extensions are shown consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python, typescript
- Domain
- desktop, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100