|
| 1 | +# PR_26163_083-assets-upload-cleanup-fixes |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | + |
| 5 | +- PASS: Current branch is `main`. |
| 6 | +- PASS: Expected branch is `main`. |
| 7 | +- PASS: Local branches found: `main`. |
| 8 | +- PASS: Worktree was clean before implementation. |
| 9 | + |
| 10 | +## Requirement Checklist |
| 11 | + |
| 12 | +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before changes. |
| 13 | +- PASS: Continued `PR_26163_083-assets-upload-cleanup-fixes` from the user-provided BUILD input. No existing `083` PR/report file was present before this run; prior assets reports through `082` were used only as continuity context. |
| 14 | +- PASS: Removed the right-column Upload Diagnostics accordion from `toolbox/assets/index.html`. |
| 15 | +- PASS: Removed the right-column upload diagnostics DOM selectors and close handler from `toolbox/assets/assets.js`. |
| 16 | +- PASS: Upload progress and diagnostics now render only in the inline upload progress section under the active asset type table. |
| 17 | +- PASS: Successful all-OK uploads leave only compact inline success status in the relevant asset type area. |
| 18 | +- PASS: Upload FAIL/WARN/SKIP diagnostics remain visible inline for actionable failures and are not duplicated in the Inspector column. |
| 19 | +- PASS: Right Inspector column remains available for Output, Selected Asset, Validation, Repository Tables, and Status Log. |
| 20 | +- PASS: Status Log remains in the right Inspector column. |
| 21 | +- PASS: Clear Status Log clears only the Status Log text/batch-log area and preserves asset rows plus inline upload compact status. |
| 22 | +- PASS: Filename normalization, Trash confirmation/delete-file behavior, lazy project id behavior, `/projects/` safety, duplicate blocking, and delete-file behavior remain covered by targeted Assets Playwright. |
| 23 | +- PASS: `codex_review.diff` is UTF-8 readable. |
| 24 | +- PASS: Full samples smoke test was not run. |
| 25 | + |
| 26 | +## Right-Column Removal Evidence |
| 27 | + |
| 28 | +- PASS: `toolbox/assets/index.html` no longer contains `data-asset-tool-upload-diagnostics-accordion`. |
| 29 | +- PASS: `toolbox/assets/index.html` no longer contains `data-asset-tool-upload-dialog`. |
| 30 | +- PASS: `toolbox/assets/assets.js` no longer queries or updates right-column upload dialog fields. |
| 31 | +- PASS: Playwright asserts `data-asset-tool-upload-diagnostics-accordion` count is `0`. |
| 32 | +- PASS: Playwright asserts `data-asset-tool-upload-dialog` count is `0`. |
| 33 | +- PASS: Playwright asserts `data-asset-tool-status-log-accordion` remains visible inside the Inspector column. |
| 34 | + |
| 35 | +## Inline Upload Evidence |
| 36 | + |
| 37 | +- PASS: `toolbox/assets/assets.js` creates per-type inline upload sections with `data-asset-tool-inline-upload-progress`. |
| 38 | +- PASS: Inline progress includes active details under the asset type table: phase, current file, file count, bytes, speed, ETA, elapsed, worker status, summary counts, issue rows, and file/status rows. |
| 39 | +- PASS: Playwright verifies the Images inline progress panel appears under the Images table while upload is active. |
| 40 | +- PASS: Playwright verifies the active inline panel shows `Uploading`, current file, total bytes, bytes received, BPS, speed, ETA, elapsed, and file/status table headers. |
| 41 | +- PASS: Playwright verifies a successful upload keeps `Upload summary: 2 written, 0 failed, 0 skipped, 0 warnings.` in the Images inline area. |
| 42 | +- PASS: Playwright verifies successful-upload details are hidden after completion, leaving compact inline status only. |
| 43 | +- PASS: Playwright verifies duplicate, unsafe target path, and unsupported write failures render concise inline issue/status rows without `projects/` debug paths in user-facing rows. |
| 44 | + |
| 45 | +## Scope Preservation Evidence |
| 46 | + |
| 47 | +- PASS: Lazy project id behavior remains covered by `Assets authenticated upload lazily creates one project id when no current project exists`. |
| 48 | +- PASS: Guest upload remains blocked without project creation by `Assets guest upload action shows account prompt and creates no record`. |
| 49 | +- PASS: Duplicate blocking remains covered by `Assets duplicate project-path uploads fail before write and do not create duplicate records`. |
| 50 | +- PASS: `/projects/` path safety remains covered by `Assets upload fails visibly when the resolved target directory would escape the project asset folder`. |
| 51 | +- PASS: Delete-file behavior remains covered by `Assets Trash deletes uploaded records and physical files with scoped failure handling`. |
| 52 | +- PASS: Delete path escape handling remains covered by `Assets Trash rejects uploaded delete paths outside projects`. |
| 53 | +- PASS: Filename/source behavior remains covered by `Assets source controls require real upload filenames and valid references`. |
| 54 | + |
| 55 | +## Impacted Lanes |
| 56 | + |
| 57 | +- Toolbox Assets runtime/UI. |
| 58 | +- Assets targeted Playwright recovery/UAT lane. |
| 59 | +- Project Workspace contract lane, because `npm run test:workspace-v2` was explicitly required. The script name is legacy; user-facing product language remains Project Workspace. |
| 60 | + |
| 61 | +## Skipped Lanes |
| 62 | + |
| 63 | +- Full samples smoke: SKIP by request. No sample JSON or sample runtime behavior changed. |
| 64 | +- Engine runtime: SKIP. No engine files were modified. |
| 65 | +- Broad toolbox smoke: SKIP. This PR is scoped to `toolbox/assets` upload diagnostics cleanup and targeted Assets coverage. |
| 66 | + |
| 67 | +## Validation Performed |
| 68 | + |
| 69 | +- PASS: `git branch --show-current` -> `main`. |
| 70 | +- PASS: `git branch --list` -> `* main`. |
| 71 | +- PASS: `git status --short` before changes -> no output. |
| 72 | +- PASS: `node --check toolbox/assets/assets.js`. |
| 73 | +- PASS: `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`. |
| 74 | +- PASS: `Select-String -Path toolbox/assets/index.html -Pattern '<style\\b'` -> no output. |
| 75 | +- PASS: `Select-String -Path toolbox/assets/index.html -Pattern '<script(?![^>]*\\bsrc=)'` -> no output. |
| 76 | +- PASS: `git diff --check -- toolbox/assets/index.html toolbox/assets/assets.js tests/playwright/tools/AssetToolMockRepository.spec.mjs docs_build/dev/reports/playwright_v8_coverage_report.txt docs_build/dev/reports/coverage_changed_js_guardrail.txt docs_build/dev/reports/codex_changed_files.txt`. |
| 77 | +- PASS: `node -e "...read codex_review.diff as utf8..."` -> UTF-8 OK. |
| 78 | +- PASS: `npx.cmd playwright test tests/playwright/tools/AssetToolMockRepository.spec.mjs --workers=1 --reporter=list` -> 15 passed. |
| 79 | +- PASS: `npm.cmd run test:workspace-v2` -> workspace-contract lane passed, 5 Playwright tests passed. |
| 80 | + |
| 81 | +## Playwright Result |
| 82 | + |
| 83 | +- PASS: Targeted Assets Playwright: 15/15 passed. |
| 84 | +- PASS: Required Project Workspace validation command: 5/5 passed. |
| 85 | +- NOTE: Initial Playwright execution was blocked by a missing Chromium cache; Chromium was installed after approval using Node system CA. A later full targeted rerun passed. |
| 86 | + |
| 87 | +## V8 Coverage |
| 88 | + |
| 89 | +- Report: `docs_build/dev/reports/playwright_v8_coverage_report.txt`. |
| 90 | +- PASS: `toolbox/assets/assets.js` collected browser V8 coverage at 93%. |
| 91 | +- WARN: The coverage helper also lists `src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js` from the last committed HEAD change set. That file is not modified in the current working tree; the warning is advisory per project instructions. |
| 92 | + |
| 93 | +## Review Artifacts |
| 94 | + |
| 95 | +- `docs_build/dev/reports/PR_26163_083-assets-upload-cleanup-fixes.md` |
| 96 | +- `docs_build/dev/reports/codex_review.diff` |
| 97 | +- `docs_build/dev/reports/codex_changed_files.txt` |
| 98 | +- `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 99 | +- `docs_build/dev/reports/coverage_changed_js_guardrail.txt` |
| 100 | + |
| 101 | +## Manual Validation Notes |
| 102 | + |
| 103 | +1. Open `/toolbox/assets/index.html` in local DB mode. |
| 104 | +2. Confirm the right Inspector column has no Upload Diagnostics accordion. |
| 105 | +3. Upload Images and confirm progress appears under the Images table while active. |
| 106 | +4. Confirm a successful upload leaves only compact success status in the Images area. |
| 107 | +5. Confirm Status Log remains in the right column and Clear does not remove asset rows or inline upload status. |
| 108 | + |
| 109 | +## Samples Decision |
| 110 | + |
| 111 | +- SKIP: Full samples smoke test was not run because the request explicitly says not to run it and this PR does not change samples. |
0 commit comments