Skip to content

Commit 77813be

Browse files
committed
Polish Asset library selection import layout and metadata display - PR_26156_151-153-asset-library-polish
1 parent a193194 commit 77813be

10 files changed

Lines changed: 241 additions & 54 deletions

assets/theme-v2/css/tables.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ td {
4141
}
4242

4343
.tool-form-table th[scope="row"] {
44+
padding: var(--space-4) var(--space-6);
4445
width: 1%;
4546
white-space: nowrap;
4647
text-align: right;
4748
vertical-align: top
4849
}
4950

5051
.tool-form-table td {
52+
padding: var(--space-4) var(--space-6);
5153
min-width: 12rem;
5254
width: auto
5355
}
@@ -62,3 +64,8 @@ td {
6264
box-sizing: border-box;
6365
width: 100%
6466
}
67+
68+
.data-table tr.is-selected td {
69+
background: var(--orange-soft);
70+
box-shadow: inset var(--space-3) 0 0 var(--orange)
71+
}

docs_build/dev/codex_commands.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,3 +1070,34 @@ Required reports:
10701070
- `docs_build/dev/reports/testing_lane_execution_report.md`
10711071
- `docs_build/dev/reports/codex_changed_files.txt`
10721072
- `docs_build/dev/reports/codex_review.diff`
1073+
1074+
1075+
## PR_26156_151-153
1076+
1077+
Changes:
1078+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
1079+
- Updated Project Assets > Library Records so the selected record receives a reusable selected-row state.
1080+
- Preserved existing record click behavior and metadata/preview updates.
1081+
- Ensured only one library record is highlighted at a time through snapshot-driven table rendering.
1082+
- Added a selected filename row directly under the File picker in Import Asset.
1083+
- Kept Storage Path read-only.
1084+
- Reduced shared Theme V2 tool form table cell padding to improve narrow panel input space.
1085+
- Replaced semicolon-separated metadata formatting with separate readable metadata lines.
1086+
- Updated targeted Asset Tool Playwright coverage for selected-row state, selected filename row, read-only Storage Path, compact table spacing, and no-semicolon metadata.
1087+
- Added refreshed Playwright V8 coverage artifacts for changed runtime JavaScript.
1088+
- Did not modify archived V1/V2 files.
1089+
- Did not modify `start_of_day`.
1090+
1091+
Validation:
1092+
- `node --check toolbox/assets/assets.js`
1093+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
1094+
- `node --check toolbox/assets/assets-mock-repository.js`
1095+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool`
1096+
- `npx playwright test tests/playwright/tools/AssetToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list`
1097+
- Full samples smoke: skipped by request and because samples were not changed.
1098+
1099+
Required reports:
1100+
- `docs_build/dev/reports/asset-library-selection-layout-metadata-report.md`
1101+
- `docs_build/dev/reports/testing_lane_execution_report.md`
1102+
- `docs_build/dev/reports/codex_changed_files.txt`
1103+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix Asset import role dropdown and form layout - PR_26156_148-150
1+
Polish Asset library selection, import layout, and metadata - PR_26156_151-153
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Asset Library Selection, Layout, and Metadata Report
2+
3+
PR bundle:
4+
- PR_26156_151-asset-library-selection-state
5+
- PR_26156_152-asset-import-field-layout-polish
6+
- PR_26156_153-asset-metadata-formatting
7+
8+
## Scope
9+
10+
Updated the active Asset Tool only:
11+
- `toolbox/assets/index.html`
12+
- `toolbox/assets/assets.js`
13+
- `assets/theme-v2/css/tables.css`
14+
- `tests/playwright/tools/AssetToolMockRepository.spec.mjs`
15+
16+
No archived V1/V2 files were modified.
17+
No `start_of_day` folders were modified.
18+
No archive/reference code was copied.
19+
20+
## PR_26156_151 Selection State
21+
22+
Implemented selected library-record highlighting in Project Assets > Library Records.
23+
24+
Behavior:
25+
- The selected asset row receives `class="is-selected"`.
26+
- Rows expose `aria-selected="true"` or `aria-selected="false"`.
27+
- The selected row button exposes `aria-pressed="true"`.
28+
- Re-rendering the table from the selected repository snapshot guarantees only one selected row is highlighted at a time.
29+
- Existing record click behavior is preserved; selecting a record still updates preview, metadata, output, and log state.
30+
31+
Theme V2 gap:
32+
- Existing shared table styling had no reusable selected-row state.
33+
- Added the reusable `.data-table tr.is-selected td` pattern in `assets/theme-v2/css/tables.css`.
34+
35+
## PR_26156_152 Import Field Layout
36+
37+
Updated Import Asset form layout while preserving the reusable tool form table pattern.
38+
39+
Changes:
40+
- Reduced shared tool form table header/value cell padding using Theme V2 spacing tokens.
41+
- Confirmed Storage Path remains read-only.
42+
- Preserved File label and native Choose file control in the existing row.
43+
- Added a selected filename row directly under File.
44+
- The selected filename row spans both table columns.
45+
- Native file picker behavior remains unchanged.
46+
47+
Theme V2 gap:
48+
- Existing shared `tool-form-table` spacing was still too wide for the narrow left panel after the Asset Tool import workflow grew.
49+
- The adjustment was made in the reusable Theme V2 table stylesheet instead of page-local or tool-local CSS.
50+
51+
## PR_26156_153 Metadata Formatting
52+
53+
Removed semicolon-separated metadata from Project Assets > Metadata and Library Records.
54+
55+
Metadata now renders as separate lines:
56+
- `<filename> <mime type>`
57+
- `<byte size> bytes`
58+
- `<checksum>`
59+
60+
Example:
61+
- `forge-bot-single.png image/png`
62+
- `2596257 bytes`
63+
- `mock-sha256-b12c5f4e`
64+
65+
Internal project/path details remain available below those user-facing lines.
66+
No raw JSON output was introduced.
67+
68+
## Validation
69+
70+
Impacted lane:
71+
- `asset-tool`
72+
73+
Commands run:
74+
- `node --check toolbox/assets/assets.js`
75+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
76+
- `node --check toolbox/assets/assets-mock-repository.js`
77+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool`
78+
- `npx playwright test tests/playwright/tools/AssetToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list`
79+
80+
Results:
81+
- Asset Tool lane passed: 5/5 Playwright tests.
82+
- Direct Asset Tool Playwright run passed: 5/5 Playwright tests.
83+
- V8 coverage refreshed for changed runtime JavaScript; no changed runtime JS guardrail warnings.
84+
85+
Skipped lanes:
86+
- Workspace, Project Workspace, Game Design, Game Configuration, Build Path, Tools Progress, Tool Navigation, Tool Display Mode, Tool Images, Tool Runtime, Game Runtime, Integration, Engine Src, and Samples.
87+
88+
Skipped-lane rationale:
89+
- The change is limited to the active Asset Tool import form, library rendering, metadata rendering, shared Theme V2 table styling, and the targeted Asset Tool test file.
90+
- No shared launch/navigation behavior changed.
91+
- No sample JSON or sample loader/framework behavior changed.
92+
93+
Manual test notes:
94+
- Open `toolbox/assets/index.html`.
95+
- Confirm Library Records highlights the selected row.
96+
- Click another library record and confirm the previous row loses highlight while metadata updates.
97+
- Confirm Storage Path is read-only.
98+
- Choose a file and confirm the selected filename appears in the row directly under File.
99+
- Confirm metadata renders on separate lines without semicolons.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(81%) toolbox/toolRegistry.js - executed lines 1598/1598; executed functions 26/32
10-
(90%) toolbox/tools-page-accordions.js - executed lines 1934/1934; executed functions 70/78
9+
(95%) toolbox/assets/assets-mock-repository.js - executed lines 661/661; executed functions 62/65
10+
(96%) toolbox/assets/assets.js - executed lines 370/370; executed functions 43/45
1111

1212
Guardrail warnings:
1313
(100%) none - no changed runtime JS coverage warnings

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,28 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(85%) Toolbox Index - exercised 5 runtime JS files
15+
(88%) Toolbox Index - exercised 6 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
1717
(74%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(81%) toolbox/toolRegistry.js - executed lines 1598/1598; executed functions 26/32
21-
(90%) toolbox/tools-page-accordions.js - executed lines 1934/1934; executed functions 70/78
20+
(95%) toolbox/assets/assets-mock-repository.js - executed lines 661/661; executed functions 62/65
21+
(96%) toolbox/assets/assets.js - executed lines 370/370; executed functions 43/45
2222

2323
Files with executed line/function counts where available:
24-
(67%) assets/theme-v2/js/tool-display-mode.js - executed lines 172/172; executed functions 10/15
25-
(73%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 384/384; executed functions 24/33
24+
(67%) assets/theme-v2/js/tool-display-mode.js - executed lines 201/201; executed functions 10/15
25+
(75%) toolbox/toolRegistry.js - executed lines 1754/1754; executed functions 27/36
26+
(76%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 402/402; executed functions 26/34
2627
(80%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 205/205; executed functions 16/20
27-
(81%) toolbox/toolRegistry.js - executed lines 1598/1598; executed functions 26/32
28-
(83%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 30/36
29-
(90%) toolbox/game-design/game-design.js - executed lines 224/224; executed functions 19/21
30-
(90%) toolbox/tools-page-accordions.js - executed lines 1934/1934; executed functions 70/78
31-
(100%) admin/tools-progress.js - executed lines 106/106; executed functions 11/11
28+
(88%) toolbox/game-configuration/game-configuration-mock-repository.js - executed lines 290/290; executed functions 30/34
29+
(92%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 34/37
30+
(95%) toolbox/assets/assets-mock-repository.js - executed lines 661/661; executed functions 62/65
31+
(96%) toolbox/assets/assets.js - executed lines 370/370; executed functions 43/45
3232

3333
Uncovered or low-coverage changed JS files:
3434
(100%) none - no low-coverage changed runtime JS files
3535

3636
Changed JS files considered:
37-
(0%) tests/playwright/tools/BuildPathProgressSimplification.spec.mjs - changed JS file not collected as browser runtime coverage
38-
(0%) tests/playwright/tools/ToolImageRegistry.spec.mjs - changed JS file not collected as browser runtime coverage
39-
(0%) tests/playwright/tools/ToolNavigationPrevNext.spec.mjs - changed JS file not collected as browser runtime coverage
40-
(81%) toolbox/toolRegistry.js - changed JS file with browser V8 coverage
41-
(90%) toolbox/tools-page-accordions.js - changed JS file with browser V8 coverage
37+
(0%) tests/playwright/tools/AssetToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
38+
(95%) toolbox/assets/assets-mock-repository.js - changed JS file with browser V8 coverage
39+
(96%) toolbox/assets/assets.js - changed JS file with browser V8 coverage

docs_build/dev/reports/testing_lane_execution_report.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Testing Lane Execution Report
22

3-
Generated: 2026-06-05T18:27:22.138Z
3+
Generated: 2026-06-05T18:45:52.119Z
44
Dry run: No
55

66
## Summary
@@ -9,7 +9,7 @@ PASS: 1
99
WARN: 0
1010
FAIL: 0
1111
SKIP: 14
12-
Total lane elapsed time: 14.98s
12+
Total lane elapsed time: 15.29s
1313
Actual browser launches: 1
1414

1515
## Full Samples Smoke
@@ -34,11 +34,11 @@ Reason: No deterministic dependency failures before runtime.
3434
Status: PASS
3535
Scheduled lane order: asset-tool
3636
Reused runtime sessions: 0
37-
Reused lane snapshots: 1
38-
Reused warm-start lanes: 1
39-
Reused dependency hydration: 1
40-
Prevented graph rebuilds: 1
41-
Prevented redundant initialization: 1
37+
Reused lane snapshots: 0
38+
Reused warm-start lanes: 0
39+
Reused dependency hydration: 0
40+
Prevented graph rebuilds: 0
41+
Prevented redundant initialization: 0
4242
Prevented redundant browser launches: 0
4343
Prevented redundant lane execution: 14
4444

@@ -64,7 +64,7 @@ Status: PASS
6464
Target files: tests/playwright/tools/AssetToolMockRepository.spec.mjs
6565
Required shared helpers: tests/helpers/playwrightRepoServer.mjs, tests/helpers/playwrightStorageIsolation.mjs, tests/helpers/playwrightV8CoverageReporter.mjs, tests/helpers/workspaceV2CoverageReporter.mjs
6666
Required fixtures: none
67-
Targeted file/helper reads: 0
67+
Targeted file/helper reads: 5
6868
Cached discovery reuse: Yes
6969
Prevented fallback expansion: Yes; no ownership or scope blocker widened into broad discovery.
7070

@@ -73,27 +73,27 @@ Prevented fallback expansion: Yes; no ownership or scope blocker widened into br
7373
Status: PASS
7474
Generated manifests: asset-tool:PASS
7575
Prevented discovery expansion: Yes
76-
Prevented redundant scans: 0
77-
Persistent manifest events: asset-tool:REUSED
76+
Prevented redundant scans: 4
77+
Persistent manifest events: asset-tool:GENERATED
7878

7979
## Warm-Start Reuse
8080

8181
Status: PASS
82-
Warm-start events: asset-tool:REUSED
83-
Dependency hydration events: asset-tool:REUSED
84-
Prevented redundant initialization: 1
85-
Prevented helper resolution passes: 4
82+
Warm-start events: asset-tool:GENERATED
83+
Dependency hydration events: asset-tool:GENERATED
84+
Prevented redundant initialization: 0
85+
Prevented helper resolution passes: 0
8686
Prevented fixture ownership traversal: 0
8787

8888
## Lane Snapshots
8989

9090
Status: PASS
91-
Snapshot events: asset-tool:REUSED
92-
Reused snapshots: 1
91+
Snapshot events: asset-tool:GENERATED
92+
Reused snapshots: 0
9393
Invalidated snapshots: 0
94-
Prevented graph rebuilds: 1
95-
Prevented redundant dependency traversal: 1
96-
Prevented fixture/helper graph assembly: 4
94+
Prevented graph rebuilds: 0
95+
Prevented redundant dependency traversal: 0
96+
Prevented fixture/helper graph assembly: 0
9797

9898
## Lane Deduplication
9999

@@ -109,7 +109,7 @@ Prevented Workspace lane reruns: 0
109109
| project-workspace | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Project Workspace mock repository, Project Workspace UI, and Toolbox Progress/Build Path project-state bridge | repo-served Project Workspace page; repo-served Toolbox page with role simulation; in-memory SQL-shaped mock project repository |
110110
| game-design | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Game Design mock repository, project purpose flow, validation overlay, capability demo authoring, and Toolbox progress handoff | repo-served Game Design page; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Design mock repository; Project Workspace mock project context |
111111
| game-configuration | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Game Configuration mock repository, Game Design handoff, configuration validation, user-facing output, and Toolbox progress handoff | repo-served Game Configuration page; repo-served Game Design page for handoff checks; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Configuration mock repository; Game Design mock repository handoff |
112-
| asset-tool | PASS | 14.98s | 1 | Asset Tool rebuild slice validates SQL-shaped asset tables, ready Game Configuration handoff, import/preview workflow, and visible validation errors without exercising unrelated toolbox routes. | Asset Tool mock repository, Game Configuration readiness handoff, library records, import preview, and visible failure handling | repo-served Assets page; in-memory SQL-shaped Asset Tool mock repository; Game Configuration mock repository handoff; file-name/path-based import preview |
112+
| asset-tool | PASS | 15.29s | 1 | Asset Tool rebuild slice validates SQL-shaped asset tables, ready Game Configuration handoff, import/preview workflow, and visible validation errors without exercising unrelated toolbox routes. | Asset Tool mock repository, Game Configuration readiness handoff, library records, import preview, and visible failure handling | repo-served Assets page; in-memory SQL-shaped Asset Tool mock repository; Game Configuration mock repository handoff; file-name/path-based import preview |
113113
| build-path | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Toolbox Build Path simplification, workflow status table, and Admin Tools Progress navigation | repo-served Toolbox page; repo-served Admin Tools Progress page; Project Workspace mock project context; Toolbox role simulation |
114114
| tools-progress | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Admin Tools Progress hydration, Toolbox Group view color model, and Project Build Path separation | repo-served Admin Tools Progress page; repo-served Toolbox Group view; Toolbox registry build sequence; Project Build Path workflow table |
115115
| tool-navigation | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Admin Tools Progress tool route links, Tool Display Mode build-order previous/next controls, and Toolbox group fallback routing | repo-served Admin Tools Progress page; repo-served Project Workspace, Game Design, and Game Configuration tool pages; repo-served Toolbox Group view with URL-selected accordion; Toolbox registry build sequence and route metadata |
@@ -125,11 +125,11 @@ Prevented Workspace lane reruns: 0
125125

126126
| Lane | Duration | Test |
127127
| --- | --- | --- |
128-
| asset-tool | 2.80s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:250:1 > Asset upload failures are visible and project context is required |
129-
| asset-tool | 2.30s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:196:1 > Image, video, and audio uploads create project-owned metadata and previews |
130-
| asset-tool | 1.90s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:161:1 > Asset Role changes update Usage options and import form layout stays usable |
131-
| asset-tool | 1.70s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:119:1 > Assets page lists all asset roles and starts from active project context |
132-
| asset-tool | 485ms | tests\playwright\tools\AssetToolMockRepository.spec.mjs:75:1 > Asset Tool repository exposes SQL-shaped role, storage, and metadata ownership |
128+
| asset-tool | 2.80s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:272:1 > Asset upload failures are visible and project context is required |
129+
| asset-tool | 2.40s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:206:1 > Image, video, and audio uploads create project-owned metadata and previews |
130+
| asset-tool | 2.00s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:163:1 > Asset Role changes update Usage options and import form layout stays usable |
131+
| asset-tool | 1.80s | tests\playwright\tools\AssetToolMockRepository.spec.mjs:119:1 > Assets page lists all asset roles and starts from active project context |
132+
| asset-tool | 363ms | tests\playwright\tools\AssetToolMockRepository.spec.mjs:75:1 > Asset Tool repository exposes SQL-shaped role, storage, and metadata ownership |
133133

134134
## Commands
135135

@@ -146,7 +146,7 @@ Prevented Workspace lane reruns: 0
146146
- SKIP
147147

148148
### asset-tool
149-
- PASS 14.97s C:\nvm4w\nodejs\node.exe C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming\node_modules\@playwright\test\cli.js test tests/playwright/tools/AssetToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list
149+
- PASS 15.29s C:\nvm4w\nodejs\node.exe C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming\node_modules\@playwright\test\cli.js test tests/playwright/tools/AssetToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list
150150

151151
### build-path
152152
- SKIP

0 commit comments

Comments
 (0)