Skip to content

Auto connect to server while onboarding if no other server is detected#3694

Merged
bgoncal merged 4 commits intomasterfrom
onboarding-3
Jul 3, 2025
Merged

Auto connect to server while onboarding if no other server is detected#3694
bgoncal merged 4 commits intomasterfrom
onboarding-3

Conversation

@bgoncal
Copy link
Copy Markdown
Member

@bgoncal bgoncal commented Jul 3, 2025

Summary

Screenshots

Simulator.Screen.Recording.-.iPhone.16.-.2025-07-03.at.17.31.27.mp4

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@bgoncal bgoncal requested a review from Copilot July 3, 2025 15:24
@bgoncal bgoncal self-assigned this Jul 3, 2025
Copy link
Copy Markdown
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

Enhances the onboarding flow by automatically prompting the user to connect when exactly one server is discovered, using an updated bottom sheet component.

  • Adds a localized “Connect” button string for auto-connect
  • Extends AppleLikeBottomSheet to support a title and custom dismiss logic
  • Implements scheduling and UI for auto-connect in OnboardingServersListView

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Sources/Shared/Resources/Swiftgen/Strings.swift Added AutoConnect enum with localized button key
Sources/Shared/DesignSystem/Components/AppleLikeBottomSheet.swift Extended bottom sheet with title, custom dismiss, and styling refactors
Sources/App/Resources/en.lproj/Localizable.strings Added new localization entry for onboarding.servers.auto_connect.button
Sources/App/Onboarding/Steps/Servers/OnboardingServersListViewModel.swift Handled cancelled authentication flow before showing errors
Sources/App/Onboarding/Steps/Servers/OnboardingServersListView.swift Introduced auto-connect scheduling, bottom sheet view, and related UI constants
Comments suppressed due to low confidence (2)

Sources/Shared/DesignSystem/Components/AppleLikeBottomSheet.swift:9

  • [nitpick] Property name closebuttonSize should follow Swift camelCase conventions; rename to closeButtonSize for clarity.
    static let closebuttonSize: CGFloat = 30

Sources/App/Onboarding/Steps/Servers/OnboardingServersListView.swift:100

  • The new auto-connect flow and bottom sheet UI are core onboarding behaviors but currently lack dedicated tests. Please add unit or UI tests to cover scheduling, cancellation, and user interactions with the auto-connect sheet.
    @ViewBuilder

@bgoncal bgoncal requested review from TimoPtr and matthiasdebaat July 3, 2025 15:34
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.

Project coverage is 45.54%. Comparing base (4f60d68) to head (75bff22).
Report is 69 commits behind head on master.

Files with missing lines Patch % Lines
...DesignSystem/Components/AppleLikeBottomSheet.swift 0.00% 36 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3694      +/-   ##
==========================================
+ Coverage   44.72%   45.54%   +0.82%     
==========================================
  Files         232      233       +1     
  Lines       13911    14101     +190     
==========================================
+ Hits         6221     6423     +202     
+ Misses       7690     7678      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal bgoncal merged commit 00d6bae into master Jul 3, 2025
14 checks passed
@bgoncal bgoncal deleted the onboarding-3 branch July 3, 2025 16:18
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.

2 participants