HomePhabricator
Diffusion Comm ae57cbf88217

[lib] Replace `ConnectionInfo.showDisconnectedBar` with `ConnectionInfo.

Tags
None
Referenced Files
F1102766: 126d89.png
Jan 31 2024, 12:07 PM
File Not Attached
F1102765: 671920.png
Jan 31 2024, 12:07 PM
File Not Attached
F1102762: 2c6453.png
Jan 31 2024, 12:07 PM
File Not Attached
Subscribers
None

Description

[lib] Replace ConnectionInfo.showDisconnectedBar with ConnectionInfo.unreachable

Summary:
We want to rename showDisconnectedBar to be more general so it can be used for eg the keyserver status page.

We actually shouldn't need any migrations here since KeyserverInfo.connection is stripped out from KeyserverInfo before being persisted, and KeyserverInfo.connection is set to defaultConnectionInfo when being rehydrated. This is handled in keyserverStoreTransform on both web and native.

Do we need to send "legacy" ConnectionInfos to old clients?

My understanding is that ConnectionInfo is a client-only type and no inital value is sent from the keyserver. I was a bit confused because of connectionInfoValidator, but it turns out connectionInfoValidator is only consumed by keyserverInfoValidator which is only consumed by keyserverStoreValidator... which doesn't seem to be used anywhere? It looks like the only two KeyserverInfo fields we send as part of initialReduxState are sessionID and updatesCurrentAsOf.


Depends on D10879

Test Plan:

  1. Open app
  2. Ensure that KeyserverStore is as expected in Redux DevTools with showDisconnectedBar replaced by unreachable.
  3. Flip on and off keyserver (killing and restarting) and ensure state updates as expected

2c6453.png (732×756 px, 82 KB)

671920.png (740×772 px, 92 KB)


Make sure old native clients continue to work as expected without any validation issues (not sure what specific flow to test since connectionInfoValidator appears unused?):

126d89.png (2×3 px, 1 MB)

Reviewers: ashoat, ginsu, tomek, inka

Reviewed By: tomek, inka

Differential Revision: https://phab.comm.dev/D10882

Details

Provenance
atulAuthored on Jan 31 2024, 12:05 PM
Reviewer
tomek
Differential Revision
D10882: [lib] Replace `ConnectionInfo.showDisconnectedBar` with `ConnectionInfo.unreachable`
Parents
rCOMM9d6caff4464c: [lib] Rename `updateDisconnectedBarActionType` to…
Branches
Unknown
Tags
Unknown