Skip to content

Merge origin/main into origin/feat/2.9#1443

Closed
yiiqii wants to merge 5 commits intofeat/2.9from
main
Closed

Merge origin/main into origin/feat/2.9#1443
yiiqii wants to merge 5 commits intofeat/2.9from
main

Conversation

@yiiqii
Copy link
Copy Markdown
Collaborator

@yiiqii yiiqii commented Apr 17, 2026

Summary by CodeRabbit

Release Notes – Version 2.8.11

  • Bug Fixes

    • Fixed shape gradient interpolation issue
  • Chores

    • Version bump to 2.8.11 across all packages
    • Updated changelogs

yiiqii and others added 5 commits February 27, 2026 12:15
Merge origin/main into origin/dev
* fix: shape gradient interpolation issue

* chore: update
* fix: shape gradient interpolation issue

* chore: update

Co-authored-by: 茂安 <151805118+wumaolinmaoan@users.noreply.github.com>
@yiiqii yiiqii requested review from Copilot and wumaolinmaoan April 17, 2026 08:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

This PR releases version 2.8.11 as a patch, addressing a shape gradient interpolation issue. Changes include version bumps across multiple packages, updates to changelogs documenting the fix, modifications to Husky hook scripts, and refactoring of gradient computation logic to properly handle edge cases.

Changes

Cohort / File(s) Summary
Husky Hook Scripts
.husky/commit-msg, .husky/pre-commit
Removed shebang (#!/bin/sh) and Husky bootstrap sourcing line (. "$(dirname "$0")/_/husky.sh"), leaving only environment PATH augmentation and command invocations.
Changelog Entries
CHANGELOG.md, CHANGELOG-zh_CN.md
Added new 2.8.11 release entry (dated 2026-04-17) documenting the shape gradient interpolation fix; updated 2.8.10 entry formatting and Chinese punctuation.
Package Version Bumps
packages/effects-core/package.json, packages/effects-helper/package.json, packages/effects-threejs/package.json, packages/effects-webgl/package.json, packages/effects/package.json, plugin-packages/alipay-downgrade/package.json, plugin-packages/downgrade/package.json, plugin-packages/editor-gizmo/package.json, plugin-packages/ffd/package.json, plugin-packages/ktx2/package.json, plugin-packages/model/package.json, plugin-packages/multimedia/package.json, plugin-packages/orientation-transformer/package.json, plugin-packages/rich-text/package.json, plugin-packages/spine/package.json, plugin-packages/stats/package.json
Incremented version field from 2.8.10 to 2.8.11 across all packages.
Gradient Computation Logic
packages/effects-core/src/math/value-getters/value-getter.ts, packages/effects-core/src/utils/color.ts, packages/effects-core/src/utils/image-data.ts
Refactored gradient value interpolation to explicitly handle edge cases: return defaults for empty stops, clamp time to boundary stops, consolidate stop selection logic, remove synthetic stop injection, and rewrite pixel sampling loop for consistent boundary handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • docs: changelog 2.8.10 #1428: Updates CHANGELOG for 2.8.10 entry formatting; related as this PR builds upon those changelog changes while introducing the 2.8.11 entry.

Suggested reviewers

  • wumaolinmaoan

Poem

🐰✨ A gradient bug hops away today,
With edge cases caught in every way—
Boundaries now clamp, interpolations aligned,
Twenty-point-eight through eleven, refined!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes a merge operation (merging origin/main into origin/feat/2.9) rather than summarizing the actual changes in the pull request, which include a version bump to 2.8.11, shape gradient interpolation fixes, and changelog updates. Change the title to reflect the actual substantive changes, such as 'Release 2.8.11: Fix shape gradient interpolation issue' or 'Bump version to 2.8.11 and fix gradient interpolation bug'.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 main

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/effects-core/src/utils/color.ts (1)

50-62: Optional: the fallback initialization on Line 51 is unreachable.

In the else branch, stops[0].time < key < stops[stops.length - 1].time, so with sorted stops at least one adjacent pair (s0, s1) must satisfy s0.time <= key <= s1.time and the loop will always assign color. The pre-loop color = stops[stops.length - 1].color.toArray(); is effectively dead defensive code and can be dropped (declaring let color: number[]; is sufficient since TS will be satisfied once the loop provably assigns — or an explicit unreachable assertion could be used). Non-blocking.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/effects-core/src/utils/color.ts` around lines 50 - 62, Remove the
unreachable defensive initialization before the loop: declare color without
assigning (e.g., let color: number[];) instead of setting color =
stops[stops.length - 1].color.toArray(); then rely on the for-loop that checks
adjacent stop pairs (using stops, key, s0.time/s1.time and interpolateColor) to
assign color and break; this removes the dead fallback assignment while keeping
the same interpolation logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/effects-core/src/utils/color.ts`:
- Around line 50-62: Remove the unreachable defensive initialization before the
loop: declare color without assigning (e.g., let color: number[];) instead of
setting color = stops[stops.length - 1].color.toArray(); then rely on the
for-loop that checks adjacent stop pairs (using stops, key, s0.time/s1.time and
interpolateColor) to assign color and break; this removes the dead fallback
assignment while keeping the same interpolation logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 926cffd4-4077-4f2b-b3f5-b2d6ef65b581

📥 Commits

Reviewing files that changed from the base of the PR and between e7db767 and b36f02e.

⛔ Files ignored due to path filters (1)
  • packages/effects-core/src/plugins/shape/shaders/shape.frag.glsl is excluded by !**/*.glsl
📒 Files selected for processing (23)
  • .husky/commit-msg
  • .husky/pre-commit
  • CHANGELOG-zh_CN.md
  • CHANGELOG.md
  • packages/effects-core/package.json
  • packages/effects-core/src/math/value-getters/value-getter.ts
  • packages/effects-core/src/utils/color.ts
  • packages/effects-core/src/utils/image-data.ts
  • packages/effects-helper/package.json
  • packages/effects-threejs/package.json
  • packages/effects-webgl/package.json
  • packages/effects/package.json
  • plugin-packages/alipay-downgrade/package.json
  • plugin-packages/downgrade/package.json
  • plugin-packages/editor-gizmo/package.json
  • plugin-packages/ffd/package.json
  • plugin-packages/ktx2/package.json
  • plugin-packages/model/package.json
  • plugin-packages/multimedia/package.json
  • plugin-packages/orientation-transformer/package.json
  • plugin-packages/rich-text/package.json
  • plugin-packages/spine/package.json
  • plugin-packages/stats/package.json
💤 Files with no reviewable changes (2)
  • .husky/commit-msg
  • .husky/pre-commit

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR merges changes from origin/main into origin/feat/2.9, bumping package versions and updating gradient interpolation behavior in both CPU-side utilities and the shape fragment shader.

Changes:

  • Bump multiple workspace packages/plugins from 2.8.10 to 2.8.11.
  • Fix gradient interpolation/clamping logic across TS utilities/value-getters and the shape fragment shader.
  • Update changelogs for 2.8.11 and adjust Husky hook scripts.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugin-packages/stats/package.json Version bump to 2.8.11
plugin-packages/spine/package.json Version bump to 2.8.11
plugin-packages/rich-text/package.json Version bump to 2.8.11
plugin-packages/orientation-transformer/package.json Version bump to 2.8.11
plugin-packages/multimedia/package.json Version bump to 2.8.11
plugin-packages/model/package.json Version bump to 2.8.11
plugin-packages/ktx2/package.json Version bump to 2.8.11
plugin-packages/ffd/package.json Version bump to 2.8.11
plugin-packages/editor-gizmo/package.json Version bump to 2.8.11
plugin-packages/downgrade/package.json Version bump to 2.8.11
plugin-packages/alipay-downgrade/package.json Version bump to 2.8.11
packages/effects/package.json Version bump to 2.8.11
packages/effects-webgl/package.json Version bump to 2.8.11
packages/effects-threejs/package.json Version bump to 2.8.11
packages/effects-helper/package.json Version bump to 2.8.11
packages/effects-core/src/utils/image-data.ts Update gradient texture generation logic (clamping/interpolation)
packages/effects-core/src/utils/color.ts Adjust gradient stop handling and clamped lookup behavior
packages/effects-core/src/plugins/shape/shaders/shape.frag.glsl Fix shape gradient interpolation/clamping in fragment shader
packages/effects-core/src/math/value-getters/value-getter.ts Clamp gradient value getter for empty/out-of-range times
packages/effects-core/package.json Version bump to 2.8.11
CHANGELOG.md Add 2.8.11 entry and minor formatting fix
CHANGELOG-zh_CN.md Add 2.8.11 entry and punctuation/formatting fix
.husky/pre-commit Remove Husky header; leave lint-staged invocation
.husky/commit-msg Remove Husky header; leave commitlint invocation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .husky/commit-msg
Comment on lines 1 to 2
PATH=$PATH:/usr/local/bin:/usr/local/sbin
npx commitlint --edit "$1"
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The hook file no longer has a shebang. Git executes hooks as standalone executables; without a shebang (e.g. #!/usr/bin/env sh) this can fail with an “Exec format error” on POSIX systems. Add the shebang back (and ensure the file remains executable) so the hook reliably runs across environments.

Copilot uses AI. Check for mistakes.
Comment thread .husky/pre-commit
Comment on lines 1 to 2
PATH=$PATH:/usr/local/bin:/usr/local/sbin
npx lint-staged
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The hook file no longer has a shebang. Git executes hooks as standalone executables; without a shebang (e.g. #!/usr/bin/env sh) this can fail with an “Exec format error” on POSIX systems. Add the shebang back (and ensure the file remains executable) so the hook reliably runs across environments.

Copilot uses AI. Check for mistakes.
@yiiqii yiiqii closed this Apr 20, 2026
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.

3 participants