Skip to content

Commit 794dfcb

Browse files
author
DavidQ
committed
Fix Workspace Manager host size and tool resolution
PR Details: - Expands Workspace Manager host and mount container to fill available browser page area. - Resolves explicit tool query values through the tool registry. - Shows resolved tool name in pager instead of No tool available. - Mounts/activates selected tool. - Keeps first-tool default only when no explicit tool is provided. - Does not restore legacy game query fallback.
1 parent 11e2442 commit 794dfcb

8 files changed

Lines changed: 421 additions & 24 deletions

File tree

docs/dev/codex_rules.md

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,67 @@
1+
# Codex Rules (MANDATORY — HARD CONSTRAINTS)
12

2-
# Codex Rules
3+
These rules OVERRIDE all other instructions.
34

4-
MANDATORY:
5+
## This PR
56

6-
- Use EXACT marker location
7-
- One pager only
8-
- No index.html edits for pager
9-
- No guessing placement
7+
Fix only:
8+
- Workspace Manager host/mount size
9+
- tool query resolution for pager/mount
10+
11+
Allowed:
12+
- targeted Workspace Manager CSS/layout changes
13+
- targeted Workspace Manager tool resolution changes
14+
- validation report
15+
16+
Forbidden:
17+
- broad cleanup
18+
- unrelated refactoring
19+
- samples changes
20+
- game launch label changes
21+
- legacy query fallback
22+
- second SSoT
23+
- new header/banner
24+
- start_of_day changes
25+
26+
## Required Layout
27+
28+
Workspace Manager must fill the browser viewport/page area.
29+
30+
Do not leave:
31+
- tiny upper-left box
32+
- clipped mini pane
33+
- constrained host shell
34+
- blank mount container
35+
36+
## Required Tool Resolution
37+
38+
For valid:
39+
`tool=palette-browser`
40+
41+
Pager must show resolved display name, not `No tool available`.
42+
43+
## User-Approved Behavior
44+
45+
If no explicit tool query exists:
46+
- first available tool may be selected/mounted on load.
47+
48+
## Still Forbidden
49+
50+
Do not restore:
51+
- `gameId || game`
52+
- legacy `game` query fallback
53+
- hidden fallback routing
54+
- stale memory reuse
55+
56+
## Anti-Patterns Forbidden
57+
58+
- variable aliasing
59+
- pass-through variables
60+
- duplicate state
61+
- vague names
62+
- hidden query fallback
63+
- duplicated launch paths
64+
- silent redirects
65+
- silent caught errors
66+
- broad refactor
67+
- scope expansion
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# BUILD_PR_LEVEL_20_25_FIX_WORKSPACE_HOST_SIZE_AND_TOOL_RESOLUTION Validation
2+
3+
## Changed Files
4+
- `tools/Workspace Manager/main.js`
5+
- `tools/Workspace Manager/toolHost.css`
6+
- `tools/shared/platformShell.js`
7+
- `docs/dev/reports/workspace_host_size_and_tool_resolution_validation.md`
8+
9+
## Proof Host Page Fills Browser Viewport
10+
- Host root dimensions are explicitly full-page:
11+
- `tools/Workspace Manager/toolHost.css:1` `html,`
12+
- `tools/Workspace Manager/toolHost.css:2` `body.tool-host-page {`
13+
- `tools/Workspace Manager/toolHost.css:3` `width: 100%;`
14+
- `tools/Workspace Manager/toolHost.css:4` `height: 100%;`
15+
- Workspace host container also fills available area:
16+
- `tools/Workspace Manager/toolHost.css:14` `.tool-host-workspace {`
17+
- `tools/Workspace Manager/toolHost.css:15` `width: 100%;`
18+
- `tools/Workspace Manager/toolHost.css:16` `height: 100%;`
19+
20+
## Proof Mount Container Fills Available Browser Area
21+
- Mount surface is full-size and flexed:
22+
- `tools/Workspace Manager/toolHost.css:23` `.tool-host-workspace__mount {`
23+
- `tools/Workspace Manager/toolHost.css:24` `width: 100%;`
24+
- `tools/Workspace Manager/toolHost.css:25` `height: 100%;`
25+
- `tools/Workspace Manager/toolHost.css:30` `.tool-host-workspace__mount {`
26+
27+
## Proof No Tiny Upper-Left Constrained Viewport Remains
28+
- Direct mount iframes are now explicitly forced to full-size:
29+
- `tools/Workspace Manager/toolHost.css:111` `.tool-host-workspace__mount > iframe[data-tool-host-frame],`
30+
- `tools/Workspace Manager/toolHost.css:112` `.tool-host-workspace__mount > iframe[data-game-host-frame],`
31+
- `tools/Workspace Manager/toolHost.css:116` `width: 100%;`
32+
- `tools/Workspace Manager/toolHost.css:117` `height: 100%;`
33+
- This fixes the default browser iframe size fallback (300x150) that causes the tiny upper-left rendering.
34+
35+
## Proof tool=palette-browser Resolves To Display Name
36+
- Query tool id is validated against existing registry/SSoT host manifest:
37+
- `tools/Workspace Manager/main.js:301` `function readRequestedToolIdFromQuery() {`
38+
- `tools/Workspace Manager/main.js:304` `if (!requested || !getToolHostEntryById(manifest, requested) || !toolIds.includes(requested)) {`
39+
- Pager label text is display-name based, not raw id/fallback string:
40+
- `tools/shared/platformShell.js:876` `data-tool-host-current-label>${escapeHtml(currentTool?.displayName || "Tool")}`
41+
42+
## Proof Pager No Longer Shows No tool available For Valid Game/Tool
43+
- Pager default text at platform shell marker was changed from static `No tool available` to dynamic tool display name:
44+
- `tools/shared/platformShell.js:876` uses `${escapeHtml(currentTool?.displayName || "Tool")}`.
45+
46+
## Proof Selected Tool Mounts/Activates
47+
- Runtime mount call remains active for selected tool:
48+
- `tools/Workspace Manager/main.js:563` `const mountResult = runtime.mountTool(toolId, {`
49+
- Initial load path mounts selected tool:
50+
- `tools/Workspace Manager/main.js:804` `if (!mountSelectedTool("init")) {`
51+
52+
## Proof Missing Tool Selects First Available Tool
53+
- First available tool fallback is used only when explicit valid tool is absent:
54+
- `tools/Workspace Manager/main.js:774` `const initialToolId = requestedToolId || (toolIds[0] || "");`
55+
56+
## Proof Invalid Tool Renders Visible Diagnostic
57+
- Invalid explicit tool query path now fails visibly instead of silently falling back:
58+
- `tools/Workspace Manager/main.js:665` `if (rawRequestedToolId && !requestedToolId) {`
59+
- `tools/Workspace Manager/main.js:667` `renderMountDiagnostic(`
60+
- `tools/Workspace Manager/main.js:696` `if (rawRequestedToolId && !requestedToolId) {`
61+
- `tools/Workspace Manager/main.js:698` `renderMountDiagnostic(`
62+
- `tools/Workspace Manager/main.js:766` `if (rawRequestedToolId && !requestedToolId) {`
63+
- `tools/Workspace Manager/main.js:768` `renderMountDiagnostic(`
64+
65+
## Proof gameId || game Fallback Not Restored
66+
- Search checks:
67+
- `NOT_FOUND gameId || game`
68+
- `NOT_FOUND searchParams.get("game")`
69+
- `NOT_FOUND searchParams.get('game')`
70+
71+
## Proof Samples Remain Untouched
72+
- Check result:
73+
- `SAMPLES_UNCHANGED`
74+
- From `git diff --name-only -- samples`.
75+
76+
## Anti-Pattern Self-Check
77+
- No `gameId || game`/legacy game fallback restored: PASS
78+
- No second SSoT introduced: PASS
79+
- No samples or label changes: PASS
80+
- No broad Workspace Manager refactor: PASS
81+
- Changes remained targeted to host size + tool resolution + validation: PASS
Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,73 @@
1+
# Codex Commands — BUILD_PR_LEVEL_20_25_FIX_WORKSPACE_HOST_SIZE_AND_TOOL_RESOLUTION
12

2-
# Codex Command
3+
## Model
4+
GPT-5.4 or GPT-5.3-codex
35

4-
Execute BUILD_PR_LEVEL_20_24_PLACE_PAGER_AT_PLATFORM_SHELL_MARKER
6+
## Reasoning
7+
High
58

6-
Steps:
9+
## Command
710

8-
1. Open tools/shared/platformShell.js
9-
2. Locate:
10-
// pager should go here
11-
3. Replace ONLY that line with pager render logic
12-
4. Remove any other pager instances
13-
5. Ensure tool mount still works
14-
6. Do not modify unrelated code
11+
```text
12+
Read docs/dev/codex_rules.md first.
1513
16-
Return ZIP
14+
Execute BUILD_PR_LEVEL_20_25_FIX_WORKSPACE_HOST_SIZE_AND_TOOL_RESOLUTION.
15+
16+
Current UAT failure:
17+
- Page renders in the upper-left corner too small to use.
18+
- It should fill the browser page area top/bottom/left/right.
19+
- This is not browser fullscreen mode; it is full available page layout.
20+
- Pager shows: [PREV]No tool available[NEXT]
21+
- Example URL:
22+
tools/Workspace Manager/index.html?gameId=Bouncing-ball&mount=game&tool=palette-browser
23+
24+
Goal:
25+
Fix Workspace Manager host/mount layout size and resolve selected tool query.
26+
27+
Required layout:
28+
- html/body/tool-host-page/tool-host-workspace/tool-host-workspace__mount must support full available browser size.
29+
- No tiny fixed upper-left viewport.
30+
- No clipped mini scrollbox.
31+
- Mounted Workspace Manager content should fill available width/height.
32+
33+
Required tool behavior:
34+
- read explicit tool query.
35+
- resolve tool=palette-browser through existing registry/SSoT.
36+
- pager displays resolved display name, e.g. Palette Browser / Manager.
37+
- selected tool mounts/activates.
38+
- if no explicit tool query exists, select/mount first available tool.
39+
- if explicit tool is invalid, show visible diagnostic inside page/mount container.
40+
41+
Forbidden:
42+
- changing samples
43+
- changing labels
44+
- restoring gameId || game
45+
- legacy game query fallback
46+
- second SSoT
47+
- new header/banner
48+
- broad Workspace Manager refactor
49+
- start_of_day changes
50+
51+
Likely files:
52+
- tools/Workspace Manager/main.js
53+
- tools/Workspace Manager/toolHost.css
54+
- any existing Workspace Manager mounted-content CSS only if directly responsible for tiny viewport
55+
56+
Validation:
57+
Create docs/dev/reports/workspace_host_size_and_tool_resolution_validation.md with:
58+
- changed files
59+
- proof host page fills browser viewport
60+
- proof mount container fills available browser area
61+
- proof no tiny upper-left constrained viewport remains
62+
- proof tool=palette-browser resolves to display name
63+
- proof pager no longer shows No tool available for valid game/tool
64+
- proof selected tool mounts/activates
65+
- proof missing tool selects first available tool
66+
- proof invalid tool renders visible diagnostic
67+
- proof gameId || game fallback not restored
68+
- proof samples remain untouched
69+
- anti-pattern self-check
70+
71+
Return ZIP at:
72+
tmp/BUILD_PR_LEVEL_20_25_FIX_WORKSPACE_HOST_SIZE_AND_TOOL_RESOLUTION.zip
73+
```
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
Place pager at explicit platformShell marker
1+
Fix Workspace Manager host size and tool resolution
2+
3+
PR Details:
4+
- Expands Workspace Manager host and mount container to fill available browser page area.
5+
- Resolves explicit tool query values through the tool registry.
6+
- Shows resolved tool name in pager instead of No tool available.
7+
- Mounts/activates selected tool.
8+
- Keeps first-tool default only when no explicit tool is provided.
9+
- Does not restore legacy game query fallback.

0 commit comments

Comments
 (0)