Skip to content

Commit 85caad7

Browse files
author
DavidQ
committed
Complete Workspace Manager V2 review cleanup and launch validation - PR_26126_114-workspace-manager-v2-review-cleanup
1 parent 64b879b commit 85caad7

4 files changed

Lines changed: 55 additions & 16 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR_26126_114 Manual Validation Notes
2+
3+
## Automated Validation
4+
- `npm run test:asset-manager-v2` passed.
5+
- Result: 8 Playwright tests passed.
6+
- `npm run test:workspace-v2` passed.
7+
- Result: 19 Playwright tests passed.
8+
9+
## Manual Checks
10+
1. Open `tools/workspace-manager-v2/index.html`.
11+
- Expected: Workspace Manager V2 uses the shared First-Class Tool V2 theme and shows no local color drift.
12+
- Expected: selecting a game creates context with active game, active palette, and active assets path.
13+
2. Launch Asset Manager V2 from Workspace Manager V2.
14+
- Expected: Asset Manager V2 opens with `launch=workspace`, `fromTool=workspace-manager-v2`, and a `hostContextId`.
15+
- Expected: Asset Manager V2 loads assets and palette from Workspace Manager V2 session context.
16+
3. Open `tools/asset-manager-v2/index.html`.
17+
- Expected: direct launch without session/context hard-fails to the launch guard overlay.
18+
4. Open `tools/asset-manager-v2/index.html?workspace=prod`.
19+
- Expected: direct production URL launch hard-fails to the launch guard overlay.
20+
5. Open `tools/asset-manager-v2/index.html?workspace=UAT`.
21+
- Expected: temporary UAT-only launch remains available for isolated testing.
22+
23+
## Out Of Scope
24+
- Full samples smoke test was skipped because this PR is scoped to Workspace Manager V2 review cleanup and targeted Playwright coverage.
25+
- Deprecated `tools/workspace-v2/` was not modified.
26+
- Sample JSON was not modified.
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR_26126_114 Workspace Manager V2 Review Notes
2+
3+
## Review Scope
4+
- Reviewed Workspace Manager V2 session/context ownership for active game, active palette, and active assets path.
5+
- Reviewed Asset Manager V2 production launch acceptance through Workspace Manager V2 session/context only.
6+
- Reviewed direct launch and `?workspace=prod` guard coverage.
7+
- Reviewed temporary `?workspace=UAT` retention for isolated UAT testing.
8+
- Reviewed Workspace Manager V2 theme contract and Playwright ownership under `tests/playwright/tools`.
9+
10+
## Cleanup
11+
- Removed redundant `activePaletteSwatches` state from `WorkspaceManagerV2App`.
12+
- Asset Manager launch gating now checks the active Workspace Manager V2 context palette directly.
13+
- Removed obsolete `queryGameId` and `gameRootFromGameId` helpers from `WorkspaceBridge`.
14+
- Removed the manifest-as-context fallback from `WorkspaceBridge.workspaceManifestFromContext`.
15+
- Production workspace launch now stays tied to the explicit Workspace Manager V2 session payload.
16+
17+
## Verification
18+
- Workspace Manager V2 writes session context with `gameId`, `gameRoot`, `assetsPath`, `activePalette`, and `workspaceManifest`.
19+
- Asset Manager V2 requires `launch=workspace`, `fromTool=workspace-manager-v2`, `hostContextId`, and valid session context.
20+
- Direct Asset Manager V2 launch without session context hard-fails to the overlay.
21+
- `?workspace=prod` hard-fails to the overlay.
22+
- `?workspace=UAT` remains temporary-only and isolated.
23+
- No changed files under deprecated `tools/workspace-v2/`.
24+
- No sample JSON files were modified.
25+
- Workspace Manager V2 CSS still resolves through Template V2 theme tokens without local color drift.
26+
- Asset Manager V2, Preview Generator V2, and Workspace Manager V2 Playwright specs remain under `tests/playwright/tools`.
27+

tools/asset-manager-v2/js/services/WorkspaceBridge.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ export class WorkspaceBridge {
5252
return new URLSearchParams(this.window.location.search).get("hostContextId") || "";
5353
}
5454

55-
queryGameId() {
56-
return new URLSearchParams(this.window.location.search).get("gameId") || "";
57-
}
58-
59-
gameRootFromGameId(gameId) {
60-
const normalizedGameId = String(gameId || "").trim().replace(/[\\/]+/g, "-");
61-
return normalizedGameId ? `games/${normalizedGameId}/` : "";
62-
}
63-
6455
validateWorkspaceManagerContext(context) {
6556
if (!isPlainObject(context)) {
6657
return { ok: false, message: "Workspace Manager V2 session context is invalid." };
@@ -125,9 +116,6 @@ export class WorkspaceBridge {
125116
if (isPlainObject(context.workspaceManifest)) {
126117
return context.workspaceManifest;
127118
}
128-
if (context.documentKind === "workspace-manifest") {
129-
return context;
130-
}
131119
return null;
132120
}
133121

tools/workspace-manager-v2/js/WorkspaceManagerV2App.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export class WorkspaceManagerV2App {
1515
this.summary = summary;
1616
this.activeContext = null;
1717
this.activeGame = null;
18-
this.activePaletteSwatches = [];
1918
}
2019

2120
start() {
@@ -38,7 +37,6 @@ export class WorkspaceManagerV2App {
3837
async selectGame(gameId) {
3938
this.activeContext = null;
4039
this.activeGame = null;
41-
this.activePaletteSwatches = [];
4240
this.launchControl.setEnabled(false);
4341
this.summary.clear();
4442

@@ -58,7 +56,6 @@ export class WorkspaceManagerV2App {
5856

5957
this.activeContext = result.context;
6058
this.activeGame = result.game;
61-
this.activePaletteSwatches = result.paletteSwatches;
6259
this.gameSelector.setSummary(`${result.game.name} context uses ${result.game.gameRoot} and ${result.game.assetsPath}.`);
6360
this.summary.render({
6461
context: result.context,
@@ -71,7 +68,7 @@ export class WorkspaceManagerV2App {
7168
}
7269

7370
launchAssetManager() {
74-
if (!this.activeContext || !this.activeGame || !this.activePaletteSwatches.length) {
71+
if (!this.activeContext || !this.activeGame || !this.activeContext.activePalette?.swatches?.length) {
7572
this.statusLog.fail("Launch blocked: active game context and palette are required.");
7673
return;
7774
}

0 commit comments

Comments
 (0)