Vscode-jupyter: Closing a notebook marked as trusted shouldn't trigger the save modal

Created on 10 Jul 2020  路  5Comments  路  Source: microsoft/vscode-jupyter

OS: macOS Catalina (10.15.5)
Extension version: 2020.7.93499-rc

Steps to reproduce

  1. Create an untrusted notebook
  2. Open it in VS Code and click "Trust" when prompted
  3. Close the notebook

Expected behaviour

I expect the preference to be saved in VS Code's storage, similar to the pythonPath work (#11015). There is also no * next to the notebook's name indicating that it was modified.

Actual behaviour

Closing the newly trusted notebook triggers a "Save or discard changes" modal, and discarding changes doesn't save the trusted state for the next time the notebook gets reopened:

trust_save

bug

All 5 comments

You should not be asked to save or discard changes, that's a bug for sure. Will take a look at this.

To address the other pieces: the preference is actually saved to VS Code's storage. The notebook itself is not modified when trust state changes, so the dirty indicator not being present when trust changes is by design.

However, I'm not able to repro the issue you reported where discarding changes doesn't save the trusted state for the next time. I.e. if I open an untrusted notebook, click trust, and close without saving, the notebook stays trusted when I reopen it. Could you try this again?

Should I try it using the latest Insiders build?

Which OS are you using (is it a macOS issue?)?

Just tested with the latest insiders build on macOS, can't repro there either :( And on macOS I don't even get prompted to save after changing from untrusted to trusted. I'm running 10.14.6 on my macbook though.

Still happening when using 2020.8.93521-dev:

trusted_save

Validated. Trusting a notebook doesn't look to trigger a save change anymore.

Was this page helpful?
0 / 5 - 0 ratings