Skip to content

fix(desktop): Fixed a reactive feedback loop in the global project cache sync#10139

Merged
Brendonovich merged 1 commit intoanomalyco:devfrom
Eric-Guo:fix_reactive_loop_project_cache
Jan 23, 2026
Merged

fix(desktop): Fixed a reactive feedback loop in the global project cache sync#10139
Brendonovich merged 1 commit intoanomalyco:devfrom
Eric-Guo:fix_reactive_loop_project_cache

Conversation

@Eric-Guo
Copy link
Contributor

@Eric-Guo Eric-Guo commented Jan 23, 2026

Fix #10136, introduce at 14db336

@adamdotdevin

…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.
Copilot AI review requested due to automatic review settings January 23, 2026 03:40
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 untrack import from solid-js
  • Refactored the project cache sync effect to use untrack when 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.

@JeffConcerto
Copy link

Nice work, @Eric-Guo! Hope this gets implemented ASAP

@Eric-Guo
Copy link
Contributor Author

@JeffConcerto It's 99.9% done by gpt-5.2-codex xhigh 🤦

@ProdigyRahul
Copy link
Contributor

@adamdotdevin will wake up and see the 10000 dms about this

@Brendonovich Brendonovich merged commit b298982 into anomalyco:dev Jan 23, 2026
15 of 16 checks passed
@reneleonhardt
Copy link

Thank you for fixing it!
Would it be possible to add unit tests to prevent such regressions introduced by fixes in the future?

@adamdotdevin
Copy link
Contributor

Thank you for fixing it!

Would it be possible to add unit tests to prevent such regressions introduced by fixes in the future?

There are e2e tests, will look into why they didn't block release

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.

OpenCode Desktop blank in v1.1.33

6 participants