Skip to content

fix(tasty): garbage collection in injector#1002

Merged
tenphi merged 6 commits intomainfrom
fix-missing-styles
Feb 4, 2026
Merged

fix(tasty): garbage collection in injector#1002
tenphi merged 6 commits intomainfrom
fix-missing-styles

Conversation

@tenphi
Copy link
Member

@tenphi tenphi commented Feb 4, 2026

Note

Medium Risk
Touches core CSS rule insertion/deletion bookkeeping used by the runtime style injector; mistakes could still cause missing or misapplied styles during cleanup, though coverage is improved with new regression tests.

Overview
Fixes an injector GC bug where deleting multiple rules at non-contiguous indices could corrupt the stored rule indices and make remaining styles disappear.

SheetManager now always tracks exact inserted rule indices, returns null when nothing was inserted, and adjusts remaining RuleInfo/keyframes indices using the actual deleted index set (not just a contiguous range). StyleInjector.property() now only records a custom @property as injected when the global rule insertion succeeds.

Adds regression tests covering non-contiguous deletions and multi-index rules to ensure indices and ruleCount stay consistent.

Written by Cursor Bugbot for commit d1cc141. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Feb 4, 2026 1:10pm
cube-ui-kit-cursor Ready Ready Preview, Comment Feb 4, 2026 1:10pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

🦋 Changeset detected

Latest commit: d1cc141

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

📦 NPM canary release

Deployed canary version 0.0.0-canary-25d66c2.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🧪 Storybook is successfully deployed!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🏋️ Size limit report

Name Size Passed?
All 358.59 KB (0% 🟰) Yes 🎉
Tree shaking (just a Button) 58.3 KB (-0.02% 🔽👏) Yes 🎉
Tree shaking (just tasty) 34.2 KB (-0.03% 🔽👏) Yes 🎉

Click here if you want to find out what is changed in this build

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@tenphi tenphi merged commit 0890e02 into main Feb 4, 2026
17 checks passed
@tenphi tenphi deleted the fix-missing-styles branch February 4, 2026 13:17
@github-actions github-actions bot mentioned this pull request Feb 4, 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.

1 participant