inspector/core/react
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall f6105773f0 fix(core): key the snapshot cache on every input it derives from
Copilot review round 1.

The cache was keyed on the store and its revision alone, so a changed
`read` was answered with the previous reader's output, and with a null
store — where the revision is pinned at 0 — a changed `whenAbsent` was
ignored outright. Key on `event`, `read` and `whenAbsent` too.

This makes an unstable argument defeat the cache rather than silently
serve a value derived from the previous one, so React fails it with "The
result of getSnapshot should be cached" at first render. That is the
intended failure mode and is now documented as such: a loud error beats a
wrong list nobody can account for.

Also correct the docs, which described the helper as universal. That
misread useListError as a violation: its snapshot is the stored Error
instance, already referentially stable, so it subscribes with
useSyncExternalStore directly and needs no cache. The rule is
read-during-render; the helper is for getters that return a fresh value
per read.

Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-29 02:26:42 -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: close quality-gate coverage gaps (#1689) (#1766) 2026-07-24 17:20:12 -04:00
useEmaIdpLoginState.ts fix(auth): guard OAuth-storage async paths against unhandled rejections 2026-07-08 10:59:40 -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 fix(auth): stop blaming the passphrase for a corrupt payload, and refresh the stale docs 2026-08-22 23:08:52 -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 fix(web): don't roll back an optimistic setting a failed reload didn't undo 2026-08-23 09:39:47 -04:00
useSettingsDraft.ts fix(servers): make settings form re-render on every keystroke (#1361) (#1362) 2026-05-26 13:42:14 -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 fix(core): key the snapshot cache on every input it derives from 2026-08-29 02:26:42 -04:00