Skip to content

Commit cf04d65

Browse files
author
DavidQ
committed
Componentize Workspace Manager status block and clean shared asset display - PR 11.30
1 parent 178cc05 commit cf04d65

6 files changed

Lines changed: 183 additions & 73 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,58 @@ MODEL: GPT-5.3-codex
22
REASONING: medium
33

44
TASK:
5-
Apply PR 11.29.
6-
7-
Fix fullscreen chrome/title binding so entering fullscreen shows:
8-
9-
<tool name> - <description>
10-
11-
instead of:
12-
13-
Configuration error (open title for details)
14-
15-
Use the active tool's real manifest metadata. Do not hardcode individual tool names/descriptions.
5+
Apply PR 11.30.
6+
7+
Move the Workspace Manager status/header fields into one shared render block/component so we can rearrange it later without hunting through scattered code.
8+
9+
Target visible content currently similar to:
10+
Workspace
11+
sample-0901-vector-map
12+
shared workspace state synced
13+
PREV
14+
Parallax Scene Studio
15+
NEXT
16+
Workspace: Loaded
17+
Shared Palette: Sample 1902 Workspace Palette
18+
Shared Assets: No shared asset selected
19+
20+
Required behavior:
21+
- Consolidate this into one render path/component/function.
22+
- Preserve current working Workspace Manager behavior.
23+
- Preserve full tool display.
24+
- Preserve child tool launch/palette handoff behavior.
25+
- Do not change payload schema.
26+
27+
Shared Assets rule:
28+
- "Shared Assets: No shared asset selected" should not be shown as a permanent noisy status for sample 1902 if there is no shared selected asset concept.
29+
- Show Shared Assets only when the workspace actually provides meaningful shared asset selection/data.
30+
- Do not create fake shared assets.
31+
- Do not use hidden defaults.
32+
- Do not treat absent shared assets as an error.
1633

1734
Do NOT:
18-
- change fullscreen enter/exit mechanics
19-
- change Workspace Manager payload fan-out
35+
- change fullscreen title/description logic unless required by shared status rendering
36+
- change workspace fan-out
2037
- change button enablement
21-
- change sample 1902 data/schema
22-
- add hidden defaults or fallback sample data
38+
- change tool payload handoff
2339
- touch start_of_day folders
24-
25-
Implementation guidance:
26-
1. Find the fullscreen title/header/chrome rendering path.
27-
2. Find where the configuration-error fallback is selected.
28-
3. Trace the active tool ID used when fullscreen is entered.
29-
4. Resolve tool display name and description from the same manifest/tool metadata source used by normal shell rendering.
30-
5. Only use configuration-error fallback when metadata is genuinely invalid/missing.
31-
6. Keep the change surgical.
40+
- add broad refactors
3241

3342
Validation:
3443
node --check tools/shared/platformShell.js
3544
node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --samples --sample-range=1902-1902 --tools
3645

3746
Manual validation:
38-
Open sample 1902.
39-
Open Workspace Manager.
40-
Open a tool.
41-
Enter fullscreen.
42-
Confirm title area shows:
43-
<tool name> - <description>
44-
and not:
45-
Configuration error (open title for details)
47+
Open sample 1902 -> Workspace Manager.
48+
Confirm:
49+
- workspace status/header content still appears
50+
- Shared Palette shows Sample 1902 Workspace Palette
51+
- Shared Assets does not show misleading permanent "No shared asset selected" unless the UI intentionally shows neutral optional status
52+
- all expected tools still visible/openable
4653

4754
REPORT:
48-
Write docs/dev/reports/PR_11_29_validation.txt with:
55+
Write docs/dev/reports/PR_11_30_validation.txt with:
4956
- changed files
50-
- root cause
51-
- metadata source used
52-
- validation commands/results
53-
- manual validation notes
57+
- render block/function name
58+
- Shared Assets display rule
59+
- validation results

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Bind fullscreen chrome to active tool name and description - PR 11.29
1+
Componentize Workspace Manager status block and clean shared asset display - PR 11.30
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
PR 11.30 Validation Report
2+
3+
Changed files:
4+
- tools/shared/platformShell.js
5+
- docs/dev/reports/PR_11_30_validation.txt
6+
7+
Render block/function name:
8+
- renderWorkspaceStatusHeaderBlock(currentTool)
9+
10+
Shared Assets display rule:
11+
- Shared Assets line is rendered only when meaningful shared asset handoff data exists.
12+
- Meaningful data check: shared asset handoff object contains a non-empty displayName, assetId, or sourcePath.
13+
- If no shared asset handoff exists (sample 1902 expected case), Shared Assets line is hidden.
14+
- No fake/default shared assets are created, and absence is not treated as an error.
15+
16+
Validation results:
17+
- node --check tools/shared/platformShell.js -> PASS
18+
- node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --samples --sample-range=1902-1902 --tools -> PASS
19+
- Summary: PASS=19 FAIL=0 TOTAL=19
20+
21+
Manual validation notes:
22+
- Manual browser check is still required in UI session for visual confirmation.
23+
- Expected for sample 1902 in Workspace Manager:
24+
- Workspace status/header content remains visible from one shared render path.
25+
- Shared Palette shows "Sample 1902 Workspace Palette" when available.
26+
- Shared Assets line is not shown as permanent "No shared asset selected" noise when there is no shared selected asset concept.
27+
- Tools remain visible/openable.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PR 11.30 Validation
2+
3+
Changed files:
4+
-
5+
6+
Render block/function:
7+
-
8+
9+
Shared Assets display rule:
10+
-
11+
12+
Before:
13+
- Workspace status/header content was scattered and Shared Assets always showed No shared asset selected.
14+
15+
After:
16+
- Workspace status/header content is owned by one render block/path and Shared Assets is only shown when meaningful.
17+
18+
Validation:
19+
- node --check tools/shared/platformShell.js
20+
- node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --samples --sample-range=1902-1902 --tools
21+
22+
Manual:
23+
- sample 1902 -> Workspace Manager
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# PR 11.30 — Componentize Workspace Status Block
2+
3+
## Purpose
4+
Move the Workspace Manager status/header fields into one shared render block so the UI can be rearranged safely in one place.
5+
6+
## Current Visible Block
7+
Workspace
8+
sample-0901-vector-map
9+
shared workspace state synced
10+
PREV
11+
Parallax Scene Studio
12+
NEXT
13+
Workspace: Loaded
14+
Shared Palette: Sample 1902 Workspace Palette
15+
Shared Assets: No shared asset selected
16+
17+
## Problem
18+
The status/header values are rendered as scattered UI pieces, making layout rearrangement risky.
19+
20+
Also, "Shared Assets: No shared asset selected" never changes for sample 1902 because the workspace has a shared palette and tool-specific embedded payloads, but no actual shared selected asset.
21+
22+
## Required Change
23+
Create or consolidate a single Workspace Manager status/header render path/component that owns:
24+
- Workspace title/context
25+
- active tool/sample label
26+
- sync status
27+
- PREV/NEXT navigation
28+
- Workspace loaded status
29+
- Shared Palette status
30+
- Shared Assets status
31+
32+
## Shared Assets Rule
33+
Only display "Shared Assets" when there is meaningful shared asset data or selection state.
34+
35+
For sample 1902:
36+
- If no shared asset selection exists, hide the line or show a neutral non-error state only if needed.
37+
- Do not imply a broken/missing asset when no shared asset is required.
38+
39+
## Scope
40+
- UI rendering/reorganization only.
41+
- Do not change workspace payload schema.
42+
- Do not change tool launch logic.
43+
- Do not change palette handoff.
44+
- Do not change fullscreen behavior.
45+
- Do not add hidden defaults or fallback assets.
46+
- Do not touch start_of_day folders.
47+
48+
## Acceptance
49+
- The listed Workspace status/header content is rendered from one shared block/path.
50+
- Future rearrangement can be done in one place.
51+
- Shared Palette still shows when present.
52+
- Shared Assets is hidden or neutral when no shared asset concept exists.
53+
- No regression to Workspace Manager tool list or tool launch.
54+
- Smoke test passes.

tools/shared/platformShell.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,26 +1725,7 @@ function renderSharedActionLinks(currentToolId) {
17251725
.join("");
17261726
}
17271727

1728-
function renderSharedSelectionSummary() {
1729-
if (getPageMode() === "landing") {
1730-
return "";
1731-
}
1732-
const workspaceLabel = resolveProjectBindingLabel();
1733-
const asset = readSharedAssetHandoff();
1734-
const palette = readSharedPaletteHandoff();
1735-
const assetLabel = asset?.displayName || "No shared asset selected";
1736-
const paletteLabel = palette?.displayName || "No shared palette selected";
1737-
1738-
return `
1739-
<div class="tools-platform-frame__shared-status" aria-label="Shared asset and palette status">
1740-
<span><strong>Workspace:</strong> ${escapeHtml(workspaceLabel)}</span>
1741-
<span><strong>Shared Palette:</strong> ${escapeHtml(paletteLabel)}</span>
1742-
<span><strong>Shared Assets:</strong> ${escapeHtml(assetLabel)}</span>
1743-
</div>
1744-
`;
1745-
}
1746-
1747-
function renderWorkspaceSummary(currentTool) {
1728+
function renderWorkspaceStatusHeaderBlock(currentTool) {
17481729
if (!currentTool || !workspaceController) {
17491730
return "";
17501731
}
@@ -1759,23 +1740,43 @@ function renderWorkspaceSummary(currentTool) {
17591740
const readiness = manifest?.tools?.[currentTool.id]
17601741
? "shared workspace state synced"
17611742
: "shared workspace shell ready";
1743+
const workspaceLabel = resolveProjectBindingLabel();
1744+
const asset = readSharedAssetHandoff();
1745+
const palette = readSharedPaletteHandoff();
1746+
const paletteLabel = palette?.displayName || "No shared palette selected";
1747+
const hasMeaningfulSharedAsset = Boolean(asset && (
1748+
normalizeTextValue(asset.displayName)
1749+
|| normalizeTextValue(asset.assetId)
1750+
|| normalizeTextValue(asset.sourcePath)
1751+
));
1752+
const sharedAssetLine = hasMeaningfulSharedAsset
1753+
? `<span><strong>Shared Assets:</strong> ${escapeHtml(asset.displayName || asset.assetId || "Selected shared asset")}</span>`
1754+
: "";
17621755

17631756
return `
1764-
<div class="tools-platform-frame__project" aria-label="Workspace system controls">
1765-
<div class="tools-platform-frame__project-actions">
1766-
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="new">New Workspace</button>
1767-
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="open">Open Workspace</button>
1768-
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="save"${workspaceActionDisabled}>Save Workspace</button>
1769-
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="save-as"${workspaceActionDisabled}>Save Workspace As</button>
1770-
<button type="button" class="tools-platform-frame__project-button is-secondary" data-workspace-action="close"${workspaceActionDisabled}>Close Workspace</button>
1771-
<input type="file" class="tools-platform-frame__project-input" data-workspace-open-input accept=".json,application/json" />
1757+
<div class="tools-platform-frame__workspace-status-block" aria-label="Workspace status and tool switch controls">
1758+
<div class="tools-platform-frame__project" aria-label="Workspace system controls">
1759+
<div class="tools-platform-frame__project-actions">
1760+
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="new">New Workspace</button>
1761+
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="open">Open Workspace</button>
1762+
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="save"${workspaceActionDisabled}>Save Workspace</button>
1763+
<button type="button" class="tools-platform-frame__project-button" data-workspace-action="save-as"${workspaceActionDisabled}>Save Workspace As</button>
1764+
<button type="button" class="tools-platform-frame__project-button is-secondary" data-workspace-action="close"${workspaceActionDisabled}>Close Workspace</button>
1765+
<input type="file" class="tools-platform-frame__project-input" data-workspace-open-input accept=".json,application/json" />
1766+
</div>
1767+
<div class="tools-platform-frame__shared-status" aria-label="Shared asset and palette status">
1768+
<span><strong>Workspace:</strong> ${escapeHtml(workspaceLabel)}</span>
1769+
<span><strong>Shared Palette:</strong> ${escapeHtml(paletteLabel)}</span>
1770+
${sharedAssetLine}
1771+
</div>
1772+
<div class="tools-platform-frame__project-copy">
1773+
<span class="tools-platform-frame__project-label">Workspace</span>
1774+
<strong class="tools-platform-frame__project-name">${escapeHtml(workspaceName)}${escapeHtml(dirtyMark)}</strong>
1775+
<span class="tools-platform-frame__project-meta">${escapeHtml(readiness)}</span>
1776+
</div>
1777+
<section class="tool-host-pager" aria-label="Workspace tool pager" data-tool-host-pager><button type="button" class="tool-host-pager__button" data-tool-host-prev>PREV</button><span class="tool-host-pager__name" data-tool-host-current-label>${escapeHtml(currentTool?.displayName || "Tool")}</span><button type="button" class="tool-host-pager__button" data-tool-host-next>NEXT</button></section>
17721778
</div>
1773-
<div class="tools-platform-frame__project-copy">
1774-
<span class="tools-platform-frame__project-label">Workspace</span>
1775-
<strong class="tools-platform-frame__project-name">${escapeHtml(workspaceName)}${escapeHtml(dirtyMark)}</strong>
1776-
<span class="tools-platform-frame__project-meta">${escapeHtml(readiness)}</span>
1777-
</div>
1778-
<section class="tool-host-pager" aria-label="Workspace tool pager" data-tool-host-pager><button type="button" class="tool-host-pager__button" data-tool-host-prev>PREV</button><span class="tool-host-pager__name" data-tool-host-current-label>${escapeHtml(currentTool?.displayName || "Tool")}</span><button type="button" class="tool-host-pager__button" data-tool-host-next>NEXT</button></section>
1779+
17791780
</div>
17801781
`;
17811782
}
@@ -1867,8 +1868,7 @@ function renderHeaderMarkup(currentTool, isHeaderExpanded) {
18671868
${sharedActionLinks}
18681869
</div>
18691870
` : ""}
1870-
${renderWorkspaceSummary(currentTool)}
1871-
${renderSharedSelectionSummary()}
1871+
${renderWorkspaceStatusHeaderBlock(currentTool)}
18721872
</div>
18731873
` : ""}
18741874
${!isLanding ? `<hr class="tools-platform-frame__divider" />` : ""}

0 commit comments

Comments
 (0)