Stage 2: JSON manifest & TIFF gallery #10

Closed
opened 2026-09-08 17:40:20 +01:00 by gronod · 0 comments
Owner

Summary

Parse printtarg -u manifest from accumulated stdout. Gallery of PNG previews.

Spec refs

docs/09-stage2-printtarg.md, 05-argyll-fork.md §2.3. #68 #58.

Scope

In: accumulate, JSON.parse whole object, gallery, setStage2Result.
Out: live Print buttons (wire in 17; stub disabled here).

Implementation notes

Accumulate ALL stdout. JSON.parse the pretty-printed object. Do not brace-hunt.
Schema:

{"event":"manifest","pages":[{"filename":"target.tif","patches":800,"width_mm":210,"height_mm":297}]}

Per-page cards: readTiffPreviewPng, filename, patch count, dimensions, disabled Print button.
Success exit 0 + .ti2 → unlock Stage 3. Non-zero → stay on Stage 2, error in log.
Multi-page names may be {basename}.tif or {basename}_NN.tif — trust the manifest.

Rewrite invariants

#68 structured JSON. #58 TIFF→PNG host-side.

Dependencies

Blocks-on: 6, 9.
Unblocks: 17.

Test

  • CI/mock: single + multi-page fixtures; garbage stdout → visible error not crash; non-zero exit stays on Stage 2.
  • Hardware: N/A.

Acceptance criteria

  • Gallery renders all pages from fixture manifest.
## Summary Parse printtarg `-u` manifest from accumulated stdout. Gallery of PNG previews. ## Spec refs docs/09-stage2-printtarg.md, 05-argyll-fork.md §2.3. #68 #58. ## Scope In: accumulate, JSON.parse whole object, gallery, setStage2Result. Out: live Print buttons (wire in 17; stub disabled here). ## Implementation notes Accumulate ALL stdout. `JSON.parse` the pretty-printed object. Do not brace-hunt. Schema: ``` {"event":"manifest","pages":[{"filename":"target.tif","patches":800,"width_mm":210,"height_mm":297}]} ``` Per-page cards: `readTiffPreviewPng`, filename, patch count, dimensions, disabled Print button. Success exit 0 + `.ti2` → unlock Stage 3. Non-zero → stay on Stage 2, error in log. Multi-page names may be `{basename}.tif` or `{basename}_NN.tif` — trust the manifest. ## Rewrite invariants #68 structured JSON. #58 TIFF→PNG host-side. ## Dependencies Blocks-on: 6, 9. Unblocks: 17. ## Test - CI/mock: single + multi-page fixtures; garbage stdout → visible error not crash; non-zero exit stays on Stage 2. - Hardware: N/A. ## Acceptance criteria - [x] Gallery renders all pages from fixture manifest.
gronod added this to the M2 — Target generation & layout milestone 2026-09-08 17:40:20 +01:00
gronod added the
Priority
High
2
Project/ICCery-v2Feature/BackendFeature/UI
labels 2026-09-08 17:40:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#10