Skip to content

Adjust LocationForSecureConnection wording#6509

Merged
TimoPtr merged 6 commits intomainfrom
fix/currently_using_http
Mar 16, 2026
Merged

Adjust LocationForSecureConnection wording#6509
TimoPtr merged 6 commits intomainfrom
fix/currently_using_http

Conversation

@TimoPtr
Copy link
Member

@TimoPtr TimoPtr commented Feb 26, 2026

Summary

This PR adjust the wording of the LocationForSecureConnection screen to match the current configuration and not a generic one that was missleading for some users.

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

Copilot AI review requested due to automatic review settings February 26, 2026 16:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the onboarding/settings “LocationForSecureConnection” messaging so the screen can show different explanatory text depending on whether the server configuration includes any plain HTTP URLs.

Changes:

  • Split the secure-connection explanatory string into a generic version and an HTTP-specific version.
  • Add hasPlainTextUrl wiring from LocationForSecureConnectionViewModel into the screen to choose the appropriate message.
  • Extend unit and screenshot coverage to validate the HTTP-specific variant.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
common/src/main/res/values/strings.xml Adds a new HTTP-specific string and adjusts the generic content string.
app/src/main/kotlin/io/homeassistant/companion/android/onboarding/locationforsecureconnection/LocationForSecureConnectionViewModel.kt Exposes hasPlainTextUrl as a new flow for the UI to branch on.
app/src/main/kotlin/io/homeassistant/companion/android/onboarding/locationforsecureconnection/LocationForSecureConnectionScreen.kt Plumbs hasPlainTextUrl into the UI and selects the appropriate string resource.
app/src/test/kotlin/io/homeassistant/companion/android/onboarding/locationforsecureconnection/LocationForSecureConnectionScreenTest.kt Adds a test case and updates expectations to account for the conditional text.
app/src/screenshotTest/kotlin/io/homeassistant/companion/android/onboarding/locationforsecureconnection/LocationForSecureConnectionScreenshotTest.kt Adds a preview/screenshot scenario for the HTTP variant.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Test Results

 94 files   94 suites   10m 53s ⏱️
885 tests 885 ✅ 0 💤 0 ❌
923 runs  915 ✅ 8 💤 0 ❌

Results for commit 56d389c.

♻️ This comment has been updated with latest results.

@TimoPtr TimoPtr requested a review from jpelgrom March 3, 2026 08:33
<string name="location_sharing_no_share">Do not share my location</string>
<string name="location_secure_connection_title">Let us help secure your remote connection</string>
<string name="location_secure_connection_content">It appears that your connection is not encrypted (using HTTP). If the app knows when you\'re away from home, it can choose a more secure way to connect to your Home Assistant system if available. This requires location services to be enabled.</string>
<string name="location_secure_connection_content_http">It appears that your connection is not encrypted (currently using HTTP).</string>
Copy link
Member

Choose a reason for hiding this comment

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

The check from a technical view is 'does the server have any plain text url'. This text suggests you are currently using a plain text url.

Copy link
Member Author

Choose a reason for hiding this comment

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

What about currently using HTTP in your configuration?

Copy link
Member

@jpelgrom jpelgrom left a comment

Choose a reason for hiding this comment

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

Let's go with this for now and see if it helps reduce confusion

@TimoPtr TimoPtr enabled auto-merge (squash) March 16, 2026 09:59
@TimoPtr TimoPtr merged commit 1b28100 into main Mar 16, 2026
23 checks passed
@TimoPtr TimoPtr deleted the fix/currently_using_http branch March 16, 2026 10:24
sk7n4k3d pushed a commit to sk7n4k3d/home-assistant-android that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants