Skip to content

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

Merged
Brendonovich merged 1 commit into
anomalyco: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 into
anomalyco:devfrom
Eric-Guo:fix_reactive_loop_project_cache

Conversation

@Eric-Guo

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

No duplicate PRs found

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@Eric-Guo

Copy link
Copy Markdown
Contributor Author

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

@ProdigyRahul

Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Member

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

xenonwellz pushed a commit to xenonwellz/opencode that referenced this pull request Jan 28, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
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

7 participants