Skip to content

πŸ› fix(ui): resolve iconify aliases in the icon bundle (forward-port #683) - #686

Merged
scttbnsn merged 1 commit into
dev/v1.7from
fix/v1.7-icon-bundle-aliases
Aug 9, 2026
Merged

πŸ› fix(ui): resolve iconify aliases in the icon bundle (forward-port #683)#686
scttbnsn merged 1 commit into
dev/v1.7from
fix/v1.7-icon-bundle-aliases

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Forward-ports #683 to dev/v1.7. #680 fixed the symptom here (direct icon-name renames) but not the root cause: ui/scripts/extract-icons.mjs still dropped icons that iconify collections demote to aliases (collection.aliases[name].parent), so any future collection bump could silently ship broken icons again β€” that's exactly how rc.12 shipped a blank Audit icon.

What's in the port:

  • extract-icons.mjs: resolveIcon() follows alias parent chains (depth-capped), merges alias overrides, refuses transform-requiring aliases with a warning.
  • ui/tests/boot/icon-bundle.spec.ts: guard test β€” every prefix:name ref in icons.ts must exist in the bundle with a body.
  • iconoir:stack β†’ multiple-pages (πŸ”’ security: v1.7 hygiene β€” icon integrity, base-image CVE bumps, dead SW ruleΒ #680 had picked cube; multiple-pages matches v1.6 and verified valid against locked iconoir 1.2.11).
  • @iconify-json/fa6-brands 1.2.4 β†’ 1.2.6 exact-pinned (devDependencies).
  • Bundle regenerated: 576/576 refs, zero warnings, 229.8 KB; npm run build leaves the tree clean.

4508 UI tests, 100% coverage, full pre-push gate green.

Changelog

  • ✨ Added recursive Iconify alias resolution with parent-chain traversal, override merging, depth limits, and transform warnings.
  • ✨ Added a guard test for missing or empty icon bundle entries.
  • πŸ”§ Replaced iconoir:cube with iconoir:multiple-pages for the stack icon.
  • πŸ”§ Pinned @iconify-json/fa6-brands to 1.2.6.
  • πŸ› Fixed extraction of indirect icon aliases.

Concerns

  • Verify aliases with rotation or flipping produce actionable warnings and do not enter the body-only bundle.
  • Keep the guard test aligned with all supported icons.ts reference formats.
  • Confirm the regenerated bundle contains all 576 references with nonempty bodies.

…bundle

Forward-port of #683 (squash commit 97a2f56 on dev/v1.6) to dev/v1.7.

The icon bundle is regenerated from the locked `@iconify-json` packages
during every Docker image build (`npm run build` β†’ `npm run icons`), but
`extract-icons.mjs` only looked up plain icon entries β€” never aliases.
lucide 1.2.121 demoted `history` to an alias of `rotate-ccw-clock`, so a
bundle built against lockfile-correct packages silently drops any icon
that becomes an alias upstream, with no network fallback since the
iconify API module is offline-only.

`extract-icons.mjs` now resolves alias chains (parent-following,
depth-capped at 5); aliases carrying rotate/flip transforms are refused
with a warning since the body-only bundle can't represent them. A new
`ui/tests/boot/icon-bundle.spec.ts` guard test asserts every
`'prefix:name'` reference in `src/icons.ts` exists in the generated
bundle with a body.

dev/v1.7 already carried #680's independent fix for the same class of
stale reference (direct renames in `icons.ts` + `ui/tests/icons.spec.ts`
guard). Both are kept: `iconoir:history`/`gitlab`/`key-alt` and
`lucide:more-vertical` stay on #680's already-correct targets
(`clock-rotate-right`/`gitlab-full`/`key`/`ellipsis-vertical`); the
`iconoir:stack` conflict resolved to this fix's `multiple-pages` target
(#680 had picked `cube`) since `multiple-pages` is what actually exists
in the locked iconoir 1.2.11 collection β€” verified by a zero-warning
bundle regeneration. `@iconify-json/fa6-brands` bumped to the
exact-pinned 1.2.6 devDependency this fix adds. Bundle regenerated
against dev/v1.7's lockfile: 576/576 references extracted, zero
warnings.
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview Aug 9, 2026 4:38am
drydockdemo-website Ready Ready Preview Aug 9, 2026 4:38am

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ac0f62e-bdd5-4f92-bb29-995d248f809a

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 68a49fa and 3b7d848.

β›” Files ignored due to path filters (2)
  • CHANGELOG.md is excluded by !CHANGELOG.md
  • ui/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
πŸ“’ Files selected for processing (5)
  • ui/package.json
  • ui/scripts/extract-icons.mjs
  • ui/src/boot/icon-bundle.json
  • ui/src/icons.ts
  • ui/tests/boot/icon-bundle.spec.ts

πŸ“ Walkthrough

Walkthrough

The icon extraction script now resolves direct icons and untransformed aliases recursively, with a five-level limit. Transformed aliases are rejected. The Font Awesome brands dependency is updated. The stack mapping and generated bundle now use iconoir:multiple-pages. A new test verifies that every icon reference has a nonempty bundled body.

Possibly related PRs

  • CodesWhat/drydock#683: Contains the same alias resolver, icon mapping, dependency, bundle, and validation changes.
  • CodesWhat/drydock#685: Overlaps with the alias resolution, bundle, mapping, dependency, and test updates.
  • CodesWhat/drydock#680: Shares changes to the icon bundle, icon mappings, dependency, and bundle integrity.
πŸš₯ Pre-merge checks | βœ… 2
βœ… Passed checks (2 passed)
Check name Status Explanation
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v1.7-icon-bundle-aliases

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scttbnsn
scttbnsn merged commit cae6d71 into dev/v1.7 Aug 9, 2026
28 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.7-icon-bundle-aliases branch August 9, 2026 05:01
scttbnsn added a commit that referenced this pull request Aug 12, 2026
Three things landed on `dev/v1.6` during the GA push and never reached
`dev/v1.7`. Found by diffing the two branches after the GA sync made
`dev/v1.6` and `main` tree-identical.

### 1. OpenSSF assurance evidence (`a8b33673`, #699)

`GOVERNANCE.md`, `SECURITY-ASSURANCE.md`, and the Best Practices badge
in the README. This is the one that actually bites: drydock earned the
[Silver badge](https://www.bestpractices.dev/en/projects/11915) on
2026-08-12 specifically because the GA sync put that badge on `main`'s
front page. The first v1.7 sync to `main` would have deleted it again
and dropped `documentation_achievements` back to Unmet, losing Silver.

### 2. Star history through GraphQL (`38819656`)

v1.7 still had the REST `/stargazers` path. That endpoint 401s
anonymously and, for a fine-grained token, demands `contents=write` β€”
far more than a public star chart should hold β€” so the route fell back
on every request and getdrydock.com just said "loading". The GraphQL
stargazers connection needs only `metadata=read`.

### 3. Auditable soak override (`2b55ff4b`)

The `soak_override_reason` dispatch input, its validation, and the
311-line test. The 604800s floor is untouched. Used once, for the v1.6.0
GA cut at 3.0 days; v1.7 should have the same escape hatch and the same
audit trail.

### Deliberately not carried over

- `daf12292` β€” v1.6.0 GA release identity and CHANGELOG. v1.7 produces
its own.
- `b98808e7` β€” rc.13 release identity.
- `bd6f598d` β€” base-image digest bumps. The Dockerfile is already
byte-identical; `cee3a686` covered it on this branch.
- `#689` and `#683` show up in the commit gap but were already
forward-ported as `#690` and `#686`.

### Verification

- `apps/web/src/app/api/star-history/route.ts` and
`.github/workflows/release-cut.yml` are byte-identical to `dev/v1.6`.
- `npm run test:workflows` β€” 80/80.
- `node --test apps/web/scripts/marketing-performance.test.mjs` β€” 6/6.
- Full pre-push gate green, including coverage.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Changelog

- ✨ Added OpenSSF governance, security-assurance documentation, and Best
Practices Silver badge.
- ✨ Added authenticated GitHub GraphQL pagination for star history.
- ✨ Added GA-only `soak_override_reason` support with validation, audit
output, and release-note disclosure.
- ✨ Added tests for GraphQL pagination, malformed responses, token
handling, and soak override boundaries.
- πŸ”§ Replaced REST `/stargazers` requests with GitHub GraphQL requests.
- πŸ”’ Documented per-path outbound-request controls, fail-closed
authentication, release integrity, and residual risks.

## Concerns

- Verify `GITHUB_TOKEN` exists in every runtime that serves the
star-history route.
- Verify malformed or incomplete GraphQL pagination returns fallback
data and no partial results.
- Verify prerelease workflows reject `soak_override_reason` before
release actions run.
- Verify shortened, multiline, and sanitized override reasons remain
safe in workflow outputs and release notes.
- Review the documented IFTTT outbound path and its missing shared
timeout control.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Test <test@example.com>
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.

2 participants