inspector/core/react
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 9ced0fd150 chore: lint core/react with eslint-plugin-react-hooks (#2192)
`eslint-plugin-react-hooks` was a `clients/web` devDependency only, and each
client's `eslint .` is scoped to its own directory — so the whole hook rule
set had never looked at `core/react/`, a directory of nothing but React
hooks. "Neither surface has JSX" was the stated reason and was never a good
one: the rules judge hooks, not JSX.

Add the plugin at the root and apply it in a `core/react/**` block (scoped
there rather than to all of `core/**`, since the rules key off the `use`
prefix), with `exhaustive-deps` promoted to `error` as `clients/web` does.

Resolve the 15 findings it then reports:

- `useSettingsDraft` / `useClientSettingsDraft` seed their draft during
  render instead of in a `targetId`/`opened`-keyed effect, so the previous
  target's values never reach the DOM — the same rule `clients/web` spells
  `useValueChange`. Their "latest value" refs move from render-time writes
  into an effect; every reader (the debounce timer, `flush`, `onChange`)
  runs after a commit, so a post-commit write is what they need.
- The three async loaders keep their effects behind justified inline
  disables: `set-state-in-effect` follows a call into an async function
  without modelling the `await`, verified against a minimal hook whose only
  setState is in a continuation.
- `useInitialConfig`'s cleanup bump keeps reading `generation.current` at
  teardown — the rule's "copy it into a variable" advice would restore a
  stale request token and let a superseded response commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hzwzS8UvBsr4yZm7o7sev
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-29 23:17:45 -04:00
..
pagination.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useClientSettingsDraft.ts chore: lint core/react with eslint-plugin-react-hooks (#2192) 2026-08-29 23:17:45 -04:00
useEmaIdpLoginState.ts chore: lint core/react with eslint-plugin-react-hooks (#2192) 2026-08-29 23:17:45 -04:00
useFetchRequestLog.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useInitialConfig.ts chore: lint core/react with eslint-plugin-react-hooks (#2192) 2026-08-29 23:17:45 -04:00
useInspectorClient.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useListError.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
useManagedPrompts.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useManagedRequestorTasks.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useManagedResources.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useManagedResourceTemplates.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useManagedTools.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useMessageLog.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
usePagedPrompts.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
usePagedRequestorTasks.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
usePagedResources.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
usePagedResourceTemplates.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
usePagedTools.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
usePendingClientRequests.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useResourceSubscriptions.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useServers.ts chore: lint core/react with eslint-plugin-react-hooks (#2192) 2026-08-29 23:17:45 -04:00
useSettingsDraft.ts chore: lint core/react with eslint-plugin-react-hooks (#2192) 2026-08-29 23:17:45 -04:00
useStderrLog.ts fix(core): read state stores during render instead of re-syncing in an effect 2026-08-29 02:07:53 -04:00
useStoreSnapshot.ts docs(core): correct the useStoreSnapshot caller contract 2026-08-29 02:42:03 -04:00