Skip to content

fix: duplicate card/note creation under StrictMode (updater side effects) - #192

Merged
alicoding merged 1 commit into
mainfrom
fix-strictmode-double-create
Aug 17, 2026
Merged

fix: duplicate card/note creation under StrictMode (updater side effects)#192
alicoding merged 1 commit into
mainfrom
fix-strictmode-double-create

Conversation

@alicoding

Copy link
Copy Markdown
Owner

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

…ate updaters (StrictMode double-invokes updater functions)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
@alicoding
alicoding enabled auto-merge (squash) August 17, 2026 11:14
@alicoding
alicoding merged commit 4bf0bd6 into main Aug 17, 2026
24 checks passed
@alicoding
alicoding deleted the fix-strictmode-double-create branch August 17, 2026 11:21
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