Skip to content

Commit 4bb40c9

Browse files
author
DavidQ
committed
PLAN_PR: add preview assets and thumbnails to samples
1 parent 8330579 commit 4bb40c9

6 files changed

Lines changed: 101 additions & 30 deletions

File tree

docs/dev/CODEX_COMMANDS.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,11 @@ MODEL: GPT-5.4-codex
22
REASONING: high
33

44
COMMAND:
5-
Execute BUILD_PR_SAMPLES_DETAIL_PAGE_ENHANCEMENT
6-
7-
ENVIRONMENT:
8-
- Windows
9-
- Use Node.js or vanilla JS only
10-
- No npm install
11-
- No node_modules
5+
Create PLAN_PR_SAMPLES_PREVIEW_ASSETS_AND_THUMBNAILS
126

137
RULES:
14-
- Do not change canonical paths
15-
- Do not modify gameplay
16-
- Keep changes minimal
17-
18-
VALIDATION:
19-
- sample page shows title/description
20-
- navigation works
21-
- related samples resolve
22-
- 1316–1318 still load
8+
- Docs only
9+
- No implementation
2310

2411
ZIP:
25-
<project folder>/tmp/BUILD_PR_SAMPLES_DETAIL_PAGE_ENHANCEMENT.zip
12+
<project folder>/tmp/PLAN_PR_SAMPLES_PREVIEW_ASSETS_AND_THUMBNAILS.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BUILD_PR: enhance sample detail pages with metadata-driven UI and navigation
1+
PLAN_PR: add preview assets and thumbnails to samples
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add header, preview, related samples, and navigation to sample pages
1+
Define thumbnail + preview system for samples index and detail pages
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
MODIFIED:
2-
- sample pages (index.html in samples)
3-
4-
ADDED:
5-
- minimal UI JS for metadata rendering
1+
ADDED: docs/pr/PLAN_PR_SAMPLES_PREVIEW_ASSETS_AND_THUMBNAILS.md
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
[ ] header renders
2-
[ ] preview optional works
3-
[ ] navigation works
4-
[ ] related samples work
5-
[ ] links resolve (1316–1318)
6-
[ ] no console errors
1+
[ ] thumbnail rules defined
2+
[ ] fallback defined
3+
[ ] no path changes
74
[ ] zip exists
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# PLAN_PR_SAMPLES_PREVIEW_ASSETS_AND_THUMBNAILS
2+
3+
## Objective
4+
Define a narrow, testable plan for preview assets and thumbnail support for samples so launcher/detail UI can show consistent visual previews without changing gameplay behavior.
5+
6+
## Scope
7+
Docs-only planning.
8+
No implementation code changes.
9+
No gameplay changes.
10+
No engine-core changes.
11+
No canonical path normalization.
12+
No start_of_day directory changes.
13+
14+
## Working Targets
15+
- Preview image ownership for canonical samples: `samples/phaseXX/XXYY/`
16+
- Metadata mapping for preview and thumbnail references
17+
- Consumption expectations for:
18+
- `samples/index.html` tiles
19+
- sample detail enhancement surface
20+
21+
## Proposed Asset Contract
22+
1. Canonical sample path remains source of truth for runnable sample pages:
23+
- `samples/phaseXX/XXYY/index.html`
24+
25+
2. Preview asset location per sample (planned):
26+
- `samples/phaseXX/XXYY/preview/`
27+
- expected files:
28+
- `thumb.png` (tile-sized image)
29+
- `preview.png` (detail-sized image)
30+
31+
3. Metadata fields (planned extension of existing metadata layer):
32+
- `thumbnail` (string, optional): canonical relative path to thumbnail image
33+
- `preview` (string, optional): canonical relative path to preview image
34+
35+
4. Fallback behavior:
36+
- if thumbnail/preview missing, UI renders deterministic placeholder and remains fully functional
37+
38+
## Source-of-Truth Boundaries
39+
1. Canonical folder structure:
40+
- owns sample existence and entrypoints only
41+
42+
2. Preview assets:
43+
- own image binary content only
44+
- must not introduce path aliases or alternate sample IDs
45+
46+
3. Metadata:
47+
- owns which preview/thumbnail path a sample should use
48+
- must reference canonical sample-owned paths only
49+
50+
4. UI rendering:
51+
- consumes metadata + assets
52+
- must not infer non-canonical sample paths
53+
54+
## Validation + Fail-Fast Expectations
55+
Fail fast for future BUILD when:
56+
- duplicate sample IDs in metadata
57+
- metadata points to non-canonical sample IDs
58+
- malformed preview paths
59+
- preview/thumbnail points outside allowed sample-owned scope
60+
- duplicate or conflicting preview entries for same sample
61+
- ambiguous ownership between metadata and filesystem assets
62+
63+
Validation expectations for future BUILD:
64+
- tiles render thumbnail if present
65+
- detail page renders preview if present
66+
- placeholder appears when assets are absent
67+
- representative links still resolve:
68+
- first sample in first populated phase
69+
- last sample in last populated phase
70+
- phase 13: `1316`, `1317`, `1318`
71+
- no console errors on tested pages
72+
73+
## Future BUILD Shape (Narrow + Testable)
74+
1. Extend metadata schema minimally for preview/thumbnail.
75+
2. Validate path safety and ownership constraints.
76+
3. Wire index/detail rendering to read preview fields.
77+
4. Preserve deterministic fallback placeholders.
78+
5. Validate representative sample pages and links.
79+
80+
## Out of Scope
81+
- gameplay logic updates
82+
- engine-core refactors
83+
- broad UI redesign
84+
- sample path renaming or relocation
85+
- automated image generation pipeline expansion
86+
87+
## Acceptance Criteria (Planning PR)
88+
- preview/thumbnail contract defined
89+
- source-of-truth boundaries defined
90+
- fail-fast and validation expectations defined
91+
- future BUILD remains narrow and testable

0 commit comments

Comments
 (0)