Repository navigation
feat(web): create an empty workspace - #176
Merged
Merged
Conversation
New workspace accepts a name and no path. The form creates the workspace and opens it. A blank name gives two random words. Adding runs to the open workspace still needs a path. An empty workspace shows the import form without the "Nothing job-shaped" warning.
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 #175
What
New workspace can now make a workspace with no runs in it. On the form, the run folders are optional in new mode: the label reads Run folders (optional). Open workspace with a name and no folder makes the workspace with
workspace.create(home, [], name)and opens it withshared.open_workspace, the same calls thatadopt_rootsmakes. A blank name gives two random words, as today. No new storage: the workspace is aworkspace.jsonwith"roots": [].The Runs page of an empty workspace shows the import form, as for a workspace with no jobs:
The warning "Nothing job-shaped under the scanned path." now shows only when the workspace has a root, because an empty workspace scanned no path.
Folders and uploads work as before. In add mode (Add runs to the open workspace), the form still needs a folder, and
/use-pathand/uploadwith nothing make no workspace. The form token is checked first, as before.Touches
routes (
web/runs) · templates and static (runs/setup.html) · docs and site (concepts.md)Before and after
The workspace menu, New workspace, the name "Scratch ", no folder, then Open workspace. Before, the form does not send and asks for a path. After, the empty workspace opens on its Runs page.
Verified
On this branch, on
mainatc4c082a5, in a throwaway container (python:3.12):python3 app/tests/parallel.py: 2047 tests in 119 modules, OK.python3 app/tests/parallel.py app/ui_tests: 361 tests in 43 modules, OK.app/ui_tests/test_empty_workspace.py. A name alone makes and opens a workspace with no roots, and its Runs page has no "Nothing job-shaped" warning. A blank name gives two random words. Add runs with nothing makes no workspace, on/use-pathand on/upload. A folder still goes toadopt_roots. A folder that does not exist makes no workspace. No form token gives 403. Onmain, the first two tests fail.Browser check, Chromium (Playwright 1.49), light and dark, 1280 px and 390 px, from the workspace menu (at 390 px, through the menu button). On
main, the form shows "Enter a path, or add a folder below." and stays. On this branch, each run opens the Runs page of the new workspace, Add runs to Scratch light 1280 and so on, with no warning. No page JavaScript errors.Risk
Low. The new path runs only in new mode with no path sent. A revert removes it and leaves the empty workspaces on disk, where they open and can be deleted as any other.