Skip to content

Fix false-positive unused state diagnostics - #325

Merged
smiggleworth merged 2 commits into
mainfrom
fix/state-diagnostic-read-tracking
Aug 17, 2026
Merged

Fix false-positive unused state diagnostics#325
smiggleworth merged 2 commits into
mainfrom
fix/state-diagnostic-read-tracking

Conversation

@smiggleworth

@smiggleworth smiggleworth commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retain lifetime read evidence in production-built packages so consumer development diagnostics see reads from conditional JSX, control callbacks, and event handlers
  • add a production-artifact regression that fails when lifetime tracking is tree-shaken
  • gate lifetime tracking by diagnostic eligibility so ordinary production reads do not mutate diagnostic state

Verification

  • npm run check
  • production-artifact regression verifies the diagnostic eligibility guard

Closes #324

Copilot AI lite review requested due to automatic review settings August 17, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@smiggleworth
smiggleworth merged commit 047f0bf into main Aug 17, 2026
3 checks passed
@smiggleworth
smiggleworth deleted the fix/state-diagnostic-read-tracking branch August 17, 2026 20:16
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.

Render diagnostics emit false-positive unused state variable warnings

2 participants