Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection status info #6865

Merged
merged 4 commits into from
Nov 29, 2018
Merged

Connection status info #6865

merged 4 commits into from
Nov 29, 2018

Conversation

rcullito
Copy link
Contributor

@rcullito rcullito commented Nov 23, 2018

fixes #6567

Summary

This is a basic port of the criteria laid out by @adambabik during our time in Prague and detailed in the above-linked issue "Show connection status within the app".

My first question for the clj folks is whether the various states of :node/status, which is already in app-db, can be a reasonable proxy for discovery.started and discovery.stopped.

If not, I'd be curious about current examples within re-frame around how we can use json-rpc to get these values? I'm still ramping on the inner workings of chat but the principle form of message communication seems to be waiting for gethEvents via the signal-received event handler, and I wasn't sure how to go about querying values from the status-go side without merely waiting for these events.

One other question had to do with whether the whisper min and max here should both be set to 2, and what that means currently? https://github.com/status-im/status-react/blob/develop/src/status_im/node/core.cljs#L50 While this PR is pretty simple, we talked about a visual indicator something akin to a traffic light, and I'm thinking the whisper min and max will come into play here for "yellow", though of course it would be good to discuss this with those who have been around the part of the code base for a while already.

I chose the "advanced settings" tab for this PR because we are already displaying mailserver information there. It seems like a more visual indicator could be planned as a follow up to this in collaboration with @EugeOrtiz for design input. (as has been mentioned on the issue)

Testing instructions

  1. navigate to advanced settings of desktop app
  2. look for section near the top of the chat screen with connection info. (screenshot attached on Show connection status within app #6567)
  3. disconnect app from internet to verify "disconnected" state and then watch as peers are added once the network is re-enabled.

@status-github-bot
Copy link

status-github-bot bot commented Nov 23, 2018

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-comment-bot
Copy link

#1 CI BUILD SUCCESSFUL in 22 min and counting (223e1049a9d69dc11c154e650d377404c9475a45)

Android(e2e) iOS MacOS AppImage Windows

@rcullito rcullito requested a review from yenda November 26, 2018 01:07
@rcullito rcullito self-assigned this Nov 26, 2018
@status-comment-bot
Copy link

#5 CI BUILD SUCCESSFUL in 26 min and counting (c644600)

Android(e2e) iOS MacOS AppImage Windows

@chadyj
Copy link
Contributor

chadyj commented Nov 26, 2018

Thanks Rob! Can you include some screenshots in the issue?

@rcullito
Copy link
Contributor Author

rcullito commented Nov 26, 2018

@chadyj hey chad, sure thing! just added the screenshot of the text on the issue #6567. I'll follow up with design about assets for the "traffic signal" component.

Copy link
Contributor

@vitvly vitvly left a comment

Choose a reason for hiding this comment

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

Thanks @rcullito ! Tested this locally, and turned WiFi on/off. It went from Connected with 5 peers, including mailserver to Disconnected and then Connected with 2,4,5 peers. Looks good to me :)

@rcullito
Copy link
Contributor Author

Thanks for the thorough local testing @siphiuel ! 🙏

@statustestbot
Copy link

87% of end-end tests have passed

Total executed tests: 30
Failed tests: 4
Passed tests: 26

Failed tests (4)

Click to expand
1. test_pass_phrase_validation

Device 1: Wait for PasswordInput
Device 1: Enter 'one two three four five six seven eight nine ten eleven twelve' using native keyboard

Unexpected server error.

Device sessions

2. test_network_mismatch_for_send_request_commands

Device 1: Tap on GotItButton
Device 1: Looking for a message by text: '0.0112716308'

Device 1: 'ChatElementByText' is not found on the screen

Device sessions

3. test_request_eth_in_wallet

Device 2: Tap on PassphraseInput
Device 2: Enter 'you salmon ticket antique spray panther flee neck scale mad trial exile' using native keyboard

Unexpected server error.

Device sessions

4. test_backup_recovery_phrase_warning_from_wallet

Device 1: Tap on BackupRecoveryPhraseButton
Device 1: Tap on OkContinueButton

Unexpected server error.

Device sessions

Passed tests (26)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_copy_and_paste_messages
Device sessions

4. test_request_and_receive_tokens_in_1_1_chat
5. test_offline_login
Device sessions

6. test_password_in_logcat_sign_in
Device sessions

7. test_set_profile_picture
Device sessions

8. test_text_message_1_1_chat
9. test_manage_assets
Device sessions

10. test_wallet_set_up
Device sessions

11. test_request_and_receive_eth_in_1_1_chat
12. test_swipe_to_delete_public_chat
Device sessions

13. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

14. test_add_contact_by_pasting_public_key
Device sessions

15. test_logcat_recovering_account
Device sessions

16. test_messaging_in_different_networks
17. test_swipe_to_delete_1_1_chat
Device sessions

18. test_switch_users_and_add_new_account
Device sessions

19. test_login_with_new_account
Device sessions

20. test_add_contact_from_public_chat
Device sessions

21. test_send_request_not_enabled_tokens
Device sessions

22. test_password_in_logcat_creating_account
Device sessions

23. test_backup_recovery_phrase
Device sessions

24. test_user_can_remove_profile_picture
Device sessions

25. test_share_contact_code_and_wallet_address
Device sessions

26. test_recover_account
Device sessions

@churik
Copy link
Member

churik commented Nov 29, 2018

@rcullito awesome work!
Doesn't affect mobile.
Ready to merge, tested on Mac OSx, Linux Ubuntu 18.04, Windows 10 Home.

@rcullito rcullito merged commit 91e5ac3 into develop Nov 29, 2018
@rcullito rcullito deleted the connection-status-info branch November 29, 2018 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Show connection status within app
7 participants