fix: lower Refresh All Orgs concurrency and improve OPFS worker error… - #1984
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces the “Refresh All Orgs” fan-out to avoid bursty concurrent Salesforce health checks, and improves OPFS Data History worker crash diagnostics by capturing richer error context (filename/line/col and underlying error details) when ErrorEvent.message is blank.
Changes:
- Lowered Refresh All Orgs concurrency from 4 to 2 to reduce request bursts and associated fast-fail errors.
- Enhanced OPFS worker
onerrorlogging and error construction to include more actionable crash details.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/shared/ui-data-history/src/lib/file-store/opfs-file-store.ts | Improves worker crash logging and error messages by capturing additional error context. |
| libs/features/org-groups/src/lib/RefreshAllOrgsButton.tsx | Reduces health-check concurrency to mitigate request bursts during “Refresh All Orgs”. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
82c8116 to
10f1d59
Compare
… detail Yesterday's Refresh All Orgs release put one production org-groups page through 130+ concurrent health checks in a single burst; ~28% failed fast with a 400 that never reached Salesforce. Dropping the fan-out from 4 to 2 gives the org-resolution path more headroom per request. Also caught while triaging: the Data History OPFS worker's crash handler logged "unknown" whenever `ErrorEvent.message` came back blank. It now captures filename/line/col and the underlying Error's name/message/stack when the browser provides one, so the next crash is diagnosable instead of opaque.
10f1d59 to
7f0d237
Compare
Code review summaryAutomated review (Claude Code). Fixes below are pushed as an amend to the PR head. Verdict: small and low-risk, but neither half fully lands as written — the concurrency change is a client-side stop-gap for a server-side contention problem, and most of the new OPFS error detail was inert in production. Fixed and pushed
Two deliberate deviations worth knowing:
Needs a decision
Branch is 11 commits behind |
… detail
Yesterday's Refresh All Orgs release put one production org-groups page through 130+ concurrent health checks in a single burst; ~28% failed fast with a 400 that never reached Salesforce. Dropping the fan-out from 4 to 2 gives the org-resolution path more headroom per request.
Also caught while triaging: the Data History OPFS worker's crash handler logged "unknown" whenever
ErrorEvent.messagecame back blank. It now captures filename/line/col and the underlying Error's name/message/stack when the browser provides one, so the next crash is diagnosable instead of opaque.