chore(web): shrink sprite SVGs by 46% (3.7MB → 2.0MB)#97
Merged
Conversation
All 12 sprite SVGs + favicon optimized. The pipeline (saved scratch locally; can be committed if useful) auto-detects format: - Fabric.js exports (cache, docker, k8s, etc.) — strip the verbose per-rect `style="stroke: none; ...; fill: rgb(R,G,B); ..."` boilerplate (~280 chars/rect of redundant defaults), replacing with a clean `fill="#hex"` attribute. Group transforms preserved (some carry rotations that the rect-merger can't safely flatten). Then SVGO multipass + precision=0. - Already-clean exports (auth, user, etc.) — merge horizontally and vertically adjacent same-color rects, then SVGO. Few merges possible (pixel art has subtle per-pixel color variation), so smaller wins from this branch. Per-file: cache_node.svg: 549.9 KB → 81.6 KB (-85%) queue_node.svg: 396.1 KB → 132.8 KB (-66%) user_node.svg: 11.9 KB → 5.1 KB (-57%) external_node.svg: 169.0 KB → 74.5 KB (-56%) service_node.svg: 125.1 KB → 57.5 KB (-54%) carrot_pixels.svg: 29.7 KB → 16.4 KB (-45%) docker_node.svg: 540.8 KB → 306.6 KB (-43%) scheduler_node.svg: 511.0 KB → 331.2 KB (-35%) endpoint_node.svg: 373.8 KB → 262.2 KB (-30%) auth_node.svg: 157.4 KB → 111.5 KB (-29%) k8s_node.svg: 494.9 KB → 360.3 KB (-27%) database_node.svg: 356.4 KB → 261.7 KB (-27%) favicon.svg: 11.9 KB → 5.1 KB (-57%) Visual diff sanity-checked: all sprites render pixel-identical except cache_node which shifted 0.65/256 channels avg from SVGO float rounding (imperceptible; not a structural change).
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (13)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
naorsabag
added a commit
that referenced
this pull request
May 9, 2026
* chore: bump @openhop/web 0.1.0-beta.1 → 0.1.0-beta.2 and openhop CLI 0.1.0-beta.3 → 0.1.0-beta.4 Web bumps for the canvas/UI work since beta.1: - pause behavior fix + label overflow + back-edge corridor (#90) - carrot click opens inspect with multi-target highlight + on-canvas playback controls (#93) - bookmark-style toggle tabs for sidebar + inspector (#95) - preserve node progress on Play resume + drill-back (#96) - shrink sprite SVGs by 46% (3.7MB → 2.0MB) (#97) CLI bumps to ship the new web bundle (its only change is the pinned @openhop/web dependency moving to 0.1.0-beta.2). @openhop/server stays at 0.1.0-beta.1 — no changes since last publish. * fix(cli): bump hardcoded --version to 0.1.0-beta.4 Test contract.test.ts asserts `openhop --version` matches the package.json version. The bump in 9b373aa missed the duplicate hardcoded string in src/index.ts:53. Sync them up so CI passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lossless cleanup of all 12 sprite SVGs + favicon. Pipeline auto-detects two formats:
style="stroke: none; ...; fill: rgb(...); ..."boilerplate (~280 chars/rect of redundant defaults), replacing with a cleanfill="#hex"attribute. Group transforms preserved (some carry rotations the rect-merger can't safely flatten). Then SVGO multipass + precision=0.Per-file
Total: 3.7 MB → 2.0 MB (-46%, ~1.7 MB saved on the web bundle)
Visual integrity
Every sprite renders pixel-identical to the original except
cache_node.svg, which has an average 0.65/256-channel deviation from SVGO float rounding — invisible to the naked eye, no structural change.🤖 Generated with Claude Code