fix(desktop): Fixed a reactive feedback loop in the global project cache sync#10139
Conversation
…e cache write no longer retriggers itself, which should stop the stack overflow during resource load. Use untrack when reading the cache length so the effect only depends on the project list + readiness and doesn’t re-fire on its own cache updates.
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug causing the desktop application to crash on startup with "Maximum call stack size exceeded" error. The issue was caused by a reactive feedback loop between two createEffect blocks that synchronize project data between the global store and persistent cache.
Changes:
- Added
untrackimport from solid-js - Refactored the project cache sync effect to use
untrackwhen reading cached project length, breaking the reactive dependency cycle while preserving the same logical behavior
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Nice work, @Eric-Guo! Hope this gets implemented ASAP |
|
@JeffConcerto It's 99.9% done by gpt-5.2-codex xhigh 🤦 |
|
@adamdotdevin will wake up and see the 10000 dms about this |
|
Thank you for fixing it! |
There are e2e tests, will look into why they didn't block release |
Fix #10136, introduce at 14db336
@adamdotdevin