Skip to content

Commit 0961d66

Browse files
author
DavidQ
committed
Repair Workspace Manager blank game launch
PR Details: - Fixes blank Workspace Manager page for game-launched URLs. - Requires visible diagnostics for invalid boot/context/view state. - Preserves explicit gameId behavior. - Does not restore legacy gameId || game fallback. - Does not restore first-tool/default selection. - Leaves sample Open <tool> behavior untouched.
1 parent a57d255 commit 0961d66

8 files changed

Lines changed: 489 additions & 59 deletions

docs/dev/codex_rules.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ These rules OVERRIDE all other instructions.
44

55
## This PR
66

7-
Fix only the Workspace Manager initial view for game-launched context.
7+
Fix only the Workspace Manager blank-page blocker for game-launched context.
88

99
Allowed:
10-
- targeted Workspace Manager launch/view selection edits
10+
- targeted Workspace Manager boot/render/view diagnostics repair
1111
- validation report
1212

1313
Forbidden:
@@ -21,27 +21,19 @@ Forbidden:
2121
- start_of_day changes
2222
- roadmap text rewrite outside status markers
2323

24-
## Required UI Labels
24+
## Required URL
2525

26-
Samples:
27-
- must remain `Open <tool>`
28-
29-
Games:
30-
- must remain `Open with Workspace Manager`
31-
32-
## Required Game Launch Behavior
33-
34-
For:
26+
This URL must render visible Workspace Manager content:
3527

3628
```text
37-
tools/Workspace Manager/index.html?gameId=<id>&mount=game
29+
tools/Workspace Manager/index.html?gameId=Breakout&mount=game
3830
```
3931

40-
`mount=game` means the source/context is a game.
32+
## Diagnostic Requirement
4133

42-
It must not force the initial primary view to be the hosted game surface.
34+
Blank page is forbidden.
4335

44-
Workspace Manager must show the tools/workspace surface for the explicit game context.
36+
Any boot/context/view failure must render visible diagnostic text on the page.
4537

4638
## Forbidden Restorations
4739

@@ -53,6 +45,7 @@ Do not restore:
5345
- default tool
5446
- default workspace
5547
- fallback route
48+
- fallback view
5649
- stale memory reuse
5750

5851
## Anti-Patterns Forbidden
@@ -65,6 +58,7 @@ Do not restore:
6558
- hidden fallback behavior
6659
- duplicated launch paths
6760
- silent redirects
61+
- silent caught errors
6862
- broad truthy/falsy behavior changes
6963
- magic strings outside existing SSoT/config pattern
7064
- duplicate event listeners
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# Workspace Manager Blank Game Launch Repair Validation
2+
3+
## Changed Files
4+
5+
- `tools/Workspace Manager/index.html`
6+
- `tools/Workspace Manager/main.js`
7+
- `tools/Workspace Manager/toolHost.css`
8+
- `docs/dev/reports/workspace_manager_blank_game_launch_repair_validation.md`
9+
10+
## Root Cause Of Blank Page
11+
12+
- `tools/Workspace Manager/index.html` previously rendered only an empty mount container.
13+
- `tools/Workspace Manager/main.js` status/diagnostic writes targeted elements that did not exist in that HTML (`[data-tool-host-status]`, controls, diagnostic surface).
14+
- For game-launched URLs without an immediately mounted frame, the page had no visible shell or visible error target, which presented as blank.
15+
16+
## Proof Breakout URL Renders Visible Content
17+
18+
Required URL:
19+
20+
```text
21+
tools/Workspace Manager/index.html?gameId=Breakout&mount=game
22+
```
23+
24+
Visible shell is now always present in HTML:
25+
26+
- tool selector: `tools/Workspace Manager/index.html:13`
27+
- status node: `tools/Workspace Manager/index.html:23`
28+
- diagnostic panel: `tools/Workspace Manager/index.html:24-26`
29+
- mount surface: `tools/Workspace Manager/index.html:30`
30+
31+
Breakout resolves as valid game launch target and game id exists:
32+
33+
```text
34+
Breakout true /games/Breakout/index.html
35+
launch Breakout /tools/Workspace%20Manager/index.html?gameId=Breakout&mount=game
36+
```
37+
38+
Game-launch init path now leaves visible shell and visible status (`Select a tool to mount.`) instead of blank when no explicit tool is requested:
39+
40+
- `tools/Workspace Manager/main.js:691`
41+
42+
## Proof Multiple `gameId`s Do Not Blank
43+
44+
Resolver and metadata check output:
45+
46+
```text
47+
Breakout true /games/Breakout/index.html
48+
Pong true /games/Pong/index.html
49+
Asteroids true /games/Asteroids/index.html
50+
launch Breakout /tools/Workspace%20Manager/index.html?gameId=Breakout&mount=game
51+
launch Pong /tools/Workspace%20Manager/index.html?gameId=Pong&mount=game
52+
launch Asteroids /tools/Workspace%20Manager/index.html?gameId=Asteroids&mount=game
53+
```
54+
55+
With the always-visible shell in `index.html` plus explicit init status handling in `main.js`, these valid game-launched URLs render visible Workspace Manager content instead of a blank screen.
56+
57+
## Proof Invalid/Missing `gameId` Renders Visible Diagnostic
58+
59+
Diagnostic panel exists in page:
60+
61+
- `tools/Workspace Manager/index.html:24-26`
62+
63+
Missing/invalid game context now writes visible diagnostic messages (not silent):
64+
65+
- missing `gameId` on game launch:
66+
- `tools/Workspace Manager/main.js:602`
67+
- `tools/Workspace Manager/main.js:662`
68+
- invalid `gameId` on game launch:
69+
- `tools/Workspace Manager/main.js:609`
70+
- `tools/Workspace Manager/main.js:669`
71+
72+
Additional boot/view failure diagnostics added:
73+
74+
- mount surface unavailable: `tools/Workspace Manager/main.js:654`
75+
- runtime error: `tools/Workspace Manager/main.js:701`
76+
- unhandled rejection: `tools/Workspace Manager/main.js:709`
77+
- init failure: `tools/Workspace Manager/main.js:716`
78+
- import/load failure diagnostic in `index.html:33-41`
79+
80+
## Proof `gameId || game` Fallback Is Not Restored
81+
82+
Command output:
83+
84+
```text
85+
gameIdOrGame 0
86+
legacyGameParamRead 0
87+
```
88+
89+
- `tools/Workspace Manager/main.js` contains no `gameId || game` and no `searchParams.get("game")` fallback read.
90+
91+
## Proof `toolIds[0]` First-Tool Selection Is Not Restored
92+
93+
Command output:
94+
95+
```text
96+
toolIds0 0
97+
```
98+
99+
- `tools/Workspace Manager/main.js` contains no `toolIds[0]` first-item selection fallback.
100+
101+
## Proof No Fallback/Default Route/View Was Added
102+
103+
- No auto hosted-game mount restoration was added in launch path:
104+
105+
```text
106+
awaitMountGameFrame 0
107+
voidMountGameFrame 0
108+
```
109+
110+
- For game-launch with no explicit tool, code writes explicit status and returns (`tools/Workspace Manager/main.js:621`, `tools/Workspace Manager/main.js:691`) instead of selecting defaults.
111+
- No fallback to legacy `game` query param exists.
112+
113+
## Proof External Launch Memory Clear Remains Intact
114+
115+
Runtime check output:
116+
117+
```text
118+
clearResult true
119+
localAfterClear [ [ 'keep.one', 'x' ] ]
120+
sessionAfterClear [ [ 'keep.two', 'y' ] ]
121+
launchResult true
122+
assignCalls [ '/tools/Workspace%20Manager/index.html?gameId=Breakout&mount=game' ]
123+
localAfterLaunch [ [ 'keep.one', 'x' ] ]
124+
sessionAfterLaunch [ [ 'keep.two', 'y' ] ]
125+
```
126+
127+
- Clear remains in `tools/shared/toolLaunchSSoT.js:121-136`.
128+
- External launch still clears then navigates in `tools/shared/toolLaunchSSoT.js:138-145`.
129+
130+
## Proof Sample `Open <tool>` Behavior Remains Untouched
131+
132+
- Sample label logic remains `Open <tool>` at `samples/index.render.js:104`.
133+
- Sample external launch flow remains `launchWithExternalToolWorkspaceReset(launchHref)` at `samples/index.render.js:539`.
134+
- This BUILD did not modify sample files.
135+
136+
## Static Validation
137+
138+
Commands run:
139+
140+
```bash
141+
node --check tools/Workspace\ Manager/main.js
142+
node --check tools/shared/toolLaunchSSoT.js
143+
node --check games/index.render.js
144+
node --check samples/index.render.js
145+
```
146+
147+
All passed.
148+
149+
## Anti-Pattern Self-Check
150+
151+
- No second SSoT introduced.
152+
- No samples/game label changes introduced.
153+
- No legacy query fallback restored.
154+
- No first-item/default tool selection restored.
155+
- No fallback/default route/view/tool/workspace behavior added.
156+
- No broad Workspace Manager refactor performed.
157+
- No start_of_day files changed.
Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Codex Commands — BUILD_PR_LEVEL_20_14_WORKSPACE_MANAGER_SHOW_TOOLS_ON_GAME_LAUNCH
1+
# Codex Commands — BUILD_PR_LEVEL_20_15_REPAIR_WORKSPACE_MANAGER_BLANK_GAME_LAUNCH
22

33
## Model
44
GPT-5.4 or GPT-5.3-codex
@@ -10,58 +10,60 @@ High
1010

1111
```text
1212
Read docs/dev/codex_rules.md first.
13-
Read docs/dev/specs/TOOL_LAUNCH_SSOT.md if present.
13+
Read docs/dev/reports/workspace_manager_game_launch_tools_view_validation.md if present.
1414
Read docs/dev/reports/workspace_manager_default_query_fallback_removal_validation.md if present.
15+
Read docs/dev/specs/TOOL_LAUNCH_SSOT.md if present.
1516
16-
Execute BUILD_PR_LEVEL_20_14_WORKSPACE_MANAGER_SHOW_TOOLS_ON_GAME_LAUNCH.
17+
Execute BUILD_PR_LEVEL_20_15_REPAIR_WORKSPACE_MANAGER_BLANK_GAME_LAUNCH.
1718
18-
User UAT finding:
19-
- Samples appear to work: Open <tool> opens tool and data appears.
20-
- Games path opens Workspace Manager, but Workspace Manager shows the game, not the tools.
19+
User UAT failure:
20+
- URL renders blank page with no visible error:
21+
tools/Workspace Manager/index.html?gameId=Breakout&mount=game
22+
- Blank occurs for multiple Open with Workspace Manager launches.
2123
2224
Goal:
23-
Fix only the Workspace Manager initial view for game-launched context.
25+
Repair Workspace Manager so valid game-launched URLs render visible Workspace Manager content and invalid context renders visible diagnostics.
2426
2527
Required behavior:
26-
- games/index.html -> Open with Workspace Manager -> tools/Workspace Manager/index.html?gameId=<id>&mount=game
27-
- Workspace Manager opens
28+
- URL tools/Workspace Manager/index.html?gameId=Breakout&mount=game renders visible Workspace Manager page
2829
- explicit gameId context is loaded
2930
- external launch memory is cleared
30-
- initial primary view shows tools/workspace surface for that game context
31-
- it must not immediately show the hosted game surface
32-
- it must not auto-select the first tool
33-
- it must not fallback to game query param
34-
- it must not reuse stale memory
35-
36-
Clarification:
37-
`mount=game` means source/context is game-launched.
38-
It must not force the initial display to the hosted game surface.
31+
- tools/workspace surface is visible for selected game context
32+
- blank page is forbidden
33+
- if boot/context/view fails, render visible diagnostic panel on page
34+
- do not restore gameId || game
35+
- do not restore toolIds[0]
36+
- do not auto-select first tool
37+
- do not fallback to default route/view/tool/workspace
38+
- do not reuse stale memory
3939
40-
Likely target:
40+
Likely files:
41+
- tools/Workspace Manager/index.html
4142
- tools/Workspace Manager/main.js
43+
- directly imported Workspace Manager boot/view helper files only if needed
4244
4345
Forbidden:
4446
- changing samples
4547
- changing labels
46-
- restoring gameId || game
47-
- restoring toolIds[0]
4848
- broad Workspace Manager refactor
4949
- second SSoT
5050
- fallback/default behavior
5151
- start_of_day changes
5252
5353
Validation:
54-
Create docs/dev/reports/workspace_manager_game_launch_tools_view_validation.md with:
54+
Create docs/dev/reports/workspace_manager_blank_game_launch_repair_validation.md with:
5555
- changed files
56-
- proof Open with Workspace Manager still routes to Workspace Manager
57-
- proof explicit gameId is still required
56+
- root cause of blank page
57+
- proof Breakout URL renders visible content
58+
- proof multiple gameIds do not blank
59+
- proof invalid/missing gameId renders visible diagnostic
5860
- proof gameId || game fallback is not restored
5961
- proof toolIds[0] first-tool selection is not restored
60-
- proof external launch memory clear remains intact
61-
- proof initial game-launched Workspace Manager view shows tools/workspace surface, not game surface
62+
- proof no fallback/default route/view was added
63+
- proof external memory clear remains intact
6264
- proof sample Open <tool> behavior remains untouched
6365
- anti-pattern self-check
6466
6567
Return ZIP at:
66-
tmp/BUILD_PR_LEVEL_20_14_WORKSPACE_MANAGER_SHOW_TOOLS_ON_GAME_LAUNCH.zip
68+
tmp/BUILD_PR_LEVEL_20_15_REPAIR_WORKSPACE_MANAGER_BLANK_GAME_LAUNCH.zip
6769
```
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Show tools surface on game-launched Workspace Manager open
1+
Repair Workspace Manager blank game launch
22

33
PR Details:
4-
- Fixes Workspace Manager initial view for games/index.html Open with Workspace Manager.
5-
- Keeps explicit gameId context.
6-
- Keeps memory clear behavior.
7-
- Prevents mount=game from immediately showing the hosted game surface.
8-
- Does not restore fallback/default launch behavior.
4+
- Fixes blank Workspace Manager page for game-launched URLs.
5+
- Requires visible diagnostics for invalid boot/context/view state.
6+
- Preserves explicit gameId behavior.
7+
- Does not restore legacy gameId || game fallback.
8+
- Does not restore first-tool/default selection.
99
- Leaves sample Open <tool> behavior untouched.

0 commit comments

Comments
 (0)