Skip to content

Commit 0ffc6a1

Browse files
committed
Update webstudio workspace management
1 parent 6dc2e6b commit 0ffc6a1

16 files changed

Lines changed: 841 additions & 349 deletions

docs/architecture_distribution_workspace.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ The workspace is user-facing.
6565

6666
The execution mode is implementation-facing.
6767

68-
## Workspace Creation
68+
## Workspace Management
69+
70+
WebStudio can manage workspace folders from the shared workspace selector.
71+
72+
Workspace management includes:
73+
74+
- creating a workspace by cloning an existing workspace
75+
- renaming an existing workspace
6976

7077
WebStudio can create a new workspace by cloning an existing workspace.
7178

@@ -82,6 +89,20 @@ Copying Test Goals is optional and enabled by default.
8289

8390
The objective is a cloned executable workspace while avoiding copied historical execution artifacts.
8491

92+
WebStudio can rename an existing workspace by renaming the workspace folder under the shared settings root.
93+
94+
Workspace rename also moves the matching generated output workspace folder when it exists:
95+
96+
```text
97+
output/<old-workspace>/ -> output/<new-workspace>/
98+
```
99+
100+
This keeps configuration, Test Goals, generated reports, and state model related settings associated with the same workspace name.
101+
102+
Workspace names must remain safe folder names and must be unique.
103+
104+
After a create or rename operation, WebStudio should refresh the workspace list and select the affected workspace.
105+
85106
## CLI Startup Contracts
86107

87108
TESTAR CLI supports two startup contracts.

docs/webstudio/WEBSTUDIO_FUNCTIONAL_SPEC.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,22 @@ The `Edit Settings` view must render `CliStateProjectionMode` as a dropdown usin
123123
- If no `webdriver_xxx` workspace is available, the first workspace is selected.
124124
- Changing the selected workspace reloads the workspace document and resets editor state.
125125

126+
### Workspace Management
127+
128+
WebStudio must expose workspace-level management from the workspace selector area.
129+
130+
The workspace selector area must include a `Workspace` action that opens a workspace management dialog.
131+
132+
The workspace management dialog must support:
133+
134+
- creating a new workspace
135+
- renaming the currently selected workspace
136+
126137
### Workspace Creation
127138

128139
WebStudio must allow creating a new workspace by cloning an existing workspace.
129140

130-
The creation action is launched from the workspace selector area.
131-
132-
The creation dialog must require:
141+
The creation panel must require:
133142

134143
- new workspace name
135144
- base workspace
@@ -171,6 +180,39 @@ After successful creation:
171180

172181
If creation fails, WebStudio must keep the creation dialog open and show the error.
173182

183+
### Workspace Rename
184+
185+
WebStudio must allow renaming the currently selected workspace.
186+
187+
The rename panel must show:
188+
189+
- current workspace name
190+
- new workspace name
191+
192+
The new workspace name must use the same safe folder name rules as workspace creation.
193+
194+
The new workspace name must not already exist.
195+
196+
The new workspace name must be different from the current workspace name.
197+
198+
After successful rename:
199+
200+
- WebStudio refreshes the workspace list
201+
- WebStudio selects the renamed workspace
202+
- WebStudio opens Test Configuration
203+
- the default configuration editor is `Edit Java Composition Flow`
204+
205+
Workspace rename must also rename the matching output results workspace folder when it exists.
206+
207+
Output rename behavior:
208+
209+
- `output/<old-workspace>` becomes `output/<new-workspace>`
210+
- existing generated result folders remain inside the renamed output workspace folder
211+
- if `output/<old-workspace>` does not exist, rename still succeeds
212+
- if `output/<new-workspace>` already exists, rename fails and the current workspace name remains unchanged
213+
214+
If rename fails, WebStudio must keep the workspace management dialog open and show the error.
215+
174216
### Page Navigation
175217

176218
Main pages:

docs/webstudio/WEBSTUDIO_UX_SPEC.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,22 @@ Examples:
7777

7878
## Workspace Selector UX Contract
7979

80-
The workspace selector area is the primary place for workspace selection and creation.
80+
The workspace selector area is the primary place for workspace selection and workspace management.
8181

8282
Expected behavior:
8383

84-
- an `Add` action to the left of the workspace selector opens a create-workspace modal
85-
- the modal asks whether the user wants to create a new workspace
86-
- the modal requires a new workspace name
87-
- the modal requires selecting an existing workspace as the base
88-
- `Copy Test Goals` is visible, checked by default, and can be unchecked
84+
- a `Workspace` action to the left of the workspace selector opens a workspace management modal
85+
- the modal exposes separate areas or tabs for `Create Workspace` and `Rename Workspace`
86+
- `Create Workspace` requires a new workspace name and an existing workspace as base
87+
- `Create Workspace` shows `Copy Test Goals`, checked by default, and allows unchecking it
8988
- `Create` remains disabled until the workspace name and base workspace are valid
90-
- `Discard` closes the modal without creating anything
91-
- after creation, the new workspace is selected automatically
89+
- `Rename Workspace` shows the current workspace name and requires a new valid workspace name
90+
- `Rename Workspace` indicates that existing output results for the current workspace will move to the renamed workspace
91+
- `Rename` remains disabled until the new name is valid, unique, and different from the current workspace name
92+
- `Discard` closes the modal without applying changes
93+
- after creation or rename, the affected workspace is selected automatically
9294

93-
The create-workspace modal must not resize the page layout.
95+
The workspace management modal must not resize the page layout.
9496

9597
Validation feedback appears inside the modal.
9698

0 commit comments

Comments
 (0)