Skip to content

Conversation

@mateuszJS
Copy link
Owner

@mateuszJS mateuszJS commented Oct 9, 2025

Summary by CodeRabbit

  • New Features
    • Updated creation tools: Select Asset, Draw Bezier Curve, Select Node, and Text.
  • Bug Fixes
    • Shapes now always include bounds for more accurate initial placement, selection, and hit-testing.
    • Safer rendering padding prevents rare crashes with extreme effect values.
    • Property changes are detected more reliably, reducing unexpected redraws.
    • Applying/removing blur properly manages cache textures, preventing visual artifacts.
  • Chores
    • Reduced debug output for a cleaner console/log experience.

Copilot AI review requested due to automatic review settings October 9, 2025 16:25
@coderabbitai
Copy link

coderabbitai bot commented Oct 9, 2025

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title references the props comparison updates and the CreatorTool enum changes, both of which are part of the pull request, but it omits other major updates such as making bounds required and broader serialization logic adjustments, so it only partially summarizes the overall scope.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-ts-types

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb2602e and 63eb7c1.

📒 Files selected for processing (2)
  • src/logic/asset_props.zig (3 hunks)
  • src/logic/sdf/fill.zig (2 hunks)
🔇 Additional comments (5)
src/logic/sdf/fill.zig (2)

9-17: LGTM!

The GradientStop.compare method correctly uses tolerant float comparison (utils.equalF32) for both the offset and each color channel, which is appropriate for floating-point equality checks after serialization/deserialization.


38-87: LGTM!

The SerializedFill.compare method correctly handles all three variants:

  • Solid fills compare color channels with tolerant float equality
  • Linear and radial gradients compare all relevant fields (bounds, radius, stops) with appropriate utilities
  • Type mismatches correctly return false via the nested switch pattern
  • Length guards prevent out-of-bounds access before iterating stops
src/logic/asset_props.zig (3)

22-37: LGTM!

The serialize method correctly constructs a SerializedProps by iterating through sdf_effects and serializing each effect's fill, while preserving the filter and opacity values.


45-70: LGTM!

The compare method correctly implements deep equality:

  • Uses tolerant float comparison for opacity and effect distances
  • Properly handles the optional filter field (checking both presence and value)
  • Guards against length mismatches before iterating sdf_effects
  • Delegates fill comparison to the appropriate method

73-90: LGTM!

The refactored deserializeProps now accepts SerializedProps as self instead of a separate parameter, making the API more consistent. The comment explains the design decision to keep it as a free function rather than a method.


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

@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.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 638b10f and eb2602e.

📒 Files selected for processing (10)
  • src/index.ts (3 hunks)
  • src/logic/asset_observer.zig (1 hunks)
  • src/logic/asset_props.zig (3 hunks)
  • src/logic/index.d.ts (1 hunks)
  • src/logic/index.zig (3 hunks)
  • src/logic/sdf/fill.zig (2 hunks)
  • src/logic/sdf/sdf.zig (1 hunks)
  • src/logic/shapes/shapes.zig (5 hunks)
  • src/logic/texts/texts.zig (2 hunks)
  • src/logic/utils.zig (1 hunks)

@mateuszJS mateuszJS merged commit c79dbe4 into next Oct 9, 2025
6 checks passed
@github-actions
Copy link

github-actions bot commented Oct 9, 2025

🎉 This PR is included in version 0.1.0-next.25 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants