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

fix(mailserver): Show current mailserver in legacy settings #21901

Conversation

ilmotta
Copy link
Contributor

@ilmotta ilmotta commented Jan 8, 2025

Fixes #21375

Summary

A regression removed more code than we wanted in #20730 and the result was broken functionality in the Legacy settings.

This PR fixes that and we now show the current mailserver. The data is kept in sync via signals, just as the original code.

pr.webm

Review notes

I didn't care about keeping the code up to our guidelines because we expect to improve the code and the UI when resolving this other issue: #21896. I copy and pasted and removed what's unnecessary.

Areas that may be impacted

  • Legacy settings > Sync settings > Status nodes

Steps to test

  1. Go to Legacy settings > Sync settings
  2. Check the current mailserver is displayed besides Status nodes
  3. Open Status nodes
  4. Check at the bottom the current mailserver is displayed.

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Jan 8, 2025

Jenkins Builds

Click to see older builds (3)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 29de016 #1 2025-01-08 21:26:12 ~4 min tests 📄log
✔️ 29de016 #1 2025-01-08 21:28:07 ~6 min android-e2e 🤖apk 📲
✔️ 29de016 #1 2025-01-08 21:29:45 ~8 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 12de85d #2 2025-01-08 23:52:48 ~4 min tests 📄log
✔️ 12de85d #2 2025-01-08 23:55:32 ~6 min ios 📱ipa 📲
✔️ 12de85d #2 2025-01-08 23:55:46 ~7 min android-e2e 🤖apk 📲
✔️ 12de85d #2 2025-01-08 23:56:35 ~8 min android 🤖apk 📲
✔️ 67329ed #3 2025-01-17 02:59:11 ~5 min tests 📄log
✔️ 67329ed #3 2025-01-17 03:02:53 ~9 min android-e2e 🤖apk 📲
✔️ 67329ed #3 2025-01-17 03:03:49 ~9 min android 🤖apk 📲
✔️ 67329ed #3 2025-01-17 03:04:18 ~10 min ios 📱ipa 📲

@status-im-auto
Copy link
Member

88% of end-end tests have passed

Total executed tests: 8
Failed tests: 1
Expected to fail tests: 0
Passed tests: 7
IDs of failed tests: 703133 

Failed tests (1)

Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133

    Device 1: Tap on found: Button
    # STEP: Check that removed user is not shown in the list anymore

    critical/chats/test_public_chat_browsing.py:240: in test_restore_multiaccount_with_waku_backup_remove_profile_switch
        self.errors.verify_no_errors()
    base_test_case.py:176: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     zQ3...dWXh5 was not restored as a contact from waku backup!
    E    zQ3...Vacac was not restored as a contact from waku backup!
    E    admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    



    Device sessions

    Passed tests (7)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    2. test_wallet_send_eth, id: 727229

    @pavloburykh pavloburykh self-assigned this Jan 9, 2025
    @pavloburykh
    Copy link
    Contributor

    @ilmotta thanks for this PR. Please take a look at the issue below.

    ISSUE 1 Disabling/Enabling Status nodes switcher results in failing to send messages/accepting contact requests until relogin

    Steps:

    1. Go to Legacy settings => Status nodes
    2. Disable and then re-enable Use Status node switcher
    3. Go to any chat and try sending messages or try to accept incoming contact request

    Actual result:

    1. Messages are not send (do not appear in chat history even for sender).
    2. Tapping Accept button does not result in accepting contact request, it remains in Pending.
      Works fine after re-login.

    Status-debug-logs - 2025-01-09T155901.417.zip

    telegram-cloud-document-2-5188662600598053459.mp4

    Expected result: @ilmotta I would suggest to disable switcher at all. It is currently disabled in develop.

    Also, I see you have removed options of adding custom node and disabling Automatic selection of store node as those options are not valid anymore and were disabled in develop (see screenshot below). Therefore it makes sense to disable Use Status node switcher as well to prevent the described issue. WDYT?

    photo_2025-01-09 15 59 10

    @ilmotta
    Copy link
    Contributor Author

    ilmotta commented Jan 9, 2025

    Thank you for such detailed comments @pavloburykh

    Also, I see you have removed options of adding custom node and disabling Automatic selection of store node as those options are not valid anymore and were disabled in develop

    That makes sense, let's keep things at a minimum. In the end, if Status nodes screen will just show the current mailserver, then I'll change the code to not even open a separate screen, the full mailserver will appear in the parent screen. That way I can delete more code and we get the same result.

    Wdyt?

    @pavloburykh
    Copy link
    Contributor

    That makes sense, let's keep things at a minimum. In the end, if Status nodes screen will just show the current mailserver, then I'll change the code to not even open a separate screen, the full mailserver will appear in the parent screen. That way I can delete more code and we get the same result.

    Wdyt?

    Thank you @ilmotta. I agree, It will be the best solution.

    @ilmotta ilmotta force-pushed the ilmotta-21375/show-current-mailserver-and-cleanup-unused-mailserver-features branch from 12de85d to 67329ed Compare January 17, 2025 02:53
    @ilmotta
    Copy link
    Contributor Author

    ilmotta commented Jan 17, 2025

    @pavloburykh PR is ready to be re-tested. Now the user is only able to see the mailserver text and I removed the entire screen that used to exist when pressing on the Status nodes setting. If the host is too long it will be shortened automatically and the user won't be able to see the full text, that's why I made now that when the user presses on the mailserver text the full text will be copied to the clipboard.

    @pavloburykh
    Copy link
    Contributor

    @ilmotta thanks a lot for this fix, no issues from my side.

    when the user presses on the mailserver text the full text will be copied to the clipboard

    I have noticed that we do not show any toast notification confirming that the text was successfully copied but I think we can ignore it as this feature will most likely be used by QAs/devs. PR is ready for merge.

    telegram-cloud-document-2-5211174663090101528.mp4

    @status-im-auto
    Copy link
    Member

    82% of end-end tests have passed

    Total executed tests: 56
    Failed tests: 9
    Expected to fail tests: 1
    Passed tests: 46
    
    IDs of failed tests: 702855,702730,702786,702745,702731,702733,702813,702782,703391 
    
    IDs of expected to fail tests: 702844 
    

    Failed tests (9)

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855
    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    2. test_1_1_chat_message_reaction, id: 702730

    Device 2: Tap on found: Button
    Device 2: Attempt 0 is successful clicking close-activity-center

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    4. test_1_1_chat_pin_messages, id: 702731

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    5. test_1_1_chat_text_message_delete_push_disappear, id: 702733

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    6. test_1_1_chat_push_emoji, id: 702813

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    7. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    8. test_1_1_chat_send_image_save_and_share, id: 703391

    Test setup failed: critical/chats/test_1_1_public_chats.py:38: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:388: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:167: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:164: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:154: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:138: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by xpath:`//*[contains(@text, 'shXN1EM28kRGvEQUpCkU')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]` is not found on the screen after wait_for_visibility_of_element
    



    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_mentions_push_notification, id: 702786

    Device 2: Getting PN by 'shj3sYPcJJMB4SBk1fgU'
    Device 2: Looking for a message by text: shj3sYPcJJMB4SBk1fgU

    critical/chats/test_public_chat_browsing.py:963: in test_community_mentions_push_notification
        self.errors.verify_no_errors()
    base_test_case.py:176: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Push notification with the mention was not received by admin
    E    Can not edit a message with a mention
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844

    Device 2: Find EmojisNumber by xpath: //*[starts-with(@text,'https://m.youtube.com/watch?v=Je7yErjEVt4')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']/../..//*[@content-desc='emoji-reaction-4']/android.widget.TextView[2]
    Device 2: Element EmojisNumber text is equal to 1

    critical/chats/test_public_chat_browsing.py:650: in test_community_links_with_previews_github_youtube_twitter_gif_send_enable
        self.errors.verify_no_errors()
    base_test_case.py:176: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     No preview is loaded for url https://youtu.be/Je7yErjEVt4
    E    No preview is loaded for url https://www.youtube.com/watch?v=XN-SVmuJH2g&list=PLbrz7IuP1hrgNtYe9g6YHwHO6F3OqNMao
    E    No preview is loaded for url https://m.youtube.com/watch?v=Je7yErjEVt4 
    

    [[Youtube links preview is not loaded on LambdaTest emulators, needs investigation]]

    Device sessions

    Passed tests (46)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    3. test_add_contact_field_validation, id: 702777
    Device sessions

    Class TestFallbackMultipleDevice:

    1. test_fallback_add_key_pair, id: 741054
    2. test_fallback_sync_with_error, id: 740220
    3. test_fallback_with_correct_seed_phrase, id: 740221
    4. test_fallback_validate_seed_phrase, id: 740222

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    2. test_wallet_send_eth, id: 727229

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    2. test_activity_center_mentions, id: 702957
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links_profile, id: 702775
    Device sessions

    3. test_deep_links_communities, id: 739307
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_reactions, id: 703202
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    4. test_group_chat_pin_messages, id: 702732
    Device sessions

    5. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    6. test_group_chat_mute_chat, id: 703495
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_community_undo_delete_message, id: 702869
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    6. test_community_discovery, id: 703503
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_leave, id: 702845
    Device sessions

    2. test_community_markdown_support, id: 702809
    Device sessions

    3. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    4. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    3. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    4. test_community_unread_messages_badge, id: 702841
    Device sessions

    5. test_community_message_delete, id: 702839
    Device sessions

    6. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    7. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    8. test_community_one_image_send_reply, id: 702859
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_several_images_send_reply, id: 703194
    Device sessions

    @status-im-auto
    Copy link
    Member

    100% of end-end tests have passed

    Total executed tests: 9
    Failed tests: 0
    Expected to fail tests: 0
    Passed tests: 9
    

    Passed tests (9)

    Click to expand

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_mentions_push_notification, id: 702786
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855
    Device sessions

    2. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    5. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    6. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    7. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    8. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    @ilmotta
    Copy link
    Contributor Author

    ilmotta commented Jan 17, 2025

    I have noticed that we do not show any toast notification confirming that the text was successfully copied but I think we can ignore it as this feature will most likely be used by QAs/devs. PR is ready for merge.

    @pavloburykh Unfortunately the code in these screens is too far from our standards, too legacy, so I preferred to do the minimum. This other issue #21896 would be the one to rewrite the advanced settings and remove the legacy settings section, but I don't see that issue being resolved for 2.33.

    Thanks for helping test this PR

    @ilmotta ilmotta merged commit b22744f into develop Jan 17, 2025
    5 checks passed
    @ilmotta ilmotta deleted the ilmotta-21375/show-current-mailserver-and-cleanup-unused-mailserver-features branch January 17, 2025 17:26
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: DONE
    Development

    Successfully merging this pull request may close these issues.

    Display in app settings to which mailserver profile is currently connected
    6 participants