Instatic
Instatic copied to clipboard
feat(selectors-panel): add Used filter
Closes #301
Summary
- Add a "Used" filter to the Selectors panel, alongside the existing All/User/Utility/Unused filters, so editors can isolate in-use selectors for editing instead of only being able to filter away unused ones.
- Filter logic mirrors the existing Unused filter's implementation (
resolveSelectorUsage), covering both exact-count class selectors and provably-dead ambient selectors.
Test plan
- [x] New test
filters to only used selectorsinselectorsPanel.test.tsx, written TDD-first (watched it fail before implementing) - [x]
bun test src/__tests__/panels/selectorsPanel.test.tsx— 32/32 pass - [x]
bun run lint— clean - [x]
bun run build— clean - [x] Manually verified in a local dev instance: added a class to a canvas node, confirmed it appears under "Used" and disappears from "Unused"
Good one. This looks ready to merge from my side—please mark it ready for review when you’re finished.