fix: duplicate card/note creation under StrictMode (updater side effects) - #192
Merged
Conversation
…ate updaters (StrictMode double-invokes updater functions) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live-caught by the owner this morning: every C-flow confirm created two cards (and note commits two notes). Root cause: A1's render-loop fix moved the service calls INSIDE setState updater functions — React StrictMode double-invokes updaters to surface exactly this impurity, so each confirm fired the create twice under the dev build. Side effects hoisted out of the updaters (bounded, dep-driven callback identity — the original #185 loop protection stays intact); regression pinned with exact-count e2e assertions for both paths.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd