Fix Playground TypeScript file creation to respect selected folder#142
Open
MUFFANUJ wants to merge 5 commits intojupyterlab:mainfrom
Open
Fix Playground TypeScript file creation to respect selected folder#142MUFFANUJ wants to merge 5 commits intojupyterlab:mainfrom
MUFFANUJ wants to merge 5 commits intojupyterlab:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the Playground “create TypeScript file” behavior so new files are created under the currently selected folder (instead of always using the workspace root), aligning with the file browser / notebook tree “current directory” concept.
Changes:
- Add a
cwdcommand argument and use it as the parent directory forcontents.newUntitled()when creating new Playground TypeScript files. - Apply the same
cwd-based behavior to the notebook tree “New” dropdown Playground entry. - Add an integration UI test that verifies file creation honors
cwdwhenpathis not provided.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ui-tests/tests/plugin-playground.spec.ts | Adds coverage for creating a plugin file using cwd when no explicit path is passed. |
| src/index.ts | Extends create-file command args with cwd and uses it to create new untitled files in the selected directory (also applied to the notebook tree command). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #138
This PR fixes the bug where creating a Playground TypeScript file would always place it in the workspace root. File creation now follows the currently selected folder in the UI.