Skip to content

fix(SDK-1276): recover from a failed calculate instead of stalling forever - #2700

Merged
krisxcrash merged 2 commits into
mainfrom
kw/fix/sdk-1276-stuck-calculating-after-409
Sep 4, 2026
Merged

fix(SDK-1276): recover from a failed calculate instead of stalling forever#2700
krisxcrash merged 2 commits into
mainfrom
kw/fix/sdk-1276-stuck-calculating-after-409

Conversation

@krisxcrash

Copy link
Copy Markdown
Contributor

Summary

  • hasSeenCalculatingRef was set true right before calling calculate, and only ever reset by the polling effect -- which never starts when calculate itself fails (e.g. a 409 conflict, which payrollsCalculate has no specific handling for)
  • That left the component permanently stuck on the calculating spinner, with neither runPayroll/calculated nor runPayroll/processingFailed ever firing
  • Resets the ref on that failure path too, symmetric with the two resets the polling effect already has

Test plan

  • Added a test mocking a 409 from the calculate endpoint, asserting the Calculate button becomes available again
  • Confirmed the new test fails against the pre-fix code

…rever

hasSeenCalculatingRef was set true right before calling calculate, and
only ever reset back to false by the polling effect -- which never
starts when calculate itself fails (e.g. a 409 conflict from the
platform, which payrollsCalculate has no specific handling for). That
left the component stuck on the calculating spinner permanently, with
neither runPayroll/calculated nor runPayroll/processingFailed ever
firing. Reset the ref on that failure path too, symmetric with the two
resets the polling effect already has.
@krisxcrash
krisxcrash marked this pull request as ready for review September 3, 2026 23:22
@krisxcrash
krisxcrash requested a review from a team as a code owner September 3, 2026 23:22
@krisxcrash
krisxcrash added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit e422027 Sep 4, 2026
38 checks passed
@krisxcrash
krisxcrash deleted the kw/fix/sdk-1276-stuck-calculating-after-409 branch September 4, 2026 22: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.

2 participants