chore: draw the toolbar icons in-tree with make icons #489

Merged
clawbot merged 1 commits from issue-378-icon-generator into next 2026-10-07 06:43:08 +02:00
Collaborator

Closes #378.

script/lib/icons.js draws the toolbar mark and writes each PNG with node's own zlib (IHDR, one IDAT, IEND, filter type 0), with no new dependency and no fetch. make icons runs it for every size manifest/chrome.json declares and leaves alone a file that already holds the drawn image, so running it does not rewrite the committed icons. tests/icons.test.js requires each committed file to hold exactly the image it draws.

What the diff does not show:

  • The coordinates were never recorded on #376; they were read back out of the committed PNGs. With them every pixel matches at all four sizes, and the four committed files are unchanged.
  • Colour and alpha round a half to the even neighbour, as the committed files were made; Math.round would change some pixels by one.
  • The reader in the generator refuses a bad signature, a wrong CRC-32 and any chunk but IHDR, IDAT and IEND. It compares rows with their filter type byte, so a file using another filter does not match even where its pixels do.

Disclosures:

  • Deviation: the test compares the decoded image (IHDR and every pixel), not the file bytes, because node's bundled zlib cannot reproduce the stock zlib compression of the committed files.
  • Judgement call: that decision was recorded by the repo manager at #378 (comment), not by the owner.
  • Optional notes: the duplicated manifest paths in build.js are folded in; the build-time PNG content check is not.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/AutistMask/issues/378. `script/lib/icons.js` draws the toolbar mark and writes each PNG with node's own `zlib` (IHDR, one IDAT, IEND, filter type 0), with no new dependency and no fetch. `make icons` runs it for every size `manifest/chrome.json` declares and leaves alone a file that already holds the drawn image, so running it does not rewrite the committed icons. `tests/icons.test.js` requires each committed file to hold exactly the image it draws. What the diff does not show: - The coordinates were never recorded on https://git.eeqj.de/sneak/AutistMask/pulls/376; they were read back out of the committed PNGs. With them every pixel matches at all four sizes, and the four committed files are unchanged. - Colour and alpha round a half to the even neighbour, as the committed files were made; `Math.round` would change some pixels by one. - The reader in the generator refuses a bad signature, a wrong CRC-32 and any chunk but IHDR, IDAT and IEND. It compares rows with their filter type byte, so a file using another filter does not match even where its pixels do. Disclosures: - Deviation: the test compares the decoded image (IHDR and every pixel), not the file bytes, because node's bundled zlib cannot reproduce the stock zlib compression of the committed files. - Judgement call: that decision was recorded by the repo manager at https://git.eeqj.de/sneak/AutistMask/issues/378#issuecomment-131108, not by the owner. - Optional notes: the duplicated manifest paths in `build.js` are folded in; the build-time PNG content check is not. Model: opus-5-5
clawbot added the needs-review label 2026-10-07 05:57:51 +02:00
clawbot self-assigned this 2026-10-07 05:57:51 +02:00
clawbot added 1 commit 2026-10-07 06:12:56 +02:00
chore: draw the toolbar icons in-tree with make icons (closes #378)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
f76785f4dd
script/lib/icons.js draws the mark from geometry read back out of the
committed PNGs, since the coordinates were never recorded, and writes each
PNG with node's own zlib. `make icons` runs it and leaves alone a file that
already holds the drawn image.

tests/icons.test.js requires each committed file to hold exactly that
image: the same IHDR and every pixel. The compressed bytes are not
compared, because node's bundled zlib does not compress as the stock zlib
that made the committed files did; the decision is recorded on the issue.

build.js copies the manifests from MANIFEST_SOURCES instead of naming the
two paths a second time.

Model: opus-5-5
clawbot force-pushed issue-378-icon-generator from 189bd3f4ba to f76785f4dd 2026-10-07 06:12:56 +02:00 Compare
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit eeb10c20ef into next 2026-10-07 06:43:08 +02:00
clawbot deleted branch issue-378-icon-generator 2026-10-07 06:43:08 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#489