posit-dev / posit-dev/positron

Loss of `df`'s data due to user's error and misleading prompt to 'create file'

Open
#9,783 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: data explorer bug
Dominant language
TypeScript
Stars
4.3k
Forks
183
Avg merge
1d 11h
Merged PRs (30d)
206

Description

System details:

Positron and OS details:
Positron Version: 2025.10.0 build 170
Code - OSS Version: 1.103.0
Commit: bfddb6998aca4c4e4a8b771f095b77cd1c31acd2
Date: 2025-10-01T07:12:05.818Z
Electron: 37.2.3
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin arm64 25.0.0
Session details:

Python 13.5.0

Describe the issue:

  • After user deletes .csv file, related data frame remains intact.
  • Then, if user attempts to open said data frame as 'plain text', user will be prompted to create a file from the data frame.
  • Upon creating file, generated 'plain text' file will be empty, despite the misleading idea that a 'plain text' file would be created stemming from the data frame.
  • Upon switching tabs, data frame's tab will start misbehaving. Going back to generated 'plain text' file tab and then to data frame tab, the data frame will be empty.

Steps to reproduce the issue:

  1. Have a folder with a .csv file containing some data. Then, click on the file to see it as a data frame.
  2. Delete the .csv file. Notice that the data frame tab will remain open.
  3. Click on 'Open as plain text file'.
  4. Native dialog 'Unable to open [file]' opens. Click on 'Create file'.
  5. On the left explorer pane, notice that a .csv file now appears.
  6. Click again on 'Open as plain text file'.
  7. Notice that .csv file is now empty.
  8. Close the .csv file tab.
  9. Depending on how fast you perform the previous actions, you will either have a data frame tab that acts up or you will have an empty data frame tab.

Expected or desired behavior:

  • If I have a data frame with data and a dialog prompts me to 'create file', I'd expect a file would be successfully created from that data frame.
  • Data loss due to user's error (i.e., deleting the .csv file) combined with misleading dialog (i.e., prompting user to 'create file') is not a good experience for the user.

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 the issue: delete the CSV while its data-frame tab remains open, choose “Open as plain text file,” and select “Create file.” Trace the handling of the missing file and tab switching; done means the dialog no longer causes misleading empty-file creation or loss of the existing data frame.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.