You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(react): AskableInspector useEffect deps incomplete — inspector not re-created when options change #270
In packages/react/src/AskableInspector.tsx, the useEffect that creates the inspector panel lists only specific known properties (position, highlight, promptOptionsKey) as dependencies. Any other property of AskableInspectorOptions being added or changed won't trigger a re-create.
Current code
useEffect(()=>{consthandle=createAskableInspector(ctx,inspectorOptions);return()=>handle.destroy();},[ctx,inspectorOptions.position,inspectorOptions.highlight,promptOptionsKey]);// ^ incomplete — other inspectorOptions fields not listed
Impact
If AskableInspectorOptions grows new configurable fields (custom CSS, callbacks, etc.), they will silently be ignored after initial mount. Currently low impact, but fragile as the options type evolves.
Fix
Either spread all known deps explicitly, or use a stable serialized key:
Activity