Repository navigation
fix(iconbox): fit custom transparent icon art by alpha bounds (#130) - #131
Conversation
Custom icon art (--icon, showcase.yml icon, assets/icon.png) is cropped to its alpha bounds in the compositor so transparent margins no longer shrink the art. Bundled brand marks and logos, opaque or full-bleed icons, pixel art and blank images are unchanged. Source files are never modified. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Synthetic regression and control tests for iconbox.alpha_fit and the plate geometry: palette transparency, RGBA, blank, fully covered, opaque and full-bleed, pixel-art sizing, bundled brand marks and logos, org mark, and source PNG bytes unchanged. Fixtures are generated under tmp_path. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#130) When icon_pixel_art is set, the alpha crop must never run, including when native_pixels() does not recognize the grid. Previously a 257x257 transparent icon was cropped to 153x125 instead of keeping the retained 257x257 image at the 100x100 placement. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Adds a control for a 257x257 transparent icon with icon_pixel_art set. The native grid is unrecognized, so the image must stay 257x257 at the main placement (no alpha crop). The flag-off contrast still crops by alpha bounds, proving the flag prevents the crop. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… grid (#130) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
is_bundled_brand_asset(path, root) returns True for any file under <skill root>/assets/brand, so bundled marks and logos keep their full canvas whichever selection route (cli, override, repo) picks them. Custom transparent art is still fitted by its alpha bounds. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Adds tests for bundled brand PNGs through the cli and override routes, the path-based guard control, every real assets/brand PNG untouched, and is_bundled_brand_asset path checks. Existing tests unchanged. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…path (#130) Merges hk/130-fix1-2 (iconbox.py@131d624) and hk/130-fix1-3 (tests@68b5e67). Anything under assets/brand is protected by resolved path, not selection route; docs and changelog updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
Resolves #130
Change and affected skills
iconbox._icon_nodesnow fits custom transparent icon art by its alpha bounds, so a repository icon that fills only part of its canvas is no longer drawn undersized inside the fixed white plate. This is compositor behaviour only: raw and normalized PNG files are untouched. Palette (mode P) transparency is handled as well as RGBA. The fit never applies to pixel-art icons (icon_pixel_art, including an unrecognized pixel grid, which keeps main's retained size and placement), opaque full-bleed tiles or fully blank transparency. Any file underassets/brandis treated as bundled artwork and is never fitted, whichever route selected it (--icon,showcase.ymlicon or the repository default), decided by the resolved path (is_bundled_brand_asset). The golden plate geometry is unchanged. Also updates CHANGELOG andreferences/banner-layout.md.Prior work
Searched open and closed issues and PRs for alpha bounds, icon padding, undersized icon, contact sheet and transparent margins: none. Related merged work: #126 (ground handling in the normalizer) is reused, not duplicated. Open PRs #13 and #123 do not touch
iconbox.py.Tests and evidence (head
6c31d31ab045e546ec33c753a3633f94fda1dafb, base mainef9d6d2e11e30366ca84fd2d75b67cf068c1a6de)vm-6c31d31a...-result.json); whole-tree ruff passes.alpha-fit-acceptance12-6c31d31a...json): all 12 checks pass: the 8 bundled brand PNGs through both the CLI and the override selection route stay unchanged, the unrecognized pixel-grid fallback is preserved, the non-pixel custom art fit is correct and the explicit bundled brand is unchanged. The earlier heads failed this gate: 69b829e cropped pixel-art icons on an unrecognized grid, and c342d68 wrongly croppedlogo-dark.pngandlogo-dark-full.png; both are fixed in this head and pinned by committed synthetic tests intests/test_iconbox_alpha_fit.py.visual-review-130-6c31.json): verdict PASS on this exact head. The repository's own outputs (visual-own-6c31d31-c1bd32b1) were rendered in a private folder through this head's realshowcase.py(all five CLI commands exit 0) from freshly fetched public metadata, with the raw icon normalized by the final CLI (54099 bytes); the own dark and light contact sheets at 1012 and 390 wide and the 48 px icon were viewed. The example outputs (visual-candidate-6c31d31-9976d8d0, all four CLI commands exit 0) were viewed on both backgrounds at 1012 and 390 wide. All compositions pass: centred artwork, unchanged plate geometry, no clipping or overlap, legible text. This satisfies the issue's own-and-representative regeneration and visual review requirement. No generated asset is committed in this PR.i130-r2-full) was interrupted and is NOT counted as a pass; a later native run on this head is supplemental and is read from its log, hosted Windows CI covers the platform.Boundaries
Activation keys, consent, private assets, approval gates and specialist entry points are untouched. No registry release, visibility change or live external action is implied.
Family consistency
Single-skill compositor change; no sibling PRs affected. Drift-audit result is owned by the orchestrator.
🤖 Generated with Claude Code