Skip to content

fix: infinite loop on error#2798

Merged
kzsb03 merged 5 commits intodevfrom
fix-infinite-loop
Mar 4, 2026
Merged

fix: infinite loop on error#2798
kzsb03 merged 5 commits intodevfrom
fix-infinite-loop

Conversation

@tevanburen
Copy link
Copy Markdown
Contributor

@tevanburen tevanburen commented Mar 3, 2026

Description

Some pages show infinite loops when reactors error

Changes Made

Calling notification.add was changing the value of notification.add, which can cause an infinite loop in a useEffect. Wrap notification.add in a callback

How to Test

Many ways, but here's one:

  1. Get on SemossWeb dev
  2. In the GetProjectDependencies reactor, have it always throw an exception (for example, add int tmp = 5 / 0;)
  3. Restart your server
  4. On the App info page (where you would normally view dependencies), notice that GetProjectDependencies is called infinitely
  5. Get on this branch
  6. Rebuild libs/ui and packages/client
  7. On the App info page, verify that the error is shown but without bricking the page

Notes

@tevanburen tevanburen self-assigned this Mar 3, 2026
@tevanburen tevanburen marked this pull request as ready for review March 3, 2026 19:07
@tevanburen tevanburen requested a review from a team as a code owner March 3, 2026 19:07
@spatel776 spatel776 self-requested a review March 3, 2026 19:51
Copy link
Copy Markdown
Contributor

@spatel776 spatel776 left a comment

Choose a reason for hiding this comment

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

Have just tried the test and it works. Previously, with injecting a RunTime error in GetProjectDependencies, it would brick the page and prevent me from entering another page. With pulling and building this branch, I was able to have an error show, but did not prevent me from entering other tabs on the App Info.

@spatel776 spatel776 requested a review from kzsb03 March 3, 2026 21:07
@kzsb03 kzsb03 merged commit 3742ece into dev Mar 4, 2026
3 checks passed
@kzsb03 kzsb03 deleted the fix-infinite-loop branch March 4, 2026 14:31
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

@CodiumAI-Agent /update_changelog

SunTheDev pushed a commit that referenced this pull request Mar 6, 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.

3 participants