Skip to content

fix(CTT-164): abstract member polling into swappable transport layer#304

Merged
codingLogan merged 1 commit intomasterfrom
feature/CTT-164
Mar 26, 2026
Merged

fix(CTT-164): abstract member polling into swappable transport layer#304
codingLogan merged 1 commit intomasterfrom
feature/CTT-164

Conversation

@codingLogan
Copy link
Copy Markdown
Collaborator

@codingLogan codingLogan commented Mar 25, 2026

When a user is in the "Connecting" phase of the widget, the application repeatedly polls the API to check the status of their member connection. We are preparing to support WebSockets for these real-time updates in the future.

This task involves creating a "Transport Layer" specifically for this member-polling process. By isolating how we receive status updates during connection, we can later swap from polling to WebSockets without changing the logic that handles the connection success or failure. Note: This change only affects the connection polling; all other API calls in the widget (like searching for institutions or fetching user profiles) will remain as they are.

Testing

This is a refactor, all existing tests passed before implementation, and continue to pass.

Changes

  • This adds an abstraction layer in src/utilities/transport/MemberUpdateTransport.ts
  • The abstraction is now used in src/hooks/usePollMember.tsx

In the Future

Websocket implementation will be a matter of

  1. Providing a new transport implementation for websockets
  2. Adding a logical layer that determines which transport to listen to

Additional e2e test results

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  group-2/connectHappyPath.cy.js           03:52       11       11        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/connections.cy.js                03:17        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/iavConnectAccountNonDda.cy.      01:27        6        6        -        -        - │
  │    js                                                                                          │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/newUserWithNoAccounts.cy.js      00:11        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/postMessages.cy.js               00:06        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/additionalProduct.cy.js          06:26        9        9        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/additionalProductNotSupport      00:16        1        1        -        -        - │
  │    ed.cy.js                                                                                    │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/demoConnectGuard.cy.js           00:27        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/externalLinkPopUp.cy.js          00:43        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/comboJob.cy.js                   02:10        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/connectConfigTests.cy.js         00:59        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/globalNavTests.cy.js             02:23        7        7        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/jobError.cy.js                   00:17        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/lightDisclosure.cy.js            04:20       36       36        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/memberUseCases.cy.js             01:15        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/Search.cy.js                     01:01        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/connectSadPath.cy.js             02:02        7        7        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/mfaChallenges.cy.js              01:33        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/singleAccountSelect.cy.js        01:26        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/blockedRoutingNumbers.cy.js      00:11        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/microdepositFlow.cy.js           00:50        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/sharedRoutingNumbers.cy.js       00:12        1        1        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        35:33      123      123        -        -        -  

Copy link
Copy Markdown
Collaborator

@wesrisenmay-mx wesrisenmay-mx left a comment

Choose a reason for hiding this comment

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

Nice work

@codingLogan codingLogan merged commit 623fc12 into master Mar 26, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.19.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@codingLogan codingLogan deleted the feature/CTT-164 branch March 26, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants