posit-dev / posit-dev/positron

Counter for new files behaves differently for different file types

Open
#2,889 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Open a new R script: Untitled-1. Don't save.
  2. Open a new Python script: Untitled-2. The R script from Step 1 goes away. I think it shouldn't. Don't save.
  3. Open a new Quarto document: Untitled-3. The Python script from Step 2 goes away. I think it shouldn't. Don't save.
  4. Open a new Jupyter notebook: Untitled-1.ipynb. Counter resets! And the extension ipynb is visible in the editor. I think this is expected/good behaviour. Don't save.
  5. Open a new R script: Untitled-4. Counter resuming from Step 3.
  6. Open a new Python script: Untitled-5. And Untitled-4 is gone. Save this script.
  7. Open a new Quarto document: Untitled-6.
  8. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.