Files
orca/config/scripts
Neil 9490d461eb perf(store): detect Zustand rerender churn the current audit cannot see
The app-store-performance audit only understood inline selectors passed to a
hook imported literally as `useAppStore`, so three shapes went unlinted:

- a selector referenced by name (`useAppStore(selectRows)`), including one
  hoisted below its call site — resolved now via a Program:exit pass
- the sibling store hooks (`usePluginPanelsStore` and friends), matched by the
  use<Name>Store convention on local imports; React's `useSyncExternalStore`
  matches that shape and is excluded
- a fresh reference nested inside a `useShallow` projection, which is the worst
  case of the three: the comparator runs on every write and can never match, so
  the memo silently buys nothing

`no-nested-fresh-under-shallow` covers the last one. `src` is clean against all
four rules today, so this is a ratchet rather than a cleanup.

The write side stays undecidable statically — whether a `set()` reallocated for
nothing depends on the payload — so it gets a runtime probe instead.
withStoreIdentityChurnProbe counts writes that replace a field's reference while
its value stays equal, and can name the calling site. Cost when disarmed is one
boolean load per write, matching react-commit-cascade-write-probe.
2026-09-06 02:21:23 -07:00
..
2026-05-15 05:44:25 -04:00