Skip to content

Commit 8090052

Browse files
author
DavidQ
committed
Use native viewport sizing for Preview Generator V2 fullscreen capture - PR_26126_029-preview-generator-v2-fullscreen-native-size
1 parent 4de3f96 commit 8090052

4 files changed

Lines changed: 216 additions & 17666 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
# Codex Commands - PR_26126_028-sample-local-readme-and-fullscreen-capture-fix
1+
# Codex Commands - PR_26126_029-preview-generator-v2-fullscreen-native-size
22

33
```bash
4-
codex run "Create PR_26126_028-sample-local-readme-and-fullscreen-capture-fix. Fix Preview Generator V2 documentation and capture behavior. Add a README.md template under existing sample folders using the pattern samples/phase-xx/XXXX/README.md. The README must explain where the sample implementation actually lives, how the sample folder/index.html launches or bypasses into that code, and how Preview Generator V2 should discover/launch the sample without assuming numeric folders. Do not add a root samples README. Do not modify sample JSON. Also fix Full Screen (1600x900 HTML Page) capture so it does not silently fall back to non-fullscreen capture when html-to-image/html2canvas fails on unsupported CSS color functions such as color(...). For fullscreen mode, capture must either use the intended 1600x900 viewport/full-page path or fail clearly with an actionable error; do not mark OK when fallback was used for fullscreen. Preserve Canvas Only behavior. Produce review artifacts."
4+
codex run "Create PR_26126_029-preview-generator-v2-fullscreen-native-size. Fix Preview Generator V2 fullscreen capture wording and behavior only. Preserve existing generation behavior. Full Screen capture must not require 1600x900; use the actual available fullscreen/browser viewport size. Update Capture mode label from \"Full Screen (1600x900 HTML Page)\" to \"Full Screen\". Remove hardcoded 1600x900 wording from UI, logs, errors, and tests. If fullscreen capture fails, report \"Full Screen capture failed\" with the underlying error, not \"failed at 1600x900\". Preserve Canvas Only behavior. Do not modify samples. Do not add schema. Produce review artifacts."
55
```
66

77
## Validation Commands
88

99
```bash
10-
$sampleDirs = Get-ChildItem samples -Directory -Filter 'phase-*' | Sort-Object Name | ForEach-Object { Get-ChildItem $_.FullName -Directory | Where-Object { $_.Name -match '^\d{4}$' } | Sort-Object FullName }
11-
$missingReadmes = $sampleDirs | Where-Object { !(Test-Path (Join-Path $_.FullName 'README.md')) }
12-
if ($missingReadmes) { $missingReadmes.FullName; throw "Missing sample README files." }
13-
if (Test-Path samples/README.md) { throw "Unexpected root samples/README.md" }
14-
$sampleReadmes = $sampleDirs | ForEach-Object { Join-Path $_.FullName 'README.md' }
15-
rg -n "SAMPLE_LOCAL_CONTRACT_README|Preview Generator V2 discovers samples|SKIP|FAIL|games/<gamename>|index.html is the only discovery" $sampleReadmes
16-
rg -n "Full Screen capture failed|html2canvas may not support CSS color functions|extractBestToolFallbackSvg|using fallback" tools/preview-generator-v2/index.html
10+
rg -n "1600|900|1600x900|fullscreen1600|Full Screen \\(|failed at" tools/preview-generator-v2/index.html
11+
rg -n "Full Screen capture failed|Full Screen|Canvas Only|fullscreen|getAvailableFullScreenCaptureSize|extractFullPageSvg" tools/preview-generator-v2/index.html
12+
node -e "const fs=require('fs');const html=fs.readFileSync('tools/preview-generator-v2/index.html','utf8');const scripts=[...html.matchAll(/<script(?![^>]*\\bsrc=)[^>]*>([\\s\\S]*?)<\\/script>/gi)].map(m=>m[1]);scripts.forEach((script,i)=>{new Function(script);console.log('inline script '+(i+1)+' syntax ok');});"
1713
git diff --check
18-
git diff --cached --name-only -- '*.json' start_of_day tools/shared tools/schemas
14+
git diff --name-only -- tools/preview-generator-v2/index.html docs/dev/codex_commands.md docs/dev/commit_comment.txt docs/dev/reports/codex_changed_files.txt docs/dev/reports/codex_review.diff
15+
git diff --name-only -- '*.json' tools/shared tools/schemas start_of_day
1916
npm run test:workspace-v2
2017
npm test
21-
npm run codex:review-artifacts
2218
```
2319

2420
## Playwright
2521

26-
No Playwright test was added. This PR changes documentation and Preview Generator V2 fullscreen capture error handling only. `npm run test:workspace-v2` was attempted but is not defined in the current `package.json`.
22+
No Playwright test was added. This PR changes Preview Generator V2 fullscreen capture wording and capture sizing only. `npm run test:workspace-v2` is attempted as the standard command if available.
2723

2824
## Test Notes
2925

30-
`npm test` was attempted as the available default test gate and failed in the existing shared extraction guard baseline before this PR's changed Preview Generator V2 code or README files were involved. The reported violations are outside this PR scope.
26+
`npm run test:workspace-v2` is not defined in the current `package.json`. `npm test` was attempted and still fails in the existing shared extraction guard baseline, outside this PR scope.
3127

3228
## Manual Test
3329

34-
Use Preview Generator V2 with Canvas Only to confirm existing canvas capture still works. Use Full Screen (1600x900 HTML Page) on a target with unsupported CSS color functions and confirm it logs a clear `FAIL` instead of silently falling back to a non-fullscreen capture.
30+
Use Preview Generator V2 with Canvas Only to confirm existing canvas capture still works. Use Full Screen on a target with unsupported fullscreen capture CSS and confirm it logs `Full Screen capture failed: <underlying error>` without fallback or fixed-size wording.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Document sample-local contracts and harden fullscreen preview capture - PR_26126_028-sample-local-readme-and-fullscreen-capture-fix
1+
Use native viewport sizing for Preview Generator V2 fullscreen capture - PR_26126_029-preview-generator-v2-fullscreen-native-size
Lines changed: 18 additions & 281 deletions
Original file line numberDiff line numberDiff line change
@@ -1,282 +1,19 @@
1-
# git status --short
2-
M docs/dev/codex_commands.md
3-
M docs/dev/commit_comment.txt
4-
A samples/phase-01/0101/README.md
5-
A samples/phase-01/0102/README.md
6-
A samples/phase-01/0103/README.md
7-
A samples/phase-01/0104/README.md
8-
A samples/phase-01/0105/README.md
9-
A samples/phase-01/0106/README.md
10-
A samples/phase-01/0107/README.md
11-
A samples/phase-01/0108/README.md
12-
M samples/phase-01/0109/README.md
13-
M samples/phase-01/0110/README.md
14-
M samples/phase-01/0111/README.md
15-
M samples/phase-01/0112/README.md
16-
M samples/phase-01/0113/README.md
17-
M samples/phase-01/0114/README.md
18-
M samples/phase-01/0115/README.md
19-
M samples/phase-01/0116/README.md
20-
M samples/phase-01/0117/README.md
21-
M samples/phase-01/0118/README.md
22-
M samples/phase-01/0119/README.md
23-
M samples/phase-01/0120/README.md
24-
M samples/phase-01/0121/README.md
25-
M samples/phase-01/0122/README.md
26-
M samples/phase-01/0123/README.md
27-
M samples/phase-01/0124/README.md
28-
M samples/phase-02/0201/README.md
29-
M samples/phase-02/0202/README.md
30-
M samples/phase-02/0203/README.md
31-
M samples/phase-02/0204/README.md
32-
M samples/phase-02/0205/README.md
33-
M samples/phase-02/0206/README.md
34-
M samples/phase-02/0207/README.md
35-
M samples/phase-02/0208/README.md
36-
M samples/phase-02/0209/README.md
37-
M samples/phase-02/0210/README.md
38-
M samples/phase-02/0211/README.md
39-
M samples/phase-02/0212/README.md
40-
M samples/phase-02/0213/README.md
41-
M samples/phase-02/0214/README.md
42-
M samples/phase-02/0215/README.md
43-
M samples/phase-02/0216/README.md
44-
M samples/phase-02/0217/README.md
45-
M samples/phase-02/0218/README.md
46-
M samples/phase-02/0219/README.md
47-
M samples/phase-02/0220/README.md
48-
M samples/phase-02/0221/README.md
49-
M samples/phase-02/0222/README.md
50-
M samples/phase-02/0223/README.md
51-
M samples/phase-02/0224/README.md
52-
A samples/phase-02/0225/README.md
53-
M samples/phase-02/0226/README.md
54-
M samples/phase-02/0227/README.md
55-
M samples/phase-03/0301/README.md
56-
M samples/phase-03/0302/README.md
57-
M samples/phase-03/0303/README.md
58-
M samples/phase-03/0304/README.md
59-
M samples/phase-03/0305/README.md
60-
M samples/phase-03/0306/README.md
61-
M samples/phase-03/0307/README.md
62-
M samples/phase-03/0308/README.md
63-
M samples/phase-03/0309/README.md
64-
M samples/phase-03/0310/README.md
65-
M samples/phase-03/0311/README.md
66-
M samples/phase-03/0312/README.md
67-
M samples/phase-03/0313/README.md
68-
M samples/phase-03/0314/README.md
69-
M samples/phase-03/0315/README.md
70-
M samples/phase-03/0316/README.md
71-
M samples/phase-03/0317/README.md
72-
M samples/phase-03/0318/README.md
73-
M samples/phase-03/0319/README.md
74-
M samples/phase-03/0320/README.md
75-
M samples/phase-03/0321/README.md
76-
M samples/phase-03/0322/README.md
77-
M samples/phase-03/0323/README.md
78-
M samples/phase-03/0324/README.md
79-
A samples/phase-03/0325/README.md
80-
A samples/phase-03/0326/README.md
81-
A samples/phase-03/0327/README.md
82-
M samples/phase-04/0401/README.md
83-
M samples/phase-04/0402/README.md
84-
M samples/phase-04/0403/README.md
85-
M samples/phase-04/0404/README.md
86-
M samples/phase-04/0405/README.md
87-
M samples/phase-04/0406/README.md
88-
M samples/phase-04/0407/README.md
89-
M samples/phase-04/0408/README.md
90-
M samples/phase-04/0409/README.md
91-
M samples/phase-04/0410/README.md
92-
M samples/phase-04/0411/README.md
93-
M samples/phase-04/0412/README.md
94-
A samples/phase-04/0413/README.md
95-
A samples/phase-05/0501/README.md
96-
A samples/phase-05/0502/README.md
97-
A samples/phase-05/0503/README.md
98-
A samples/phase-05/0504/README.md
99-
A samples/phase-05/0505/README.md
100-
A samples/phase-05/0506/README.md
101-
A samples/phase-05/0507/README.md
102-
A samples/phase-05/0508/README.md
103-
A samples/phase-05/0509/README.md
104-
A samples/phase-05/0510/README.md
105-
A samples/phase-05/0511/README.md
106-
A samples/phase-05/0512/README.md
107-
A samples/phase-06/0601/README.md
108-
A samples/phase-06/0602/README.md
109-
A samples/phase-06/0603/README.md
110-
A samples/phase-06/0604/README.md
111-
A samples/phase-06/0605/README.md
112-
A samples/phase-06/0606/README.md
113-
A samples/phase-06/0607/README.md
114-
A samples/phase-06/0608/README.md
115-
A samples/phase-06/0609/README.md
116-
A samples/phase-06/0610/README.md
117-
A samples/phase-06/0611/README.md
118-
A samples/phase-06/0612/README.md
119-
A samples/phase-06/0613/README.md
120-
A samples/phase-06/0614/README.md
121-
A samples/phase-07/0701/README.md
122-
A samples/phase-07/0702/README.md
123-
A samples/phase-07/0703/README.md
124-
A samples/phase-07/0704/README.md
125-
A samples/phase-07/0705/README.md
126-
A samples/phase-07/0706/README.md
127-
A samples/phase-07/0707/README.md
128-
A samples/phase-07/0708/README.md
129-
A samples/phase-07/0709/README.md
130-
A samples/phase-07/0710/README.md
131-
A samples/phase-07/0711/README.md
132-
A samples/phase-07/0712/README.md
133-
A samples/phase-07/0713/README.md
134-
A samples/phase-08/0801/README.md
135-
A samples/phase-08/0802/README.md
136-
A samples/phase-08/0803/README.md
137-
A samples/phase-08/0804/README.md
138-
A samples/phase-08/0805/README.md
139-
A samples/phase-08/0806/README.md
140-
A samples/phase-08/0807/README.md
141-
A samples/phase-08/0808/README.md
142-
A samples/phase-08/0809/README.md
143-
A samples/phase-08/0810/README.md
144-
A samples/phase-09/0901/README.md
145-
A samples/phase-09/0902/README.md
146-
A samples/phase-09/0903/README.md
147-
A samples/phase-09/0904/README.md
148-
A samples/phase-09/0905/README.md
149-
A samples/phase-09/0906/README.md
150-
A samples/phase-10/1001/README.md
151-
A samples/phase-10/1002/README.md
152-
A samples/phase-10/1003/README.md
153-
A samples/phase-11/1101/README.md
154-
A samples/phase-11/1102/README.md
155-
A samples/phase-11/1103/README.md
156-
A samples/phase-11/1104/README.md
157-
A samples/phase-11/1105/README.md
158-
A samples/phase-11/1106/README.md
159-
M samples/phase-12/1201/README.md
160-
M samples/phase-12/1202/README.md
161-
M samples/phase-12/1203/README.md
162-
M samples/phase-12/1204/README.md
163-
M samples/phase-12/1205/README.md
164-
M samples/phase-12/1206/README.md
165-
M samples/phase-12/1207/README.md
166-
M samples/phase-12/1208/README.md
167-
A samples/phase-12/1209/README.md
168-
A samples/phase-12/1210/README.md
169-
A samples/phase-12/1211/README.md
170-
A samples/phase-12/1212/README.md
171-
M samples/phase-12/1212/assets/images/preview.svg
172-
A samples/phase-12/1213/README.md
173-
M samples/phase-12/1213/assets/images/preview.svg
174-
A samples/phase-12/1214/README.md
175-
M samples/phase-12/1214/assets/images/preview.svg
176-
A samples/phase-12/1215/README.md
177-
M samples/phase-12/1215/assets/images/preview.svg
178-
A samples/phase-12/1216/README.md
179-
M samples/phase-12/1216/assets/images/preview.svg
180-
A samples/phase-12/1217/README.md
181-
M samples/phase-12/1217/assets/images/preview.svg
182-
A samples/phase-12/1218/README.md
183-
M samples/phase-12/1218/assets/images/preview.svg
184-
A samples/phase-12/1219/README.md
185-
M samples/phase-12/1219/assets/images/preview.svg
186-
A samples/phase-12/1220/README.md
187-
M samples/phase-12/1220/assets/images/preview.svg
188-
A samples/phase-13/1301/README.md
189-
A samples/phase-13/1302/README.md
190-
A samples/phase-13/1303/README.md
191-
A samples/phase-13/1304/README.md
192-
A samples/phase-13/1305/README.md
193-
A samples/phase-13/1306/README.md
194-
A samples/phase-13/1307/README.md
195-
A samples/phase-13/1308/README.md
196-
A samples/phase-13/1309/README.md
197-
A samples/phase-13/1310/README.md
198-
A samples/phase-13/1311/README.md
199-
A samples/phase-13/1312/README.md
200-
A samples/phase-13/1313/README.md
201-
A samples/phase-13/1314/README.md
202-
A samples/phase-13/1315/README.md
203-
A samples/phase-13/1316/README.md
204-
A samples/phase-13/1317/README.md
205-
A samples/phase-13/1318/README.md
206-
A samples/phase-13/1319/README.md
207-
A samples/phase-13/1320/README.md
208-
A samples/phase-14/1401/README.md
209-
A samples/phase-14/1402/README.md
210-
A samples/phase-14/1403/README.md
211-
A samples/phase-14/1404/README.md
212-
A samples/phase-14/1405/README.md
213-
A samples/phase-14/1406/README.md
214-
A samples/phase-14/1407/README.md
215-
A samples/phase-14/1408/README.md
216-
A samples/phase-14/1409/README.md
217-
A samples/phase-14/1410/README.md
218-
A samples/phase-14/1411/README.md
219-
A samples/phase-14/1412/README.md
220-
A samples/phase-14/1413/README.md
221-
A samples/phase-14/1414/README.md
222-
A samples/phase-14/1415/README.md
223-
A samples/phase-14/1416/README.md
224-
A samples/phase-14/1417/README.md
225-
A samples/phase-14/1418/README.md
226-
A samples/phase-15/1501/README.md
227-
A samples/phase-15/1502/README.md
228-
A samples/phase-15/1503/README.md
229-
A samples/phase-15/1504/README.md
230-
A samples/phase-15/1505/README.md
231-
A samples/phase-15/1506/README.md
232-
A samples/phase-16/1601/README.md
233-
A samples/phase-16/1602/README.md
234-
A samples/phase-16/1603/README.md
235-
A samples/phase-16/1604/README.md
236-
A samples/phase-16/1605/README.md
237-
A samples/phase-16/1606/README.md
238-
A samples/phase-16/1607/README.md
239-
A samples/phase-16/1608/README.md
240-
A samples/phase-16/1609/README.md
241-
A samples/phase-16/1610/README.md
242-
A samples/phase-16/1611/README.md
243-
A samples/phase-16/1612/README.md
244-
A samples/phase-16/1613/README.md
245-
A samples/phase-16/1614/README.md
246-
A samples/phase-16/1615/README.md
247-
A samples/phase-16/1616/README.md
248-
A samples/phase-16/1617/README.md
249-
A samples/phase-16/1618/README.md
250-
A samples/phase-16/1619/README.md
251-
A samples/phase-16/1620/README.md
252-
A samples/phase-16/1621/README.md
253-
A samples/phase-16/1622/README.md
254-
A samples/phase-17/1701/README.md
255-
A samples/phase-17/1702/README.md
256-
A samples/phase-17/1703/README.md
257-
A samples/phase-17/1704/README.md
258-
A samples/phase-17/1705/README.md
259-
A samples/phase-17/1706/README.md
260-
A samples/phase-17/1707/README.md
261-
A samples/phase-17/1708/README.md
262-
A samples/phase-17/1709/README.md
263-
A samples/phase-17/1710/README.md
264-
A samples/phase-17/1711/README.md
265-
A samples/phase-17/1712/README.md
266-
A samples/phase-17/1713/README.md
267-
A samples/phase-18/1801/README.md
268-
A samples/phase-19/1901/README.md
269-
A samples/phase-19/1902/README.md
270-
M tools/preview-generator-v2/index.html
1+
# PR_26126_029-preview-generator-v2-fullscreen-native-size
2712

272-
# git diff --stat
273-
samples/phase-12/1212/assets/images/preview.svg | 17 ++---------
274-
samples/phase-12/1213/assets/images/preview.svg | 17 ++---------
275-
samples/phase-12/1214/assets/images/preview.svg | 17 ++---------
276-
samples/phase-12/1215/assets/images/preview.svg | 40 ++++++++++++++++---------
277-
samples/phase-12/1216/assets/images/preview.svg | 40 ++++++++++++++++---------
278-
samples/phase-12/1217/assets/images/preview.svg | 40 ++++++++++++++++---------
279-
samples/phase-12/1218/assets/images/preview.svg | 17 ++---------
280-
samples/phase-12/1219/assets/images/preview.svg | 17 ++---------
281-
samples/phase-12/1220/assets/images/preview.svg | 17 ++---------
282-
9 files changed, 96 insertions(+), 126 deletions(-)
3+
PR_029 files:
4+
- docs/dev/codex_commands.md
5+
- docs/dev/commit_comment.txt
6+
- docs/dev/reports/codex_changed_files.txt
7+
- docs/dev/reports/codex_review.diff
8+
- tools/preview-generator-v2/index.html
9+
10+
Validation notes:
11+
- Preview Generator V2 no longer contains `1600`, `900`, `1600x900`, `fullscreen1600`, `Full Screen (` or `failed at` in the active tool file.
12+
- Inline scripts in `tools/preview-generator-v2/index.html` parse successfully with `new Function`.
13+
- `git diff --check` passed for the PR_029 target files.
14+
- `npm run test:workspace-v2` is unavailable because the script is not defined in the current `package.json`.
15+
- `npm test` still fails in the existing shared extraction guard baseline outside this PR scope.
16+
17+
Existing workspace changes excluded from this PR_029 ZIP:
18+
- Staged PR_028 sample-local README changes.
19+
- Unstaged `samples/phase-12/*/assets/images/preview.svg` changes.

0 commit comments

Comments
 (0)