Instatic icon indicating copy to clipboard operation
Instatic copied to clipboard

feat(selectors-panel): add Used filter

Open borskyj-symph opened this issue 4 months ago • 1 comments

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 selectors in selectorsPanel.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"

borskyj-symph avatar Jul 28 '26 19:07 borskyj-symph

Good one. This looks ready to merge from my side—please mark it ready for review when you’re finished.

DavidBabinec avatar Jul 31 '26 10:07 DavidBabinec