Skip to content

fix: prevent infinite reactive loop when computed reads @locals inside for (#140)#141

Merged
rohal12 merged 9 commits intomainfrom
fix/published-types-sync
Mar 27, 2026
Merged

fix: prevent infinite reactive loop when computed reads @locals inside for (#140)#141
rohal12 merged 9 commits intomainfrom
fix/published-types-sync

Conversation

@rohal12
Copy link
Copy Markdown
Owner

@rohal12 rohal12 commented Mar 27, 2026

Summary

Test Plan

  • Verify {computed _derived = @item.status} inside {for} renders without hanging (regression test)
  • Verify single-iteration computed + @Local produces correct output
  • All 1065 existing tests pass
  • npx tsc --noEmit passes clean

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

Release preview: merging this PR will publish v0.43.1 (patch bump from v0.43.0)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.35% 2825 / 3652
🔵 Statements 76.35% 3087 / 4043
🔵 Functions 69% 512 / 742
🔵 Branches 73.26% 1537 / 2098
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/macros/Computed.tsx 75.92% 75% 100% 78.72% 13, 14, 17-18, 20, 26-28, 35-37, 48-51, 72-76, 98-102
src/components/macros/For.tsx 91.48% 82.35% 100% 90.47% 28, 39, 42-44, 118-122
src/components/macros/WidgetInvocation.tsx 96.18% 95.28% 72.72% 97.32% 45, 201, 203, 253
Generated in workflow #215 for commit aa36a82 by the Vitest Coverage Report Action

clem and others added 9 commits March 27, 2026 20:33
Consecutive {set} macros can't see each other's store mutations during
a Preact render pass. Design uses a MutationBufferContext to share
mutation state within a passage's render lifecycle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6-task plan covering context definition, executeMutation buffer support,
defineMacro wiring, and Passage/PassageDialog providers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…#140)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ix (#140)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…op (#140)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e for (#140)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…orIteration (#140)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rohal12 rohal12 force-pushed the fix/published-types-sync branch from 4920b72 to aa36a82 Compare March 27, 2026 12:33
@rohal12 rohal12 enabled auto-merge March 27, 2026 12:34
@rohal12 rohal12 merged commit 1f7318b into main Mar 27, 2026
5 checks passed
@rohal12 rohal12 deleted the fix/published-types-sync branch March 27, 2026 12:36
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.

{computed} referencing @ loop variable inside {for} causes infinite reactive loop

1 participant