Skip to content

Conversation

@rablador
Copy link
Contributor

@rablador rablador commented May 28, 2025

Why this needs to be done

We want to clarify to users that multihop is being used because of "smart routing" with DAITA.

What needs to be done

  • Combine DAITA and Multihop to one pill when "smart routing" is active. It should say "DAITA: Multihop".

  • Add info to the DAITA subview by using the navigation header subtitle space: "(i) Multihop is being used to enable DAITA for your selected location."

    • Investigate styling that makes this more visible // Talk to @carl 
    • This info disappears if Direct Only is enabled or if DAITA is disabled.

Acceptance criteria

  • Feature indicator should say "DAITA: Multihop" when "smart routing" is on.
  • New info added to the DAITA subview when "smart routing" is on.

Tests

UI tests.


This change is Reviewable

@rablador rablador self-assigned this May 28, 2025
@rablador rablador added the iOS Issues related to iOS label May 28, 2025
@linear
Copy link

linear bot commented May 28, 2025

@github-actions
Copy link

🚨 End to end tests failed. Please check the failed workflow run.

@github-actions
Copy link

🚨 End to end tests failed. Please check the failed workflow run.

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch 2 times, most recently from 8c68559 to bdd0d88 Compare June 2, 2025 15:08
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

This PR fixes some general swiftlint errors I found as well.

Reviewable status: 0 of 18 files reviewed, all discussions resolved

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch 2 times, most recently from 991807e to b41986c Compare June 4, 2025 11:49
@rablador rablador requested review from SteffenErn, acb-mv and buggmagnet and removed request for SteffenErn and buggmagnet June 4, 2025 11:49
@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch from b41986c to d95ee1a Compare June 4, 2025 11:56
Copy link
Contributor

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 13 of 13 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion


ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift line 34 at r2 (raw file):

        state.isMultihop && !settings.tunnelMultihopState.isEnabled
            ? NSLocalizedString(
                "FEATURE_INDICATORS_CHIP_DAITA",

We want two different localisation keys for this
How about
FEATURE_INDICATORS_CHIP_DAITA_MULTIHOP ?

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch from d95ee1a to 1e87b7d Compare June 4, 2025 13:58
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift line 34 at r2 (raw file):

Previously, buggmagnet wrote…

We want two different localisation keys for this
How about
FEATURE_INDICATORS_CHIP_DAITA_MULTIHOP ?

Done.

Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift line 34 at r2 (raw file):

Previously, buggmagnet wrote…

We want two different localisation keys for this
How about
FEATURE_INDICATORS_CHIP_DAITA_MULTIHOP ?

Done.

buggmagnet
buggmagnet previously approved these changes Jun 4, 2025
Copy link
Contributor

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

acb-mv
acb-mv previously approved these changes Jun 5, 2025
Copy link
Contributor

@acb-mv acb-mv left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch from 1e87b7d to 049c09f Compare June 9, 2025 06:58
Copy link
Contributor

@SteffenErn SteffenErn left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 13 of 13 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion


ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift line 19 at r3 (raw file):

            VStack(alignment: .leading, spacing: 8) {
                if isAutomaticRoutingActive {
                    DAITAMultihopNotice()

The top margin is bigger than in the Figma design
Screenshot 2025-06-09 at 09.28.44.png
Screenshot 2025-06-09 at 09.29.20.jpeg

@rablador rablador dismissed stale reviews from buggmagnet and acb-mv via 28e14ec June 10, 2025 10:26
@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch 2 times, most recently from 28e14ec to 519ea39 Compare June 10, 2025 11:02
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: 15 of 17 files reviewed, 1 unresolved discussion (waiting on @SteffenErn)


ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift line 19 at r3 (raw file):

Previously, SteffenErn (Steffen) wrote…

The top margin is bigger than in the Figma design
Screenshot 2025-06-09 at 09.28.44.png
Screenshot 2025-06-09 at 09.29.20.jpeg

Done.

Copy link
Contributor

@SteffenErn SteffenErn left a comment

Choose a reason for hiding this comment

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

Reviewable status: 14 of 17 files reviewed, 3 unresolved discussions (waiting on @buggmagnet)


ios/MullvadVPNUITests/Pages/TunnelControlPage.swift line 204 at r4 (raw file):

    /// Verify that the app attempts to connect over Multihop.
    @discardableResult func verifyNotConnectingOverMultihop() -> Self {
        XCTAssertFalse(app.staticTexts["Multihop"].exists)

When rebasing on main this will fail since the indicators are now buttons. Should be changed to app.buttons["Multihop"].exists


ios/MullvadVPNUITests/Pages/TunnelControlPage.swift line 216 at r4 (raw file):

    /// Verify that the app attempts to connect using DAITA.
    @discardableResult func verifyConnectingUsingDAITAThroughMultihop() -> Self {
        XCTAssertTrue(app.staticTexts["DAITA: Multihop"].exists)

app.buttons["DAITA: Multihop"].exists see comment above

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch from 519ea39 to 7cb800b Compare June 12, 2025 07:02
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: 10 of 17 files reviewed, 2 unresolved discussions (waiting on @buggmagnet and @SteffenErn)


ios/MullvadVPNUITests/Pages/TunnelControlPage.swift line 204 at r4 (raw file):

Previously, SteffenErn (Steffen) wrote…

When rebasing on main this will fail since the indicators are now buttons. Should be changed to app.buttons["Multihop"].exists

Done.


ios/MullvadVPNUITests/Pages/TunnelControlPage.swift line 216 at r4 (raw file):

Previously, SteffenErn (Steffen) wrote…

app.buttons["DAITA: Multihop"].exists see comment above

Done.

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch from 7cb800b to bbe742b Compare June 12, 2025 09:30
@waahlnaden
Copy link
Collaborator

Switching to Direct only doesn't put me in blocked state or disables the automatic multihop. I am somehow able to reconnect to the same configuration of relays even though I have no selection made in select location.

Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Phone or simulator?

Reviewable status: 10 of 17 files reviewed, 2 unresolved discussions (waiting on @buggmagnet and @SteffenErn)

Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Also, you're sure the relay doesn't support DAITA?

Reviewable status: 10 of 17 files reviewed, 2 unresolved discussions (waiting on @buggmagnet and @SteffenErn)

Copy link
Contributor

@SteffenErn SteffenErn left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 3 files at r4, 5 of 5 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@waahlnaden
Copy link
Collaborator

This is working fine on the phone, but the sim is borked. Sim doesn't go into blocked state unless you manually disconnect and try to connect again when activating Direct Only in a automatic multihop configuration (for example, Spain via Sweden).

Copy link
Contributor

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

@waahlnaden Please do not rely on the simulator to perform tests that would put you in the block state, the simulator cannot run the network extension and as such cannot reliably convey blocked state or not.
We made some improvements lately on it being able to simulate some form of blocked state by looking at the relay selector, but that does not match the full app.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@waahlnaden
Copy link
Collaborator

Yes I know. But, isn't there value in keeping the sim somewhat close to real usage? This is the furthest divergence I've encountered. Just wouldn't want our sim to end up in a state where we eventually cannot trust it at all if we keep adding things that makes it diverge further.

Copy link
Contributor

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

There is some value indeed, but the blocked state is entirely implemented in the Packet Tunnel (which the simulator cannot run) the effort required to make this happen in the simulator is way too big for the result. Especially because we run all our tests on a real device to being with.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@waahlnaden
Copy link
Collaborator

Case closed, looks good to me!

@rablador rablador force-pushed the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch from bbe742b to e08db1c Compare June 16, 2025 07:12
@rablador rablador merged commit ce72bb4 into main Jun 16, 2025
12 of 13 checks passed
@rablador rablador deleted the combine-daita-and-multihop-to-one-pill-when-smart-routing-is-ios-1202 branch June 16, 2025 07:15
@github-actions
Copy link

🚨 End to end tests failed. Please check the failed workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iOS Issues related to iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants