posit-dev / posit-dev/positron

Disable new folder from template when workspace is not trusted

Open
#7,984 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: folder template bug support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

In a Restricted/Untrusted workspace folder, many extensions are disabled. In the new folder/project flow, this means that interpreter discovery is unavailable because the R and Python extensions cannot report the available runtimes to us, since those extensions are not running.

We may want to display a suitable message on the first modal step (project/folder type step) and prevent moving forward with language-specific folder templates, as they rely on the extensions to provide interpreter info. We can keep the Empty Folder option available, as it doesn't use extension code in the folder creation process.

Disabling the New Folder from Template / New Project option altogether (greyed out as a menu option) is another option, but with the changes in https://github.com/posit-dev/positron/pull/7893 (issue: https://github.com/posit-dev/positron/issues/7559), this would also prevent the user from accessing New Empty Folder.


Discussed in https://github.com/posit-dev/positron/discussions/7924

Originally posted by CorradoLanera June 2, 2025

Description:

When launching Positron in an untrusted folder and attempting to create a new R project (without interacting with existing files), the application becomes unresponsive during the R version discovery step.

Steps to Reproduce:

  • Open Positron in an untrusted folder.

  • Navigate to "New Project" > "R Project".

  • Enter a project name and select a parent folder.

  • Click "Next".

Expected Behavior:

Proceed to the next step without delay, allowing the creation of a new R project.

Actual Behavior:

Positron hangs on the R version discovery screen. It appears that the application attempts to detect installed R versions, but this process fails due to the folder's untrusted status, causing the process to freeze (UI still responsive, can go back, etc).

Environment:

  • Positron version: 2025.06.0 - builds tested: 48 and 167

  • Operating System: Windows 11 Pro

  • R versions installed: 4.5 (default), 4.4.3, 4.4.2, 4.4.1

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

Start in the new folder/project flow, focusing on the first project or folder type modal and how Restricted/Untrusted workspace state affects extension availability. Preserve the Empty Folder option while preventing language-specific templates that require interpreter discovery; completion should avoid the reported hang and provide a suitable message.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Feature
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.