Skip to content

fix: 1874 network connectivity UI - #2211

Open
dhru7777 wants to merge 3 commits into
canton-network:mainfrom
dhru7777:fix/1874-network-connectivity-ui
Open

fix: 1874 network connectivity UI#2211
dhru7777 wants to merge 3 commits into
canton-network:mainfrom
dhru7777:fix/1874-network-connectivity-ui

Conversation

@dhru7777

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Unit tests cover connected vs disconnected listSessions status
  • LocalNet + healthy /v2/version → green dot + CONNECTED badge
  • Ledger unreachable → grey / no CONNECTED

Screenshots

Ledger Health Check Status
Screenshot 2026-07-30 at 11 43 32 AM
Green Dot
Screenshot 2026-07-30 at 11 41 37 AM
Ledger Health Check Failed - Grey Dot
Screenshot 2026-07-30 at 11 48 34 AM

@dhru7777
dhru7777 requested a review from a team as a code owner July 30, 2026 16:05
@mjuchli-da mjuchli-da changed the title Fix/1874 network connectivity UI fix: 1874 network connectivity UI Aug 3, 2026

@mjuchli-da mjuchli-da left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dhru7777 thank you for the contribution. It looks good.
Do you mind rebasing (resolving the conflicts)? Also note that the e2e test failed. This is likely due to the dapps expecting a different (still wrong) network state.

@dhru7777

dhru7777 commented Aug 5, 2026 via email

Copy link
Copy Markdown
Contributor Author

…ted badge

Signed-off-by: dhru7777 <dheerajinnyc@gmail.com>
…tatus

Signed-off-by: dhru7777 <dheerajinnyc@gmail.com>
@dhru7777
dhru7777 force-pushed the fix/1874-network-connectivity-ui branch from e54b652 to dea981d Compare August 5, 2026 13:31
@dhru7777

dhru7777 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review

Rebase

Rebased onto latest main and resolved the conflict in wallet-gateway/remote/src/web/frontend/index.ts by keeping both:

  • upstream multi-session support (currentOrigin / detectCurrentOrigin)
  • this PR’s connectivity fix (networkConnected from listSessionsstatus === 'connected')

About the e2e failures

I investigated the earlier ping-e2e failures and also ran the suite locally.

Local run (Canton + gateway + mock OAuth + ping, with CI_SECRET_DEPENDENCY=false to mirror fork PR CI / skip external-signing specs):

  • 16 passed, including the core flows most relevant to this change:
    • connection status handling edge cases (Chromium + Firefox)
    • reconnect / popup / wallet picker
    • most settings tests
  • 2 failed, and they look flaky / unrelated to the connectivity UI change:
    1. multisession.spec.ts — failed only on Chromium (stuck on OAuth /callback, never reached /parties); passed on Firefox
    2. One Firefox settings IDP test — dApp stayed on Loading... after connect; same test passed on Chromium

Those failure modes are OAuth callback / connect-settle races, not assertions on the header/network “CONNECTED” badge. This PR only drives that badge from listSessions[].status (aligned with the Settings sessions UI) and does not gate login, callback navigation, or dApp connect.

Regarding your note that dapps may still expect the old (wrong) network state: the dApp’s isConnected is the RPC connect result, which is separate from the gateway ledger-connectivity badge. Locally, the connect/disconnect edge-case e2e passed on both browsers after this change.

Happy to dig further if CI still fails on the rebased commits, or if you’d prefer a follow-up for hardening the flaky multisession/settings paths.


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.

Indicate network connectivity in User UI

2 participants