Repository navigation
Description
What
Add independent layers so a G-code always carries 48x48, 96x96 and 300x300 PNG thumbnails however it was produced: (a) slicing wrappers ask the slicer for them in its settings; (b) every slicing entry point (3d slice, the Orca wrapper behind 3d prep, 3d retarget with --gcode, the U1 calibration plate) draws missing sizes from the toolpaths after slicing, plus missing plate PNGs in a 3MF; (c) 3d printer upload and start add missing thumbnails in place instead of failing; (d) 3d print-preflight names the exact fix command and gains --fix; (e) tests including a guard that fails when a module running a slicer does not call the layer, and a fake Moonraker upload test.
Why (motivation)
3d print-preflight FAILs G-code without 48x48 and 300x300 thumbnails; the Orca CLI exports none, and on the SIMBOL print the fix was a manual gcode-thumbnails add. The owner wants it impossible to end up without a thumbnail.
User impact
Every headless slice and every upload shows a preview on the printer screen without the user remembering a command; no preflight FAIL for this reason.
Cost of inaction
Each headless slice keeps producing G-code that preflight refuses until someone runs the manual command; a forgotten step prints with a blank screen.
Acceptance criteria
- A G-code without thumbnails gets all required sizes through each layer independently (tests); already-present thumbnails are never duplicated or changed — forced: tests/test_thumbnail_layers.py + tests/e2e/test_thumbnail_layers_workflows.py: every layer (slice, orca_cli, retarget, gcode-resume, printer upload/start) adds the 3 sizes and leaves complete files byte-identical; PR feat: a G-code can never lack its thumbnails (slice, prep, retarget, upload, start, preflight --fix) #725 CI 'test' green (run 42053182935)
- 3d printer upload and start against a fake Moonraker server send a G-code that has the thumbnails — forced: tests/e2e/test_thumbnail_layers_workflows.py::test_upload_of_a_complete_gcode..., ::test_start_adds_thumbnails_too...: the bytes stored on the fake Moonraker carry all three sizes; PR feat: a G-code can never lack its thumbnails (slice, prep, retarget, upload, start, preflight --fix) #725 CI green
- tests/test_thumbnail_guard.py fails when a slicer-running module lacks the thumbnail layer — forced: tests/test_thumbnail_guard.py (structural guard over slicer-running modules) in PR feat: a G-code can never lack its thumbnails (slice, prep, retarget, upload, start, preflight --fix) #725; CI green
Screenshots
(none)
Deploy
Deployed: no
Activity
merge: origin/main into feat/gcode-thumbnails-everywhere (Refs #722)
test(thumbnails): user-workflow docstrings for the three e2e stories …
feat: a G-code can never lack its thumbnails (slice, prep, retarget, …
alex-mextner commentedon Nov 5, 2026
Shipped: merged via #725.
Merge commit: 974be39
This does NOT close the ticket — acceptance still needs proof. Run
task read #722for the outstanding criteria, thentask check/task done.feat(printer): slot colour by ΔE, --fix/--fix-colour, printer slot se…
feat(printer): bed check + job watch that cancels and calls when the …
feat(printer): print-quality monitor — stringing, pattern loss, first…
feat(printer): macro passthrough and per-model alias commands (#721)