-
Notifications
You must be signed in to change notification settings - Fork 44
fix failing api calls due to inactive service worker #731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: b7730c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@jkbktl is attempting to deploy a commit to the Status Team on Vercel. A member of the Team first needs to authorize it. |
Jenkins BuildsClick to see older builds (1)
|
There was a problem hiding this 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 addresses failing API calls and app crashes when the service worker is inactive by adding retry logic that wakes the worker on the first request.
- Introduces
chromeLinkWithRetries
to wrap the TRPC Chrome link with wake-and-retry behavior. - Updates
createAPIClient
to use the new retry-enabled link. - Adds a changeset entry for a patch release.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
apps/wallet/src/data/chromeLink.ts | Adds chromeLinkWithRetries with retry logic for inactive worker. |
apps/wallet/src/data/api.ts | Switches createAPIClient to use chromeLinkWithRetries . |
.changeset/tender-flies-build.md | Adds patch release note for the wallet package. |
Comments suppressed due to low confidence (1)
apps/wallet/src/data/chromeLink.ts:10
- The new retry logic in
chromeLinkWithRetries
isn't covered by existing tests; consider adding unit tests to simulate port disconnection and verify retry behavior.
export function chromeLinkWithRetries<TRouter extends AnyRouter>(
PR fixes failing API calls and crashing app ("black screen") when service worker is inactive. First call wakes service worker up and retry is successful.
Bug reports: