Skip to content

fix: update svgr to 0.50.3 so a nested group's fade is not drawn from a stale layer - #266

Merged
dmtrKovalenko merged 1 commit into
mainfrom
fix/nested-group-opacity-stale-layer
Nov 14, 2026
Merged

dmtrKovalenko merged 1 commit into
mainfrom
fix/nested-group-opacity-stale-layer

Conversation

@dmtrKovalenko

@dmtrKovalenko dmtrKovalenko commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Closes #264.

Problem

On the CPU backend, a group inside an isolated group (opacity below 1, a clip, a mask or a filter) kept the opacity it had the first time the outer group was drawn. A fade of the inner group did not fade in render, strip or frame with several times, because those share one layer cache across frames.

The cause was in usvgr: the layer cache key left out the opacity and blend mode of nested groups, although they are part of the cached pixels.

Fix

Updates svgr and usvgr from 0.50.2 to 0.50.3, which hashes a nested group's opacity and blend mode in the key (dmtrKovalenko/svgr#25). That release contains no other change.

Checks

  • cargo test -p fframes passes.
  • just e2e cpu passes: every example frame matches its snapshot within the tolerance.
  • The regression test for the issue's case is in svgr (nested_group_opacity_and_blend_mode_change_cached_layer). This PR adds no test in fframes.

Summary by CodeRabbit

  • Chores
    • Updated the tooling used for SVG graphics to a newer patch release. No changes to user-facing functionality are included in this update.

@what-the-diff

what-the-diff Bot commented Nov 14, 2026

Copy link
Copy Markdown

PR Summary

  • Updated SVG processing dependencies from version 0.50.2 to 0.50.3, keeping the project’s SVG tooling current.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 37132c08-02fe-43d7-8699-a4f09da21bd3
Commits

Reviewing files that changed from the base of the PR and between d4bf0e2 and 6d63834.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The workspace dependency versions for svgr and usvgr change from 0.50.2 to 0.50.3.

Changes: SVG dependency update

Layer / File(s) Summary
Update workspace dependency versions
Cargo.toml
The workspace versions of svgr and usvgr change from 0.50.2 to 0.50.3.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Merge Risk: Minimal · previous review d4bf0

This updates the SVG rendering dependencies to a patch release that fixes stale cached pixels when a nested group's opacity or blend mode changes. No merge-blocking risk is identified, and the reported tests and snapshot checks pass.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: it updates svgr to 0.50.3 and fixes a stale cached layer for a nested group's fade. The raw summary confirms the svgr and usvgr bump from 0.50.2 to 0.50.3. The PR objective…
Linked Issues check Passed The only directly linked issue, #264, is closed and marked as historical context only. No active directly linked targets remain, so no linked-issue coding requirements apply. The PR description and su…
Out of Scope Changes check Passed The reviewed change is a two-line version bump in Cargo.toml. It moves the workspace dependencies svgr and usvgr from 0.50.2 to 0.50.3. The PR description states that the 0.50.3 release is the fix for…
Full details: Title check

Explanation

The title names the change: it updates svgr to 0.50.3 and fixes a stale cached layer for a nested group's fade. The raw summary confirms the svgr and usvgr bump from 0.50.2 to 0.50.3. The PR objectives describe the layer-cache key fix for nested group opacity and blend mode, which matches the title's stated intent. The title is specific and relevant, though the summary mentions only the version bump in Cargo.toml, so the fix itself rests on the upstream svgr release.

Full details: Linked Issues check

Explanation

The only directly linked issue, #264, is closed and marked as historical context only. No active directly linked targets remain, so no linked-issue coding requirements apply. The PR description and summary also state this. No requirement from #264 was turned into a PR objective.

Full details: Out of Scope Changes check

Explanation

The reviewed change is a two-line version bump in Cargo.toml. It moves the workspace dependencies svgr and usvgr from 0.50.2 to 0.50.3. The PR description states that the 0.50.3 release is the fix for the nested group opacity and blend mode hashing problem described in #264. The bump is therefore the mechanism that implements the referenced fix, not an unrelated change. Cargo.lock is excluded from review (ignored by the !**/*.lock rule), so the lockfile update was not inspected. This does not change the assessment because the lockfile is a derived artifact of the same version bump. The regression test is in the svgr repository, not in this PR, which is consistent with the PR description.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 672cc740-f2aa-486b-a2bf-9a00a9bfb665
Commits

Reviewing files that changed from the base of the PR and between 7cf6712 and d4bf0e2.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 1

  • Cargo.toml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-nested-group-opacity-stale-layer-fframes.dmitriy-86d.workers.dev (commit 6d63834)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://ac08f46c-fframes.dmitriy-86d.workers.dev 6d63834 2026-11-14T20:16:08.834Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://746a2fdc-fframes.dmitriy-86d.workers.dev d4bf0e2 2026-11-14T19:29:54.982Z Visit the dashboard ↗

@dmtrKovalenko
dmtrKovalenko force-pushed the fix/nested-group-opacity-stale-layer branch from d4bf0e2 to 6d63834 Compare November 14, 2026 20:12
@dmtrKovalenko
dmtrKovalenko merged commit ef7618d into main Nov 14, 2026
14 checks passed
@dmtrKovalenko
dmtrKovalenko deleted the fix/nested-group-opacity-stale-layer branch November 14, 2026 23:59
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.

A nested group's opacity is left out of the layer cache key, so its fade renders stale

1 participant