mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
A ref synced from a nanostores atom via useEffect lags the atom by one render. Callbacks that read the ref instead of the atom get stale values — cancelRun sent session.interrupt to the wrong session (#66485), and steerPrompt/restoreToMessage/editMessage had closure-priority stale reads. The rule catches the three shapes of this antipattern: - useEffect(() => { ref.current = value }, [value]) - useEffect(() => { ref.current = value; ... }, [value]) - useEffect(() => { setMutableRef(ref, value) }, [value]) All 79 existing hits get eslint-disable-next-line with a comment. The legitimate ref writes (DOM instances, mount flags, request tokens, prev-value tracking, prop mirrors) stay suppressed; the 11 real bug sites will be fixed in the next commit so their suppressions can be removed. Rule is scoped to apps/desktop only — ui-tui and tests-js don't use nanostores and don't have this pattern. |
||
|---|---|---|
| .. | ||
| app | ||
| assets/tiers | ||
| components | ||
| contrib | ||
| fonts | ||
| hooks | ||
| i18n | ||
| lib | ||
| plugins | ||
| sdk | ||
| store | ||
| themes | ||
| types | ||
| global.d.ts | ||
| hermes-cron-scope.test.ts | ||
| hermes-parity.test.ts | ||
| hermes-profile-scope.test.ts | ||
| hermes.test.ts | ||
| hermes.ts | ||
| main.tsx | ||
| styles.css | ||
| vite-env.d.ts | ||
| webhooks-rest.test.ts | ||