Skip to content

Websockets Implementation for the Connecting screen#310

Open
codingLogan wants to merge 7 commits intomasterfrom
lr/CTT-156
Open

Websockets Implementation for the Connecting screen#310
codingLogan wants to merge 7 commits intomasterfrom
lr/CTT-156

Conversation

@codingLogan
Copy link
Copy Markdown
Collaborator

@codingLogan codingLogan commented Apr 8, 2026

How the feature works

The hosting app does a lot of the heavy lifting and passes in what is required by the UI

  • Set up an Observable that will emit appropriate messages
    • members/updated
    • members/priority_data_ready
  • Set up a function that can return true when the socket connection is healthy.
  • Send in a feature flag value of true to enable the usage of the above Observable

How to pass the values into the UI package

In the hosting app, pass in a new prop object to the ConnectWidget named webSocketConnection

webSocketConnection={{
  isConnected: () => function that returns a boolean,
  webSocketMessages$: Observable,
}}

To enable the widget to use those values, you must also enable the useWebSockets experimental feature

experimentalFeatures={{
  ...other features
  useWebSockets: boolean,
}}

@codingLogan codingLogan self-assigned this Apr 8, 2026
@codingLogan codingLogan marked this pull request as ready for review April 10, 2026 19:48
@@ -1,17 +0,0 @@
name: NPM Audit
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

@wesrisenmay-mx wesrisenmay-mx Apr 14, 2026

Choose a reason for hiding this comment

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

Does snyk do an npm audit? In my experience it hasn't

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@wesrisenmay-mx yes it does, but I can't speak to the exact details of Snyk's checks (what counts as critical/high/medium etc. I believe there are more areas involved that check how easily exploitable a problem is when it determines to block or not).

If you follow the links in GitHub where the Snyk check is, you can find where it says no new high vulnerabilities were found.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I really think we should be running npm audit on our code. I know a couple times ago when there were big npm vulnerabilities I was asked if we were running npm audit in our pipelines.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Previously, we didn't have Snyk set up in our project, so we ran manual npm audit scripts. Now we have Snyk, which infosec has more flexibility and control for the organization.

When I spoke with infosec about vulnerability audits a bit ago, the recommended approach is to rely on Snyk, and no longer use manual audits in pipelines. There are advantages with Snyk that we do not get with raw npm audits.

  • If no fix is available yet, we can temporarily bypass a CVE with infosec's help/approval
  • If a vulnerability is reported, but is hard/impossible to exploit, Snyk takes that into account for us and won't block a pipeline

I do agree that we need to be actively taking care of vulnerabilities that come up, and Snyk is the more wholistic approach to handling it. We can additionally handle CVEs on our dev machines when we notice things too. For intstance, when npm gives us the audit results after installing we are alerted to the current CVEs. Really we should be diligent at the dev level at that point as well.

Comment thread src/__tests__/ConnectWidget-test.tsx Outdated
@codingLogan
Copy link
Copy Markdown
Collaborator Author

Recent Test Runs

With the new feature enabled

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  group-1/additionalProduct.cy.js          04:59        9        9        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/additionalProductNotSupport      00:13        1        1        -        -        - │
  │    ed.cy.js                                                                                    │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/demoConnectGuard.cy.js           00:22        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/externalLinkPopUp.cy.js          00:36        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/connectHappyPath.cy.js           02:56       11       11        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/connections.cy.js                02:59        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✖  group-2/iavConnectAccountNonDda.cy.      00:42        6        -        1        -        5 │
  │    js                                                                                          │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/newUserWithNoAccounts.cy.js      00:09        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/postMessages.cy.js               00:05        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/Search.cy.js                     00:54        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/connectSadPath.cy.js             02:02        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/mfaChallenges.cy.js              01:00        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/singleAccountSelect.cy.js        01:06        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/blockedRoutingNumbers.cy.js      00:09        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/microdepositFlow.cy.js           00:48        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/sharedRoutingNumbers.cy.js       00:10        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/comboJob.cy.js                   01:54        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/connectConfigTests.cy.js         00:51        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/globalNavTests.cy.js             02:06        7        7        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/jobError.cy.js                   00:15        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/lightDisclosure.cy.js            03:44       36       36        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/memberUseCases.cy.js             01:02        3        3        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✖  1 of 22 failed (5%)                      29:12      122      116        1        -        5  

With the new feature disabled

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  group-1/additionalProduct.cy.js          05:40        9        9        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/additionalProductNotSupport      00:13        1        1        -        -        - │
  │    ed.cy.js                                                                                    │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/demoConnectGuard.cy.js           00:23        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-1/externalLinkPopUp.cy.js          00:38        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/connectHappyPath.cy.js           03:17       11       11        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/connections.cy.js                02:55        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/iavConnectAccountNonDda.cy.      01:15        6        6        -        -        - │
  │    js                                                                                          │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/newUserWithNoAccounts.cy.js      00:09        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-2/postMessages.cy.js               00:05        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/comboJob.cy.js                   01:55        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/connectConfigTests.cy.js         00:51        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/globalNavTests.cy.js             02:05        7        7        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/jobError.cy.js                   00:14        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/lightDisclosure.cy.js            03:37       36       36        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-3/memberUseCases.cy.js             01:03        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/Search.cy.js                     00:53        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/connectSadPath.cy.js             01:35        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/mfaChallenges.cy.js              01:27        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-4/singleAccountSelect.cy.js        01:24        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/blockedRoutingNumbers.cy.js      00:09        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/microdepositFlow.cy.js           00:46        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  group-5/sharedRoutingNumbers.cy.js       00:10        1        1        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        30:54      122      122        -        -        -  

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