From 4d54652a29c2a742ea90bbcc21e12764a74b7ba2 Mon Sep 17 00:00:00 2001 From: Dario Gabriel Lipicar Date: Tue, 18 Aug 2026 23:28:43 -0300 Subject: [PATCH] fix(doctests): ship a 256x256 placeholder icon, per the LGX icon contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nix-bundle-lgx 6fb5d5b ("feat: add requirement for icons with manifest 0.4.0") validates the packaged icon straight out of the PNG IHDR: exactly 256x256, required for `type == "ui_qml"`. The tutorials embed a base64 placeholder that is 64x64, so `nix build '.#lgx'` now fails for calc_ui: ERROR: icon does not match the Logos icon standard. expected: PNG, exactly 256x256 actual: PNG, 64x64 That one rejection is the whole of the red run (208 passed, 3 failed): `result-lgx/` is never created, so `Install the UI plugin` fails on a literal `result-lgx/*.lgx`, and basecamp then launches without the plugin ("No clickable element found with text 'calc_ui'"). Regenerate the placeholder at 256x256, keeping the same solid #2ECC71. It is now a 1-bit palette PNG rather than RGBA, which makes the embedded blob shorter than the one it replaces (280 -> 144 base64 chars, 209 -> 106 bytes) despite the 16x pixel count. The C++ UI tutorial carried the same 64x64 blob and was passing only because its chain never reaches an `.#lgx` step — fixed here too, before it surfaces. Verified by extracting bundle.sh's validator verbatim and running the tutorials' own `- run:` command through it: the old icon is rejected with the exact CI error text, the new one passes. outputs/*.md are hand-maintained (they carry deliberate /0.2.0 flake pins that the generator does not emit), so the mirrored edits there are by hand rather than regenerated. Co-Authored-By: Claude Opus 5 --- outputs/logos-calc-ui-cpp/icons/calc.png | Bin 209 -> 106 bytes outputs/logos-calc-ui/icons/calc.png | Bin 209 -> 106 bytes outputs/tutorial-cpp-ui-app.md | 6 +++--- outputs/tutorial-qml-ui-app.md | 6 +++--- tests/tutorial-cpp-ui-app.test.yaml | 8 ++++---- tests/tutorial-qml-ui-app.test.yaml | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/outputs/logos-calc-ui-cpp/icons/calc.png b/outputs/logos-calc-ui-cpp/icons/calc.png index 51603c22842f13d14c194f8e27c4256c51ea43cd..f2f68c975edea49c9889cd2cdc890a2916f1afd9 100644 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K585o&?RN5XZRUpL{;1lAiccu`CL@n2@0E)gTe~DWM4fidz`D literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Gdx`!Ln`LHygTe~DWM4fidz`D literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Gdx`!Ln`LHy icons/calc.png ``` Key fields: diff --git a/outputs/tutorial-qml-ui-app.md b/outputs/tutorial-qml-ui-app.md index 315ea35..28fcf15 100644 --- a/outputs/tutorial-qml-ui-app.md +++ b/outputs/tutorial-qml-ui-app.md @@ -102,12 +102,12 @@ Replace the template contents with your plugin's details. The template may gener } ``` -Create the icon directory and add a placeholder icon. The icon is displayed in the `logos-basecamp` sidebar when the module is loaded: +Create the icon directory and add a placeholder icon. It must be a PNG that is exactly 256×256 — LGX packaging rejects any other size. The icon is displayed in the `logos-basecamp` sidebar when the module is loaded: ```bash mkdir -p icons -# Copy any PNG here — or generate a 64×64 placeholder: -echo "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAmElEQVR4nO3QMREAIBDAsFeEN3ziCWRkoEP2XmedfX82OkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAO0BN/SiO/PatoIAAAAASUVORK5CYII=" | base64 -d > icons/calc.png +# Copy any PNG here — or generate a 256×256 placeholder: +echo "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEUuzHEuzHEVOa2oAAAAH0lEQVR42u3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABYOSdlwAAAABJRU5ErkJggg==" | base64 -d > icons/calc.png ``` The `view` field tells the host which QML file to load for the UI. The `dependencies` field tells the host to load `calc_module` before showing your UI. diff --git a/tests/tutorial-cpp-ui-app.test.yaml b/tests/tutorial-cpp-ui-app.test.yaml index 4f4c153..d315cc5 100644 --- a/tests/tutorial-cpp-ui-app.test.yaml +++ b/tests/tutorial-cpp-ui-app.test.yaml @@ -144,13 +144,13 @@ sections: } } post_text: | - Create the icon directory and add a placeholder icon (displayed in the `logos-basecamp` sidebar when the module is loaded): + Create the icon directory and add a placeholder icon — a PNG that is exactly 256×256, the only size LGX packaging accepts (displayed in the `logos-basecamp` sidebar when the module is loaded): - - run: "mkdir -p icons && echo 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAmElEQVR4nO3QMREAIBDAsFeEN3ziCWRkoEP2XmedfX82OkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAO0BN/SiO/PatoIAAAAASUVORK5CYII=' | base64 -d > icons/calc.png" + - run: "mkdir -p icons && echo 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEUuzHEuzHEVOa2oAAAAH0lEQVR42u3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABYOSdlwAAAABJRU5ErkJggg==' | base64 -d > icons/calc.png" code_block: | mkdir -p icons - # Copy any PNG here — or generate a 64×64 placeholder: - echo "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAmElEQVR4nO3QMREAIBDAsFeEN3ziCWRkoEP2XmedfX82OkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAO0BN/SiO/PatoIAAAAASUVORK5CYII=" | base64 -d > icons/calc.png + # Copy any PNG here — or generate a 256×256 placeholder: + echo "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEUuzHEuzHEVOa2oAAAAH0lEQVR42u3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABYOSdlwAAAABJRU5ErkJggg==" | base64 -d > icons/calc.png post_text: | Key fields: diff --git a/tests/tutorial-qml-ui-app.test.yaml b/tests/tutorial-qml-ui-app.test.yaml index 6d1443b..e8ffc0c 100644 --- a/tests/tutorial-qml-ui-app.test.yaml +++ b/tests/tutorial-qml-ui-app.test.yaml @@ -103,13 +103,13 @@ sections: } } post_text: | - Create the icon directory and add a placeholder icon. The icon is displayed in the `logos-basecamp` sidebar when the module is loaded: + Create the icon directory and add a placeholder icon. It must be a PNG that is exactly 256×256 — LGX packaging rejects any other size. The icon is displayed in the `logos-basecamp` sidebar when the module is loaded: - - run: "mkdir -p icons && echo 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAmElEQVR4nO3QMREAIBDAsFeEN3ziCWRkoEP2XmedfX82OkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAO0BN/SiO/PatoIAAAAASUVORK5CYII=' | base64 -d > icons/calc.png" + - run: "mkdir -p icons && echo 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEUuzHEuzHEVOa2oAAAAH0lEQVR42u3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABYOSdlwAAAABJRU5ErkJggg==' | base64 -d > icons/calc.png" code_block: | mkdir -p icons - # Copy any PNG here — or generate a 64×64 placeholder: - echo "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAmElEQVR4nO3QMREAIBDAsFeEN3ziCWRkoEP2XmedfX82OkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAK0BOkBrgA7QGqADtAboAO0BN/SiO/PatoIAAAAASUVORK5CYII=" | base64 -d > icons/calc.png + # Copy any PNG here — or generate a 256×256 placeholder: + echo "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEUuzHEuzHEVOa2oAAAAH0lEQVR42u3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABYOSdlwAAAABJRU5ErkJggg==" | base64 -d > icons/calc.png post_text: | The `view` field tells the host which QML file to load for the UI. The `dependencies` field tells the host to load `calc_module` before showing your UI.