Skip to content

Commit 5efed4e

Browse files
author
DavidQ
committed
Samples2Tools bundle: fix roundtrip query wiring, expand preset coverage to 3 per target tool, and repair 0901 Vector Asset Studio preload/render persistence
1 parent 50e7a5d commit 5efed4e

12 files changed

Lines changed: 168 additions & 8 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Samples2Tools batch 22 summary
2+
Generated: 2026-04-24T21:19:17.480Z
3+
Purpose: bring performance-profiler and physics-sandbox to 3 mappings each using existing samples.
4+
5+
Counts:
6+
- vector-asset-studio: 3
7+
- vector-map-editor: 3
8+
- 3d-asset-viewer: 3
9+
- 3d-camera-path-editor: 3
10+
- 3d-json-payload-normalizer: 3
11+
- asset-browser: 3
12+
- asset-pipeline-tool: 3
13+
- palette-browser: 3
14+
- state-inspector: 3
15+
- performance-profiler: 3
16+
- physics-sandbox: 3
17+
18+
Added mappings:
19+
- performance-profiler <- sample 1319 (/samples/phase-13/1319/sample-1319-performance-profiler.json)
20+
- physics-sandbox <- sample 0210 (/samples/phase-02/0210/sample-0210-physics-sandbox.json)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Samples2Tools batch 22 validation
2+
Validated at: 2026-04-24T21:19:17.484Z
3+
4+
[x] Existing sample folders reused (no new sample pages)
5+
[x] Added sample-xxxx-toolID.json for each new mapping
6+
[x] Metadata includes toolHints and roundtripToolPresets for new mappings
7+
[x] performance-profiler now has 3 mappings
8+
[x] physics-sandbox now has 3 mappings
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Samples2Tools batch 23 validation
2+
Generated: 2026-04-24T21:23:47.558Z
3+
Scope: roundtrip query parameter wiring validation
4+
5+
Total roundtrip mappings checked: 59
6+
Failures: 0
7+
8+
Sample 0901 expected roundtrip launch URLs:
9+
- vector-asset-studio: /tools/Vector%20Asset%20Studio/index.html?sampleId=0901&sampleTitle=Vector%20Rendering%20System&samplePresetPath=%2Fsamples%2Fphase-09%2F0901%2Fsample-0901-vector-asset-studio.json
10+
- vector-map-editor: /tools/Vector%20Map%20Editor/index.html?sampleId=0901&sampleTitle=Vector%20Rendering%20System&samplePresetPath=%2Fsamples%2Fphase-09%2F0901%2Fsample-0901-vector-map-editor.json
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Samples2Tools batch 24 validation
2+
Generated: 2026-04-24T21:27:20.913Z
3+
Scope: vector-asset-studio preset integrity checks
4+
5+
Checked mappings: 3
6+
Issues: 1
7+
8+
Results:
9+
- sample 0901: drawableSvg=true svgPathFallback=false (/samples/phase-09/0901/sample-0901-vector-asset-studio.json)
10+
- sample 1204: drawableSvg=false svgPathFallback=true (/samples/phase-12/1204/sample-1204-vector-asset-studio.json)
11+
- sample 1208: drawableSvg=false svgPathFallback=false (/samples/phase-12/1208/sample-1208-vector-asset-studio.json)
12+
13+
Issues:
14+
- Preset has no drawable svgText and no svgPath fallback: /samples/phase-12/1208/sample-1208-vector-asset-studio.json
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"generatedAt": "2026-04-24T21:19:17.483Z",
3+
"scope": "phase-01-phase-19",
4+
"purpose": "batch-22-low-coverage-tool-completion",
5+
"links": [
6+
{
7+
"sampleId": "1319",
8+
"phase": "13",
9+
"title": "Sample 1319 - Real Network + Live Dashboard",
10+
"toolId": "performance-profiler",
11+
"href": "./phase-13/1319/index.html",
12+
"presetPath": "/samples/phase-13/1319/sample-1319-performance-profiler.json"
13+
},
14+
{
15+
"sampleId": "0210",
16+
"phase": "02",
17+
"title": "Projectile System",
18+
"toolId": "physics-sandbox",
19+
"href": "./phase-02/0210/index.html",
20+
"presetPath": "/samples/phase-02/0210/sample-0210-physics-sandbox.json"
21+
}
22+
]
23+
}

docs/dev/roadmaps/MASTER_ROADMAP_SAMPLES2TOOLS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
- [ ] Sample page consumes same JSON it passes to tool.
147147
- [ ] Tool launch with `samplePresetPath` succeeds without manual edits.
148148
- [ ] Tool status includes loaded sample id/path.
149-
- [ ] Metadata and tool card links resolve correctly.
149+
- [x] Metadata and tool card links resolve correctly.
150150
- [ ] No regressions to direct tool launch without sample params.
151151

152152
## Reporting Outputs (per execution batch)
@@ -155,7 +155,7 @@
155155
- [x] `docs/dev/reports/samples2tools_link_map_<n>.json`
156156

157157
## Current Snapshot (from tools_used.txt)
158-
- [x] Current tagged samples across active tools: `39` (phase-01 through phase-19)
158+
- [x] Current tagged samples across active tools: `59` (phase-01 through phase-19)
159159
- [x] Candidate coverage inventory exists for all active tools
160160
- [x] Legacy `sprite-editor-old-keep` is intentionally excluded from Samples2Tools mapping.
161161
- [.] Convert candidates into curated, validated sample-to-tool links

samples/index.render.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,13 @@ function buildSampleRows(metadata, pinnedSet, toolLabelMap, toolRegistryMap) {
191191
const tags = asArray(sample?.tags).map((tag) => normalizeTag(tag)).filter(Boolean);
192192
const classTokens = buildClassTokens(sample?.classValues, sample?.engineClassesUsed);
193193
const toolTokens = buildToolTokens(sample?.toolHints, toolLabelMap);
194-
const roundtripLinks = buildRoundtripLinks({ id, phase, toolHints: sample?.toolHints }, toolRegistryMap);
194+
const roundtripLinks = buildRoundtripLinks({
195+
id,
196+
phase,
197+
title: sample?.title,
198+
toolHints: sample?.toolHints,
199+
roundtripToolPresets: sample?.roundtripToolPresets
200+
}, toolRegistryMap);
195201
const previewSrc = normalize(sample?.thumbnail) || normalize(sample?.preview) || "";
196202
return {
197203
id,

samples/metadata/samples.index.metadata.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,15 @@
14301430
"engine/theme/index/Theme",
14311431
"engine/theme/index/ThemeTokens",
14321432
"engine/utils/index/clamp"
1433+
],
1434+
"toolHints": [
1435+
"physics-sandbox"
1436+
],
1437+
"roundtripToolPresets": [
1438+
{
1439+
"toolId": "physics-sandbox",
1440+
"presetPath": "/samples/phase-02/0210/sample-0210-physics-sandbox.json"
1441+
}
14331442
]
14341443
},
14351444
{
@@ -7506,6 +7515,15 @@
75067515
"engine/theme/index/Theme",
75077516
"engine/theme/index/ThemeTokens",
75087517
"engine/utils/index/clamp"
7518+
],
7519+
"toolHints": [
7520+
"performance-profiler"
7521+
],
7522+
"roundtripToolPresets": [
7523+
{
7524+
"toolId": "performance-profiler",
7525+
"presetPath": "/samples/phase-13/1319/sample-1319-performance-profiler.json"
7526+
}
75097527
]
75107528
},
75117529
{
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"sampleId": "0210",
3+
"phase": "02",
4+
"title": "Projectile System",
5+
"description": "Shared sample preset for Sample 0210 and Physics Sandbox preload.",
6+
"toolHints": [
7+
"physics-sandbox"
8+
],
9+
"payload": {
10+
"physicsBody": {
11+
"x": 32,
12+
"y": 16,
13+
"velocityX": 180,
14+
"velocityY": -30,
15+
"accelerationX": -14,
16+
"accelerationY": 24,
17+
"dragX": 8,
18+
"dragY": 3,
19+
"maxSpeedX": 260,
20+
"maxSpeedY": 240,
21+
"dt": 0.0166666667
22+
}
23+
},
24+
"runtime": {
25+
"sampleEntryPoint": "/samples/phase-02/0210/index.html"
26+
},
27+
"toolState": {
28+
"preferredToolId": "physics-sandbox"
29+
},
30+
"provenance": {
31+
"path": "/samples/phase-02/0210/sample-0210-physics-sandbox.json",
32+
"createdAt": "2026-04-24T00:00:00.000Z",
33+
"version": 1
34+
}
35+
}

samples/phase-09/0901/sample-0901-vector-asset-studio.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
"sampleId": "0901",
33
"phase": "09",
44
"title": "Vector Rendering System",
5-
"description": "Shared sample preset for Sample 0901 and Vector Asset Studio preload.",
5+
"description": "Shared sample preset for Sample 0901 and Vector Asset Studio preload (ship vector primitives).",
66
"toolHints": [
77
"vector-asset-studio"
88
],
99
"payload": {
1010
"vectorAssetDocument": {
11-
"sourceName": "sample-0901-preview.svg",
12-
"svgPath": "/samples/phase-09/0901/assets/images/preview.svg",
11+
"sourceName": "sample-0901-ship.svg",
1312
"editorOptions": {
1413
"palette": {
1514
"id": "sample0901-vector",
@@ -40,7 +39,8 @@
4039
"gradientAngle": 45,
4140
"activeTarget": "paint"
4241
}
43-
}
42+
},
43+
"svgText": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 360\">\n <title>sample-0901-vector-ship</title>\n <desc>Ship vector from Sample 0901 transform-rendering baseline.</desc>\n <rect x=\"0\" y=\"0\" width=\"640\" height=\"360\" fill=\"#0f172a\" />\n <rect x=\"90\" y=\"220\" width=\"480\" height=\"110\" fill=\"#111827\" />\n <path d=\"M 260 150 L 294 236 L 260 217 L 226 236 Z\" fill=\"none\" stroke=\"#38bdf8\" stroke-width=\"8\" stroke-linejoin=\"round\" stroke-linecap=\"round\" />\n <line x1=\"260\" y1=\"194\" x2=\"340\" y2=\"194\" stroke=\"#64748b\" stroke-width=\"3\" />\n <circle cx=\"260\" cy=\"194\" r=\"5\" fill=\"#38bdf8\" />\n</svg>"
4444
}
4545
},
4646
"runtime": {

0 commit comments

Comments
 (0)