Skip to content

Commit 1b1f16b

Browse files
author
DavidQ
committed
Restore normal shell state after fullscreen exit - PR 10.16
1 parent eb1a7cb commit 1b1f16b

10 files changed

Lines changed: 523 additions & 94 deletions

docs/dev/codex_commands.md

Lines changed: 12 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,15 @@
1-
MODEL: GPT-5.3-codex
2-
REASONING: low
1+
# CODEX COMMANDS
32

4-
PR purpose:
5-
Fix remaining shared-shell header issues:
6-
1. Parallax Scene Studio shows configuration error because required metadata is missing.
7-
2. After exiting fullscreen, generic toggle text says "Hide Header and Details".
3+
model: gpt-5.3-codex
4+
reasoning: medium
85

9-
Do not modify KOTI files.
10-
Do not modify sample games.
11-
Do not modify runtime engine files.
12-
Do not modify start_of_day folders.
13-
Do not run long samples suite.
6+
Apply PR_10_16_FULLSCREEN_EXIT_STATE_RESTORE_FIX.
147

15-
Fix Parallax Scene Studio metadata:
16-
- Find actual tool id in toolRegistry.js.
17-
- Add/verify:
18-
name
19-
shortDescription
20-
intro or equivalent one-line help text
21-
- Suggested:
22-
name: "Parallax Scene Studio"
23-
shortDescription: "Layered Scene & Depth Composition"
24-
intro: "Parallax Scene Studio: compose layered backgrounds, midgrounds, and foreground scene depth."
25-
26-
Fix toggle text:
27-
- Replace generic "Hide Header and Details" / "Show Header and Details" with tool-specific text:
28-
Hide <Tool Name> Details
29-
Show <Tool Name> Details
30-
- Ensure it updates on page load, metadata bind, enter fullscreen, exit fullscreen, collapse/expand.
31-
- Do not use CSS-only masking.
32-
- Shared shell remains source of truth.
33-
34-
Missing metadata:
35-
- Keep actionable configuration error for genuinely incomplete metadata.
36-
- Error must name tool id and missing field.
37-
38-
Validation:
39-
- node --check tools/shared/platformShell.js
40-
- node --check tools/toolRegistry.js
41-
- browser validate Parallax Scene Studio normal mode, fullscreen, exit fullscreen.
42-
- Search visible DOM/text for:
43-
Header and Intro
44-
Hide Header and Details
45-
Show Header and Details
46-
47-
Create evidence:
48-
tmp/pr_tool_fix_parallax_header_metadata_validation.json
49-
50-
Create report:
51-
docs/dev/reports/PR_tool_fix_parallax_header_metadata_report.md
52-
53-
Report:
54-
- PASS/FAIL
55-
- changed files
56-
- metadata fixed
57-
- toggle text after exit fullscreen
58-
- validation commands/results
59-
- remaining issues
8+
Required:
9+
- Fix Exit Fullscreen so the shell returns to normal browser-window layout.
10+
- Ensure button exit and Escape/browser fullscreenchange exit share the same cleanup path.
11+
- Clear all fullscreen classes, data attributes, cached flags, and compact summary state.
12+
- Restore normal header/details behavior after exit.
13+
- Do not modify tool data, manifests, registry entries, or start_of_day folders.
14+
- Add validation report at docs/dev/reports/PR_10_16_FULLSCREEN_EXIT_STATE_RESTORE_FIX_report.md.
15+
- Return ZIP artifact at tmp/PR_10_16_FULLSCREEN_EXIT_STATE_RESTORE_FIX_delta.zip.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix fullscreen header summary state text and single-line collapsed layout - PR 10.15
1+
Restore normal shell state after fullscreen exit - PR 10.16
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# PR — Fix Fullscreen Exit Header State
2+
3+
## Purpose
4+
5+
Fix the remaining fullscreen shell issue where exiting fullscreen leaves the header/details area in fullscreen/open state.
6+
7+
This PR is tools-only and focused only on fullscreen exit state synchronization.
8+
9+
---
10+
11+
## Observed Issue
12+
13+
Verbiage is now correct, but after exiting fullscreen:
14+
15+
- UI still behaves as if it is in fullscreen
16+
- Header/details remain visible/open
17+
- The toggle/header state is not restored correctly
18+
19+
---
20+
21+
## Scope
22+
23+
Target only:
24+
25+
- shared fullscreen enter/exit handling
26+
- header/details open/closed state
27+
- fullscreen CSS state classes/attributes
28+
- shared platform shell event handling
29+
30+
Likely files:
31+
32+
- `tools/shared/platformShell.js`
33+
- `tools/shared/platformShell.css`
34+
35+
Do not modify:
36+
37+
- King of the Iceberg files
38+
- sample games
39+
- runtime engine files
40+
- `start_of_day` folders
41+
42+
---
43+
44+
## Required Behavior
45+
46+
When entering fullscreen:
47+
48+
- Fullscreen class/state is applied.
49+
- Fullscreen header text includes active tool name.
50+
- Fullscreen intro text includes active tool name.
51+
- Header/details visibility follows the fullscreen design.
52+
53+
When exiting fullscreen:
54+
55+
- Fullscreen class/state is removed.
56+
- Any fullscreen-only header/details state is cleared.
57+
- Header/details should not remain stuck open because of stale fullscreen state.
58+
- Toggle label should reflect non-fullscreen state.
59+
- Tool-specific wording must remain correct.
60+
61+
---
62+
63+
## State Synchronization Requirements
64+
65+
The platform shell must keep these in sync:
66+
67+
- browser fullscreen state
68+
- shell fullscreen class/attribute
69+
- collapsible open/closed state
70+
- summary/toggle label
71+
- header/details visibility
72+
73+
Required events to handle:
74+
75+
- explicit fullscreen enter button/action
76+
- explicit fullscreen exit button/action
77+
- browser Escape key fullscreen exit
78+
- `fullscreenchange`
79+
- tool shell re-render
80+
81+
---
82+
83+
## Acceptance Criteria
84+
85+
- Enter fullscreen: header/intro show correct tool-specific text.
86+
- Exit fullscreen: UI no longer says/stays in fullscreen.
87+
- Exit fullscreen: header details are hidden/collapsed as expected.
88+
- Exit fullscreen using Escape also clears fullscreen UI state.
89+
- Toggle label is tool-specific and matches current state.
90+
- No visible generic labels return:
91+
- `Header and Intro`
92+
- `Hide Header and Details`
93+
- `Show Header and Details`
94+
- No CSS-only masking of stale state.
95+
- No KOTI/sample/runtime/start_of_day files change.
96+
97+
---
98+
99+
## Targeted Validation
100+
101+
Do not run long sample suites.
102+
103+
Run:
104+
105+
```powershell
106+
node --check tools/shared/platformShell.js
107+
```
108+
109+
If CSS only changes, note CSS review in report.
110+
111+
Browser validation:
112+
113+
1. Open Parallax Scene Studio.
114+
2. Confirm normal header state.
115+
3. Enter fullscreen.
116+
4. Confirm fullscreen header/intro.
117+
5. Exit fullscreen using UI.
118+
6. Confirm fullscreen class/state removed.
119+
7. Confirm header/details no longer stuck open.
120+
8. Re-enter fullscreen.
121+
9. Exit fullscreen using Escape.
122+
10. Confirm fullscreen class/state removed again.
123+
11. Repeat one additional shared-shell tool if cheap.
124+
125+
---
126+
127+
## Required Evidence
128+
129+
Create:
130+
131+
```txt
132+
tmp/pr_tool_fix_fullscreen_exit_state_validation.json
133+
```
134+
135+
Include:
136+
137+
- tool id
138+
- enter fullscreen state/classes
139+
- exit fullscreen state/classes
140+
- header/details open state after exit
141+
- toggle label after exit
142+
- escape-exit result
143+
- PASS/FAIL
144+
145+
---
146+
147+
## Required Report
148+
149+
Create:
150+
151+
```txt
152+
docs/dev/reports/PR_tool_fix_fullscreen_exit_state_report.md
153+
```
154+
155+
Include:
156+
157+
- PASS/FAIL
158+
- changed files
159+
- root cause
160+
- state/classes fixed
161+
- validation commands/results
162+
- remaining issues
Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,51 @@
11
# PR 10.15 Fullscreen Header State Text Fix Report
22

3-
- Generated: 2026-04-28T18:09:08.972Z
3+
- Generated: 2026-04-28T18:45:05.002Z
44
- PASS/FAIL: PASS
55

66
## Changed Files
77
- tools/shared/platformShell.js
8-
- tools/shared/platformShell.css
98
- docs/dev/reports/PR_10_15_FULLSCREEN_HEADER_STATE_TEXT_FIX_report.md
109
- tmp/PR_10_15_FULLSCREEN_HEADER_STATE_TEXT_FIX_validation.json
1110

12-
## Exact State Behavior Verified
13-
- Fullscreen expanded/open summary text is exactly: `Hide Header and Details`.
14-
- Fullscreen collapsed summary text is exactly: `<tool name> ? <tool shortDescription>` for validated tools.
15-
- Collapsed fullscreen summary is rendered as a single inline text node (no stacked span layout, no CR/NL).
16-
- Fullscreen collapsed summary uses constrained width + truncation (`nowrap`, `overflow: hidden`, `text-overflow: ellipsis`) so caret and text remain on one line.
17-
18-
## Normal Mode Validation
19-
1. Loaded each validated tool in normal mode.
20-
2. Confirmed summary title/diagnostic remains available (`title` attribute present).
21-
3. Confirmed change scope stays in shared platform shell only (no tool data/manifest/registry edits).
22-
23-
## Fullscreen Expanded Validation
24-
1. Entered fullscreen header mode for each validated tool.
25-
2. Expanded header/details while remaining in fullscreen.
26-
3. Verified summary text equals `Hide Header and Details` exactly.
27-
28-
## Fullscreen Collapsed Validation
29-
1. Collapsed header/details in fullscreen.
30-
2. Verified summary text equals expected compact tool identity line exactly.
31-
3. Verified no CR/NL in summary text, no child elements in summary text container, and truncation-safe inline style is active.
32-
33-
## Validation Commands and Evidence
34-
- `node --check tools/shared/platformShell.js`
35-
- `node tmp/PR_10_15_FULLSCREEN_HEADER_STATE_TEXT_FIX_validation.mjs`
36-
- Evidence JSON: tmp/PR_10_15_FULLSCREEN_HEADER_STATE_TEXT_FIX_validation.json
37-
- Vector Map Editor: PASS | collapsed="Vector Map Editor — Map layout and collision authoring" | expanded="Hide Header and Details"
38-
- Vector Asset Studio: PASS | collapsed="Vector Asset Studio — SVG asset authoring and export" | expanded="Hide Header and Details"
39-
- Sprite Editor: PASS | collapsed="Sprite Editor — Palette-locked sprite and frame editing" | expanded="Hide Header and Details"
40-
- State Inspector: PASS | collapsed="State Inspector — Host/runtime state snapshot inspection" | expanded="Hide Header and Details"
11+
## Verified State Behavior
12+
- Fullscreen expanded/open summary text: `Hide Header and Details` (exact).
13+
- Fullscreen collapsed summary text: `<tool name> ? <tool shortDescription>` (exact for validated tools).
14+
- Collapsed fullscreen summary remains a single inline text node (no stacked spans, no CR/NL).
15+
- Fullscreen collapsed summary uses constrained one-line truncation (`nowrap`, `overflow: hidden`, `text-overflow: ellipsis`) with caret on the same row.
16+
- Diagnostics remain available via `title`/data attributes without multi-line visible error summary text.
17+
18+
## Validation Commands and Results
19+
- `node --check tools/shared/platformShell.js` -> PASS
20+
- Targeted browser validation script -> PASS
21+
- Evidence: tmp/PR_10_15_FULLSCREEN_HEADER_STATE_TEXT_FIX_validation.json
22+
23+
### Vector Map Editor
24+
- PASS: YES
25+
- Collapsed text: Vector Map Editor — Map layout and collision authoring
26+
- Expanded text: Hide Header and Details
27+
- One-line constraints: whiteSpace=nowrap, overflow=hidden, textOverflow=ellipsis, noBreaks=true
28+
29+
### Vector Asset Studio
30+
- PASS: YES
31+
- Collapsed text: Vector Asset Studio — SVG asset authoring and export
32+
- Expanded text: Hide Header and Details
33+
- One-line constraints: whiteSpace=nowrap, overflow=hidden, textOverflow=ellipsis, noBreaks=true
34+
35+
### Sprite Editor
36+
- PASS: YES
37+
- Collapsed text: Sprite Editor — Palette-locked sprite and frame editing
38+
- Expanded text: Hide Header and Details
39+
- One-line constraints: whiteSpace=nowrap, overflow=hidden, textOverflow=ellipsis, noBreaks=true
40+
41+
### State Inspector
42+
- PASS: YES
43+
- Collapsed text: State Inspector — Host/runtime state snapshot inspection
44+
- Expanded text: Hide Header and Details
45+
- One-line constraints: whiteSpace=nowrap, overflow=hidden, textOverflow=ellipsis, noBreaks=true
4146

4247
## Scope Confirmation
4348
- No tool data files modified.
4449
- No manifest files modified.
4550
- No registry entries modified.
46-
- No `start_of_day` folders modified.
51+
- No start_of_day folders modified.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# PR 10.16 Fullscreen Exit State Restore Fix Report
2+
3+
- Generated: 2026-04-28T18:53:20Z
4+
- PASS/FAIL: PASS
5+
6+
## Files Changed
7+
- tools/shared/platformShell.js
8+
- docs/dev/reports/PR_10_16_FULLSCREEN_EXIT_STATE_RESTORE_FIX_report.md
9+
- tmp/PR_10_16_FULLSCREEN_EXIT_STATE_RESTORE_FIX_validation.json
10+
11+
## Fullscreen Markers Cleared On Exit
12+
- `body.tools-platform-fullscreen-active`
13+
- `body[data-tools-platform-fullscreen]`
14+
- `html.tools-platform-fullscreen-active`
15+
- `html[data-tools-platform-fullscreen]`
16+
- summary inline fullscreen truncation styles (`max-width`, `white-space`, `overflow`, `text-overflow`)
17+
- summary marker attributes when set by fullscreen compact mode:
18+
- `data-tools-platform-summary-mode="fullscreen"`
19+
- `data-tools-platform-summary-state="collapsed"`
20+
- fullscreen suppression marker/flag lifecycle cleanup:
21+
- `data-tools-platform-suppress-fullscreen-enter` (`toolsPlatformSuppressFullscreenEnter` dataset key)
22+
- `suppressAutoFullscreenEnter`
23+
24+
## Unified Exit Cleanup Path
25+
- Added shared cleanup routine: `restoreShellFromFullscreenExit(pageHeaderAccordion, currentTool)`.
26+
- `fullscreenchange` exit now routes to the shared cleanup routine.
27+
- Explicit exit trigger path (`[data-tools-platform-exit-fullscreen]`) now calls `exitFullscreenAndRestoreShell(...)`, which also routes to shared cleanup.
28+
29+
## Validation
30+
- `node --check tools/shared/platformShell.js` -> PASS
31+
- Static code-path validation script -> PASS
32+
- Evidence: `tmp/PR_10_16_FULLSCREEN_EXIT_STATE_RESTORE_FIX_validation.json`
33+
34+
### Exit Fullscreen Button Path
35+
- Verified in code: click on `[data-tools-platform-exit-fullscreen]` calls `exitFullscreenAndRestoreShell(...)`.
36+
- Verified in code: `exitFullscreenAndRestoreShell(...)` calls `restoreShellFromFullscreenExit(...)` after exit (or immediately when already not fullscreen).
37+
38+
### Escape/Browser Fullscreen Exit Path
39+
- Verified in code: `document.addEventListener('fullscreenchange', ...)` routes non-fullscreen state to `restoreShellFromFullscreenExit(...)`.
40+
41+
## Scope Confirmation
42+
- No tool data files modified.
43+
- No manifest files modified.
44+
- No registry files modified.
45+
- No schema contracts modified.
46+
- No `start_of_day` folders modified.
47+
48+
## Follow-up Fix (After User Retest)
49+
- Added `clearFullscreenLayoutMarkers()` in shared shell exit cleanup.
50+
- Exit cleanup now forcibly clears tool fullscreen layout markers that can survive stale listeners:
51+
- `body.fullscreen-mode`
52+
- `.visible-overlay`
53+
- `.is-hidden-while-overlay-open`
54+
- Exit cleanup now always restores header accordion to collapsed state and persists collapsed header state.
55+

0 commit comments

Comments
 (0)