Skip to content

fix(iconbox): fit custom transparent icon art by alpha bounds (#130) - #131

Merged
CompleteDotTech merged 12 commits into
mainfrom
fix/130-alpha-fit
Nov 1, 2026
Merged

CompleteDotTech merged 12 commits into
mainfrom
fix/130-alpha-fit

Conversation

@CompleteDotTech

@CompleteDotTech CompleteDotTech commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #130

Change and affected skills

iconbox._icon_nodes now 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 under assets/brand is treated as bundled artwork and is never fitted, whichever route selected it (--icon, showcase.yml icon or the repository default), decided by the resolved path (is_bundled_brand_asset). The golden plate geometry is unchanged. Also updates CHANGELOG and references/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 main ef9d6d2e11e30366ca84fd2d75b67cf068c1a6de)

  • Exact-head VM: all four required commands (package tests, package validator, full pytest, quality validator) passed in the designated VM: 1304 passed, 11 skipped, 37 subtests passed (vm-6c31d31a...-result.json); whole-tree ruff passes.
  • Alpha-fit acceptance (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 cropped logo-dark.png and logo-dark-full.png; both are fixed in this head and pinned by committed synthetic tests in tests/test_iconbox_alpha_fit.py.
  • Visual acceptance (Codex role, root; 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 real showcase.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.
  • Limits: this is renderer acceptance only. The repository's own final banner, card, social images, the normalized icon and the persistent key chip are a separate follow-up unit and are not part of this PR.
  • Windows: the owner's earlier local Windows full run on c342d68 (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.
  • CI: required checks (validate-package and pytest on ubuntu/windows/macos, validate) are read back from the checks tab before merge (not asserted here).
  • Reviews: independent reviews of this exact head (two Opus and Sol) and the merge gate are outstanding; this description does not claim readiness to merge.

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

CompleteDotTech and others added 12 commits November 1, 2026 02:47
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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-01T08:09:01.988727Z
We couldn’t complete this review. Comment @codex review to try again.
c342d68 PR opened
🔒 Security Review ⚠️ Failed 2026-11-01T08:09:09.954927Z
We couldn’t complete this review. Comment @codex security review to try again.
c342d68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

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.

@CompleteDotTech
CompleteDotTech merged commit 04fbc0a into main Nov 1, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom transparent icon art is scaled by its whole canvas and renders undersized in the plate

1 participant