hermes-agent/apps/desktop/src/app/hooks
ethernet e026fd61d8 lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule
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.
2026-07-25 18:12:48 -07:00
..
use-config-record.ts feat(desktop): Capabilities foundation — shared utils, master-detail, editors, primitives 2026-07-03 05:08:13 -05:00
use-debounced.ts feat(desktop): Capabilities foundation — shared utils, master-detail, editors, primitives 2026-07-03 05:08:13 -05:00
use-keybinds.ts feat(desktop): shift next tab into main on ⌘W + always-shown new-session tab 2026-07-22 22:18:33 -05:00
use-on-profile-switch.ts lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
use-refresh-hotkey.ts feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -05:00
use-route-enum-param.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
use-route-overlay-active.ts feat(pets): offer backend setup when generation is unavailable 2026-06-24 14:10:19 -05:00