Skip to content

fix: snapshot workerInstancesRef before cleanup closure - #15

Merged
daniel-jones-dev merged 1 commit into
mainfrom
web/fix-generator-eslint
Jul 2, 2026
Merged

daniel-jones-dev merged 1 commit into
mainfrom
web/fix-generator-eslint

Conversation

@daniel-jones-dev

Copy link
Copy Markdown
Owner

Summary

  • Snapshots workerInstancesRef.current at effect-body time so the cleanup closure captures the correct map, rather than reading the ref after it may have been reassigned.

Test plan

  • No ESLint warnings on GeneratorPage
  • Workers still terminate correctly when navigating away from the Generator page

🤖 Generated with Claude Code

Reading a ref inside a cleanup function can observe a stale value if
the ref was reassigned between mount and unmount. Snapshot it at
effect-body time so the closure captures the correct map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@daniel-jones-dev
daniel-jones-dev merged commit c4ef1d4 into main Jul 2, 2026
7 checks passed
@daniel-jones-dev
daniel-jones-dev deleted the web/fix-generator-eslint branch July 10, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant