Summary
The audit performed while fixing #373 found the same initial-render option capture pattern in additional React source hooks. Several source factories are memoized for the component lifetime while closing over source options from the first render.
Concrete examples:
useAskableDOMSource: target selection (ref/selector), includeAttributes, includeHTML, maxTextLength, describe, and kind
useAskableScrollSource: target selection (ref/selector/getElement), getActiveSection, describe, and kind
- state-backed source hooks commonly keep snapshot data current through refs but can still freeze configuration such as
describe, kind, caps, filters, and source-specific options
This is separate from the navigation-specific fix in #373 and should be handled systematically rather than expanding that PR.
Expected behavior
Source hook options should reflect the latest committed React render without:
- re-registering the source
- exposing callbacks from abandoned concurrent renders
- resetting source-owned state/history unnecessarily
- silently freezing scalar or callback options from mount
Acceptance criteria
Summary
The audit performed while fixing #373 found the same initial-render option capture pattern in additional React source hooks. Several source factories are memoized for the component lifetime while closing over source options from the first render.
Concrete examples:
useAskableDOMSource: target selection (ref/selector),includeAttributes,includeHTML,maxTextLength,describe, andkinduseAskableScrollSource: target selection (ref/selector/getElement),getActiveSection,describe, andkinddescribe,kind, caps, filters, and source-specific optionsThis is separate from the navigation-specific fix in #373 and should be handled systematically rather than expanding that PR.
Expected behavior
Source hook options should reflect the latest committed React render without:
Acceptance criteria
useAskable*Sourcefactory with an empty or intentionally narrow memo dependency list