Skip to content

Commit 58a1744

Browse files
author
DavidQ
committed
Fix fullscreen sample capture to exclude Toolbox Aid shell chrome in Preview Generator V2 - PR_26126_032-preview-generator-v2-fullscreen-sample-capture-target
1 parent 9a257bb commit 58a1744

147 files changed

Lines changed: 768 additions & 1044 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/dev/codex_commands.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,51 @@
1-
# Codex Commands - PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix
1+
# Codex Commands - PR_26126_033-preview-generator-v2-paths-stretch-layout
22

33
```bash
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."
4+
codex run "Create PR_26126_033-preview-generator-v2-paths-stretch-layout. Fix Preview Generator V2 layout only. Preserve existing generation behavior. In the left column, make the \"Paths or IDs\" accordion section stretch to fill all remaining vertical space down to the bottom of the panel above \"Last Generated Image\". Implement using flex layout: left panel column must be a flex container with column direction; set the Paths or IDs section to flex-grow:1 and its textarea to height:100% (or flex:1) so it expands fully. Do not use inline styles. Keep Last Generated Image fixed height below it. Do not modify samples. Do not add schema. Produce review artifacts."
55
```
66

77
## Validation Commands
88

9-
```bash
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');"
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');});"
13-
git diff --check
14-
git diff --name-only -- '*.json' tools/shared tools/schemas start_of_day
9+
```powershell
10+
@'
11+
const fs = require('fs');
12+
const html = fs.readFileSync('tools/preview-generator-v2/index.html', 'utf8');
13+
const required = [
14+
'.preview-generator-v2__center-panel .preview-generator-v2__paths-section',
15+
'flex: 1 1 auto;',
16+
'.preview-generator-v2__paths-section .accordion-v2__content',
17+
'height: 100%;',
18+
'.preview-generator-v2__center-panel .preview-generator-v2__last-generated-section',
19+
'flex: 0 0 auto;',
20+
'preview-generator-v2__paths-section is-open'
21+
];
22+
for (const token of required) {
23+
if (!html.includes(token)) throw new Error(`Missing layout token: ${token}`);
24+
}
25+
if (/<[^>]+style=/.test(html)) throw new Error('Inline style attribute found');
26+
console.log('paths stretch layout tokens ok');
27+
'@ | node -
28+
@'
29+
const fs = require('fs');
30+
const html = fs.readFileSync('tools/preview-generator-v2/index.html', 'utf8');
31+
const scripts = [...html.matchAll(/<script(?![^>]*\bsrc=)[^>]*>([\s\S]*?)<\/script>/gi)].map((match) => match[1]);
32+
scripts.forEach((script, index) => {
33+
new Function(script);
34+
console.log(`inline script ${index + 1} syntax ok`);
35+
});
36+
'@ | node -
37+
git diff --check -- tools/preview-generator-v2/index.html docs/dev/codex_commands.md docs/dev/commit_comment.txt docs/dev/reports/codex_review.diff docs/dev/reports/codex_changed_files.txt
1538
npm run test:workspace-v2
16-
npm test
1739
```
1840

1941
## Playwright
2042

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.
43+
No new Playwright test was added. This PR changes Preview Generator V2 layout CSS/section classing only, with existing `accordionV2` behavior unchanged. `npm run test:workspace-v2` is attempted as the standard command if available.
2244

2345
## Test Notes
2446

25-
`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.
47+
`npm run test:workspace-v2` is not defined in the current `package.json`.
2648

2749
## Manual Test
2850

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.
51+
Open Preview Generator V2 and confirm the `Paths or IDs` accordion stretches through the available column height above `Last Generated Image`. Confirm the `Paths or IDs` textarea grows with the section, `Last Generated Image` stays fixed below it, and generation behavior is unchanged.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Remove status accordion affordance and sanitize fullscreen capture CSS colors - PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix
1+
Stretch Preview Generator V2 Paths accordion above fixed Last Generated Image - PR_26126_033-preview-generator-v2-paths-stretch-layout
Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,70 @@
1-
# PR_26126_030-preview-generator-v2-status-header-and-fullscreen-css-fix
1+
# Full git status --short
2+
MM docs/dev/codex_commands.md
3+
MM docs/dev/commit_comment.txt
4+
M docs/dev/reports/codex_changed_files.txt
5+
MM docs/dev/reports/codex_review.diff
6+
M samples/phase-02/0201/assets/images/preview.svg
7+
M samples/phase-02/0202/assets/images/preview.svg
8+
M samples/phase-02/0203/assets/images/preview.svg
9+
M samples/phase-02/0204/assets/images/preview.svg
10+
M samples/phase-02/0205/assets/images/preview.svg
11+
M samples/phase-02/0207/assets/images/preview.svg
12+
M samples/phase-02/0208/assets/images/preview.svg
13+
M samples/phase-02/0209/assets/images/preview.svg
14+
M samples/phase-02/0210/assets/images/preview.svg
15+
M samples/phase-02/0211/assets/images/preview.svg
16+
M samples/phase-02/0212/assets/images/preview.svg
17+
M samples/phase-02/0213/assets/images/preview.svg
18+
M samples/phase-02/0214/assets/images/preview.svg
19+
M samples/phase-02/0215/assets/images/preview.svg
20+
M samples/phase-02/0216/assets/images/preview.svg
21+
M samples/phase-02/0217/assets/images/preview.svg
22+
M samples/phase-02/0219/assets/images/preview.svg
23+
M samples/phase-02/0222/assets/images/preview.svg
24+
M samples/phase-02/0224/assets/images/preview.svg
25+
M samples/phase-02/0225/assets/images/preview.svg
26+
M samples/phase-02/0226/assets/images/preview.svg
27+
M samples/phase-02/0227/assets/images/preview.svg
28+
M samples/phase-12/1212/assets/images/preview.svg
29+
M samples/phase-12/1213/assets/images/preview.svg
30+
M samples/phase-12/1214/assets/images/preview.svg
31+
M samples/phase-12/1215/assets/images/preview.svg
32+
M samples/phase-12/1216/assets/images/preview.svg
33+
M samples/phase-12/1217/assets/images/preview.svg
34+
M samples/phase-12/1218/assets/images/preview.svg
35+
M samples/phase-12/1219/assets/images/preview.svg
36+
M samples/phase-12/1220/assets/images/preview.svg
37+
MM tools/preview-generator-v2/index.html
238

3-
PR_030 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
39+
# PR scoped git diff --cached --stat
40+
docs/dev/codex_commands.md | 44 +++++++++++++++++++++---------
41+
docs/dev/commit_comment.txt | 2 +-
42+
tools/preview-generator-v2/index.html | 51 ++++++++++++++++++++---------------
43+
3 files changed, 62 insertions(+), 35 deletions(-)
944

10-
Validation notes:
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.
15-
- Inline scripts in `tools/preview-generator-v2/index.html` parse successfully with `new Function`.
16-
- `git diff --check` passed for the PR_030 target files.
17-
- `npm run test:workspace-v2` is unavailable because the script is not defined in the current `package.json`.
18-
- `npm test` still fails in the existing shared extraction guard baseline outside this PR scope.
45+
# PR scoped git diff --stat
46+
docs/dev/codex_commands.md | 34 +++---
47+
docs/dev/commit_comment.txt | 2 +-
48+
docs/dev/reports/codex_review.diff | 215 +++++++++++++++++++++++++---------
49+
tools/preview-generator-v2/index.html | 17 ++-
50+
4 files changed, 191 insertions(+), 77 deletions(-)
1951

20-
Existing workspace changes excluded from this PR_030 ZIP:
21-
- Staged PR_028 sample-local README changes.
22-
- Unstaged `samples/phase-12/*/assets/images/preview.svg` changes.
52+
# Full git diff --stat
53+
docs/dev/codex_commands.md | 34 ++--
54+
docs/dev/commit_comment.txt | 2 +-
55+
docs/dev/reports/codex_review.diff | 215 +++++++++++++++++-------
56+
samples/phase-02/0210/assets/images/preview.svg | 6 +-
57+
samples/phase-02/0225/assets/images/preview.svg | 24 +--
58+
samples/phase-02/0226/assets/images/preview.svg | 21 +--
59+
samples/phase-02/0227/assets/images/preview.svg | 21 +--
60+
samples/phase-12/1212/assets/images/preview.svg | 17 +-
61+
samples/phase-12/1213/assets/images/preview.svg | 17 +-
62+
samples/phase-12/1214/assets/images/preview.svg | 17 +-
63+
samples/phase-12/1215/assets/images/preview.svg | 40 +++--
64+
samples/phase-12/1216/assets/images/preview.svg | 40 +++--
65+
samples/phase-12/1217/assets/images/preview.svg | 40 +++--
66+
samples/phase-12/1218/assets/images/preview.svg | 17 +-
67+
samples/phase-12/1219/assets/images/preview.svg | 17 +-
68+
samples/phase-12/1220/assets/images/preview.svg | 17 +-
69+
tools/preview-generator-v2/index.html | 17 +-
70+
17 files changed, 299 insertions(+), 263 deletions(-)

0 commit comments

Comments
 (0)