Skip to content

Commit 9a257bb

Browse files
author
DavidQ
committed
030
1 parent 8090052 commit 9a257bb

5 files changed

Lines changed: 518 additions & 102 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
# Codex Commands - PR_26126_029-preview-generator-v2-fullscreen-native-size
1+
# Codex Commands - PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix
22

33
```bash
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."
4+
codex run "Create PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix. Fix Preview Generator V2 UI/capture only. Preserve existing generation behavior. Status must not render accordion affordances; remove the \"+\" from the Status header. Keep Clear on the same line as Status, but render it as a normal button, not accordion UI. Fix Full Screen capture failure caused by unsupported CSS color(...) values by sanitizing/normalizing unsupported CSS color functions only for the cloned capture DOM before html2canvas runs. Do not change live page styling. Do not fall back silently. Full Screen should succeed when the only blocker is unsupported CSS color(...). Preserve Canvas Only behavior. Do not modify samples. Do not add schema. Produce review artifacts."
55
```
66

77
## Validation Commands
88

99
```bash
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
10+
rg -n "statusAccordion|Status|accordion-v2__icon|preview-generator-v2__status-header-row|preview-generator-v2__status-content|replaceUnsupportedColorFunctions|sanitizeComputedColorStyles|sanitizeClonedToolDocument|onclone" tools/preview-generator-v2/index.html
11+
node -e "const fs=require('fs');const html=fs.readFileSync('tools/preview-generator-v2/index.html','utf8');const status=html.match(/<section id=\"statusAccordion\"[\\s\\S]*?<\\/section>/)?.[0]||'';if(!status)throw new Error('Missing status section');if(status.includes('accordion-v2__icon')||status.includes('accordion-v2__header'))throw new Error('Status still has accordion affordance markup');console.log('status section has no accordion affordance');"
1212
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');});"
1313
git diff --check
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
1514
git diff --name-only -- '*.json' tools/shared tools/schemas start_of_day
1615
npm run test:workspace-v2
1716
npm test
1817
```
1918

2019
## Playwright
2120

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.
21+
No Playwright test was added. This PR changes Preview Generator V2 status header markup and cloned-DOM fullscreen capture sanitization only. `npm run test:workspace-v2` is attempted as the standard command if available.
2322

2423
## Test Notes
2524

2625
`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.
2726

2827
## Manual Test
2928

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.
29+
Open Preview Generator V2 and confirm Status has no accordion plus/minus affordance, with Clear on the same line. Run Full Screen capture against a page whose only blocker is CSS `color(...)` and confirm it no longer fails for that parser error. Recheck Canvas Only capture still works.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Use native viewport sizing for Preview Generator V2 fullscreen capture - PR_26126_029-preview-generator-v2-fullscreen-native-size
1+
Remove status accordion affordance and sanitize fullscreen capture CSS colors - PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
# PR_26126_029-preview-generator-v2-fullscreen-native-size
1+
# PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix
22

3-
PR_029 files:
3+
PR_030 files:
44
- docs/dev/codex_commands.md
55
- docs/dev/commit_comment.txt
66
- docs/dev/reports/codex_changed_files.txt
77
- docs/dev/reports/codex_review.diff
88
- tools/preview-generator-v2/index.html
99

1010
Validation notes:
11-
- Preview Generator V2 no longer contains `1600`, `900`, `1600x900`, `fullscreen1600`, `Full Screen (` or `failed at` in the active tool file.
11+
- Status section no longer contains `accordion-v2__header` or `accordion-v2__icon` markup.
12+
- Clear remains in the Status header row as a normal button.
13+
- Full Screen capture calls `sanitizeClonedToolDocument` from both fullscreen `html2canvas` paths.
14+
- The cloned capture DOM normalizes unsupported CSS `color(...)` values in style elements, CSS rules, inline styles, and computed color-related properties.
1215
- 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.
16+
- `git diff --check` passed for the PR_030 target files.
1417
- `npm run test:workspace-v2` is unavailable because the script is not defined in the current `package.json`.
1518
- `npm test` still fails in the existing shared extraction guard baseline outside this PR scope.
1619

17-
Existing workspace changes excluded from this PR_029 ZIP:
20+
Existing workspace changes excluded from this PR_030 ZIP:
1821
- Staged PR_028 sample-local README changes.
1922
- Unstaged `samples/phase-12/*/assets/images/preview.svg` changes.

0 commit comments

Comments
 (0)