Skip to content

Commit 66cb9e0

Browse files
author
DavidQ
committed
Bind Workspace Manager UI to embedded payload for asset display - PR 11.23
1 parent 4dc2b0f commit 66cb9e0

7 files changed

Lines changed: 44 additions & 201 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
# CODEX COMMANDS
2-
3-
model: gpt-5.3-codex
4-
reasoning: high
5-
6-
Apply PR_11_22_WORKSPACE_MANAGER_EMBEDDED_PAYLOAD_ASSET_STATUS_FIX.
7-
8-
Required:
9-
- Fix Workspace Manager asset/status display so tools with embedded data under `manifest.tools[toolId].payload` do not show `Asset: none`.
10-
- Keep tool presence logic from PR 11.21.
11-
- Add payload-document mapping for sample 1902 tool entries:
12-
vectorMapDocument, vectorAssetDocument, tileMapDocument, parallaxDocument, spriteProject, skin, assetCatalog, palette, snapshot, events, profileSettings, physicsBody, pipelinePayload, candidate, mapPayload, asset3d, cameraPath.
13-
- Derive meaningful display labels from embedded payloads where possible.
14-
- Utilities may show N/A only when intentionally non-asset tools, but payload-backed tools must not be marked missing.
15-
- Do not require external asset pointers or legacy assetRegistry entries to show data present.
16-
- Do not loosen schemas.
17-
- Do not modify other samples.
18-
- Do not add fallback/default/hidden data.
19-
- Do not modify start_of_day folders.
20-
- Add validation report at docs/dev/reports/PR_11_22_WORKSPACE_MANAGER_EMBEDDED_PAYLOAD_ASSET_STATUS_FIX_report.md.
21-
- Return ZIP artifact at tmp/PR_11_22_WORKSPACE_MANAGER_EMBEDDED_PAYLOAD_ASSET_STATUS_FIX_delta.zip.
1+
MODEL: GPT-5.3-codex
2+
REASONING: medium
3+
COMMAND: Apply UI binding fix for payload asset display

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Show Workspace Manager asset status from embedded tool payloads - PR 11.22
1+
Bind Workspace Manager UI to embedded payload for asset display - PR 11.23

docs/dev/reports/launch_smoke_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Launch Smoke Report
22

3-
Generated: 2026-04-29T03:45:20.319Z
3+
Generated: 2026-04-29T15:41:58.002Z
44

55
Filters: games=false, samples=true, tools=true, sampleRange=1902-1902
66

docs/dev/reports/validation.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Expected: Asset names appear instead of 'none' when payload exists.

docs/operations/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 0 additions & 177 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# PR 11.23
2+
Fix Workspace Manager UI binding to read embedded payload asset names.

tools/shared/platformShell.js

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,34 @@ function summarizeEmbeddedToolPayloadDocument(toolId = "", scopedToolState = nul
679679
return null;
680680
}
681681

682+
function resolveWorkspaceManifestToolStateForStatus(toolId = "") {
683+
const normalizedToolId = normalizeTextValue(toolId).toLowerCase();
684+
if (!normalizedToolId) {
685+
return null;
686+
}
687+
const manifest = getManifest();
688+
const tools = manifest && typeof manifest === "object" && manifest.tools && typeof manifest.tools === "object" && !Array.isArray(manifest.tools)
689+
? manifest.tools
690+
: null;
691+
if (!tools) {
692+
return null;
693+
}
694+
695+
const exactMatch = tools[normalizedToolId];
696+
if (exactMatch && typeof exactMatch === "object" && !Array.isArray(exactMatch)) {
697+
return exactMatch;
698+
}
699+
700+
if (normalizedToolId === "palette-browser") {
701+
const singularPalette = tools.palette;
702+
if (singularPalette && typeof singularPalette === "object" && !Array.isArray(singularPalette)) {
703+
return singularPalette;
704+
}
705+
}
706+
707+
return null;
708+
}
709+
682710
function installWorkspaceScopedSamplePresetFetchShim(currentToolId, samplePresetPath) {
683711
if (typeof window === "undefined" || typeof window.fetch !== "function") {
684712
return;
@@ -701,6 +729,7 @@ function installWorkspaceScopedSamplePresetFetchShim(currentToolId, samplePreset
701729
const rawPreset = await response.clone().json().catch(() => null);
702730
const scopedPreset = selectWorkspaceScopedToolPreset(rawPreset, normalizedToolId);
703731
if (!scopedPreset) {
732+
workspaceScopedToolPresetForStatus = null;
704733
return response;
705734
}
706735
workspaceScopedToolPresetForStatus = scopedPreset;
@@ -728,16 +757,19 @@ async function primeWorkspaceScopedToolPresetForStatus(toolId, samplePresetPath)
728757
try {
729758
const response = await window.fetch(normalizedSamplePresetPath, { cache: "no-store" });
730759
if (!response.ok) {
760+
workspaceScopedToolPresetForStatus = null;
731761
return null;
732762
}
733763
const rawPreset = await response.json();
734764
const scopedPreset = selectWorkspaceScopedToolPreset(rawPreset, normalizedToolId);
735765
if (!scopedPreset) {
766+
workspaceScopedToolPresetForStatus = null;
736767
return null;
737768
}
738769
workspaceScopedToolPresetForStatus = scopedPreset;
739770
return scopedPreset;
740771
} catch {
772+
workspaceScopedToolPresetForStatus = null;
741773
return null;
742774
}
743775
}
@@ -1435,9 +1467,11 @@ function isAssetCompatibleWithTool(toolId = "", asset = null) {
14351467

14361468
function renderToolAssetBadge(toolId = "") {
14371469
const normalizedToolId = normalizeTextValue(toolId).toLowerCase();
1470+
const workspaceBoundToolState = resolveWorkspaceManifestToolStateForStatus(normalizedToolId);
1471+
const statusSourceToolState = workspaceBoundToolState || workspaceScopedToolPresetForStatus;
14381472
const embeddedPayloadSummary = summarizeEmbeddedToolPayloadDocument(
14391473
normalizedToolId,
1440-
workspaceScopedToolPresetForStatus
1474+
statusSourceToolState
14411475
);
14421476
const acceptedKinds = resolveAcceptedAssetKindsForTool(normalizedToolId);
14431477
if (normalizedToolId === "palette-browser") {
@@ -2228,6 +2262,7 @@ function ensureRuntimeMonitoring() {
22282262
}
22292263

22302264
async function initPlatformShell() {
2265+
workspaceScopedToolPresetForStatus = null;
22312266
ensureRuntimeMonitoring();
22322267

22332268
const currentToolId = document.body.dataset.toolId || "";

0 commit comments

Comments
 (0)