|
| 1 | +# PR_26124_018-workspace-toolstate-lifecycle-ux |
| 2 | + |
| 3 | +## Scope |
| 4 | +- `tools/workspace-v2/index.html` |
| 5 | +- `tools/workspace-v2/index.js` |
| 6 | +- `tests/playwright/workspace-v2.validation.spec.js` |
| 7 | +- `tests/ui/workspace-v2.asset-manager.spec.js` |
| 8 | + |
| 9 | +## Implementation Summary |
| 10 | +- Moved Tool State Library UI into the Producer panel so Producer owns: |
| 11 | + - tool selector |
| 12 | + - toolState ID input |
| 13 | + - load/create/open/direct/promote actions |
| 14 | + - saved Tool State Library list |
| 15 | +- Enforced named toolState lifecycle for Producer actions: |
| 16 | + - `Load Tool State` now requires a valid toolState ID, loads fixture payload, saves/overwrites `savedToolStates[toolStateId]`, sets it active, and opens the selected tool. |
| 17 | + - `Create & Open Tool State` now requires a valid toolState ID, saves a new `savedToolStates[toolStateId]` from active payload, sets it active, and opens the selected tool. |
| 18 | + - Added seeded generated toolState ID when the input is empty to support "provide or accept generated" workflow. |
| 19 | +- Active promotion lifecycle: |
| 20 | + - `Promote Active Tool State to Tools` publishes to `tools.<toolId>`, |
| 21 | + - removes matching saved draft if present, |
| 22 | + - clears active workspace toolState after publish. |
| 23 | +- Saved card promotion lifecycle: |
| 24 | + - each card `Promote to Tools` publishes to `tools.<toolId>` and removes the saved draft entry. |
| 25 | +- Published Tools visibility: |
| 26 | + - kept visible `Published Tools` output, |
| 27 | + - excludes `workspace-v2`, |
| 28 | + - includes `palette-browser` and published non-palette tools, |
| 29 | + - added `Copy to Tool State` on each published non-palette tool to create a new saved draft without removing the published tool. |
| 30 | +- Preserved constraints: |
| 31 | + - no `palette-manager-v2` toolState producer option, |
| 32 | + - no palette-manager promotion path, |
| 33 | + - no session wording reintroduced, |
| 34 | + - no sample JSON changes. |
| 35 | + |
| 36 | +## Validation |
| 37 | +- `node --check tools/workspace-v2/index.js` -> pass |
| 38 | +- `node --check tests/playwright/workspace-v2.validation.spec.js` -> pass |
| 39 | +- `node --check tests/ui/workspace-v2.asset-manager.spec.js` -> pass |
| 40 | +- `npm run test:workspace-v2` -> pass (`20 passed`, `0 failed`) |
| 41 | + |
| 42 | +## Full Samples Smoke |
| 43 | +- Skipped intentionally. This PR is Workspace V2 + targeted Playwright coverage only and does not modify shared sample framework paths. |
0 commit comments