Skip to content

Conversation

thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Aug 7, 2025

Description

Currently the guide client keep retrying forever if it fails to join a guides channel for real time subscription. This can be due to network errors, but also includes auth errors or invalid channel ids. This PR sets a max retry limit at 3, similar to what we do in the main knock client.

References:
https://elixirforum.com/t/how-to-prevent-phoenix-from-retrying-to-connect-to-channel-when-auth-fails/63048

Linear:
KNO-8907

Copy link

vercel bot commented Aug 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview Comment Aug 18, 2025 6:52pm
javascript-nextjs-example Ready Ready Preview Comment Aug 18, 2025 6:52pm
javascript-slack-connect-example Ready Ready Preview Comment Aug 18, 2025 6:52pm
javascript-slack-kit-example Ready Ready Preview Comment Aug 18, 2025 6:52pm

Copy link

linear bot commented Aug 7, 2025

Copy link

changeset-bot bot commented Aug 7, 2025

🦋 Changeset detected

Latest commit: 98fad19

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@knocklabs/client Patch
client-example Patch
guide-example Patch
@knocklabs/expo Patch
@knocklabs/react-core Patch
@knocklabs/react-native Patch
@knocklabs/react Patch
@knocklabs/expo-example Patch
ms-teams-connect-example Patch
nextjs-app-dir-example Patch
nextjs-example Patch
slack-connect-example Patch
slack-kit-example Patch

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

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@@ -263,7 +263,11 @@ describe("KnockGuideClient", () => {
test("subscribes to socket events when socket is available", () => {
const mockChannel = {
join: vi.fn().mockReturnValue({
receive: vi.fn().mockReturnValue({ receive: vi.fn() }),
receive: vi.fn().mockReturnValue({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Relied heavily on Claude for writing these tests.

Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.46%. Comparing base (57bad0b) to head (90bbb7e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/client/src/clients/guide/client.ts 92.85% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #697      +/-   ##
==========================================
+ Coverage   63.35%   63.46%   +0.10%     
==========================================
  Files         181      181              
  Lines        7220     7247      +27     
  Branches      853      859       +6     
==========================================
+ Hits         4574     4599      +25     
- Misses       2620     2622       +2     
  Partials       26       26              
Files with missing lines Coverage Δ
packages/client/src/clients/guide/client.ts 90.98% <92.85%> (+0.07%) ⬆️

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