Skip to content

Move ConditionalContainerView to it's own file - #5720

Merged
bgoncal merged 2 commits into
mainfrom
scout-1
Sep 10, 2026
Merged

Move ConditionalContainerView to it's own file#5720
bgoncal merged 2 commits into
mainfrom
scout-1

Conversation

@bgoncal

@bgoncal bgoncal commented Sep 10, 2026

Copy link
Copy Markdown
Member

AI Policy

Select exactly one option that describes AI usage in this contribution:

  • I have not used AI for this contribution.
  • AI assistance was used for this contribution.
  • AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review.

Summary

Screenshots

Link to pull request in Documentation repository

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

Any other notes

@bgoncal bgoncal self-assigned this Sep 10, 2026
Copilot AI lite review requested due to automatic review settings September 10, 2026 08:41
@bgoncal
bgoncal enabled auto-merge (squash) September 10, 2026 08:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The extracted view is missing the required UIKit import and SwiftUI preview.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR moves ConditionalContainerView into its own Swift file and updates Xcode project membership.

Changes:

  • Extracts the view from KioskView.swift.
  • Adds the standalone view file.
  • Updates synchronized project entries and ordering.
File summaries
File Description
Sources/App/Settings/Kiosk/KioskView.swift Removes the embedded view.
Sources/App/Settings/Kiosk/ConditionalContainerView.swift Contains the extracted view; needs the UIKit import and a required preview.
HomeAssistant.xcodeproj/project.pbxproj Registers the new file and updates project membership.
Review details

Suppressed comments (1)

Sources/App/Settings/Kiosk/ConditionalContainerView.swift:138

  • This is now a standalone SwiftUI view file, but it has no #Preview. The project’s SwiftUI convention requires each view to provide a preview (as the neighboring Kiosk views do), so add a representative ConditionalContainerView preview here.
}
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Sources/App/Settings/Kiosk/ConditionalContainerView.swift
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

⚠️ Unused L10n strings detected

Found 3 unused localization strings in the codebase.

Click to see details
Parsing Strings.swift...
Found 2873 L10n strings

Reading all Swift source code...
Read 11765272 characters of Swift code

Checking for unused strings...
Checked 100/2873 strings...
Checked 200/2873 strings...
Checked 300/2873 strings...
Checked 400/2873 strings...
Checked 500/2873 strings...
Checked 600/2873 strings...
Checked 700/2873 strings...
Checked 800/2873 strings...
Checked 900/2873 strings...
Checked 1000/2873 strings...
Checked 1100/2873 strings...
Checked 1200/2873 strings...
Checked 1300/2873 strings...
Checked 1400/2873 strings...
Checked 1500/2873 strings...
Checked 1600/2873 strings...
Checked 1700/2873 strings...
Checked 1800/2873 strings...
Checked 1900/2873 strings...
Checked 2000/2873 strings...
Checked 2100/2873 strings...
Checked 2200/2873 strings...
Checked 2300/2873 strings...
Checked 2400/2873 strings...
Checked 2500/2873 strings...
Checked 2600/2873 strings...
Checked 2700/2873 strings...
Checked 2800/2873 strings...

================================================================================
UNUSED STRINGS REPORT
================================================================================

Found 3 unused strings:


APPINTENTS:
  - L10n.AppIntents.ActiveEntities.Filter.climates
    Key: app_intents.active_entities.filter.climates
    Line: 297
  - L10n.AppIntents.ActiveEntities.Filter.locks
    Key: app_intents.active_entities.filter.locks
    Line: 305

TABBAR:
  - L10n.TabBar.Customize.AvailableSection.footerFull
    Key: tab_bar.customize.available_section.footer_full
    Line: 7501

================================================================================
Total unused: 3
================================================================================

================================================================================
Copy-paste these keys into the "Lokalise: Delete Keys" workflow (keys input):
================================================================================
app_intents.active_entities.filter.climates,app_intents.active_entities.filter.locks,tab_bar.customize.available_section.footer_full

To remove them, run the
Lokalise: Delete Keys
workflow — it deletes the keys from Lokalise and opens a PR removing them from
Localizable.strings and regenerating Strings.swift. Copy-paste these keys into the keys input:

app_intents.active_entities.filter.climates,app_intents.active_entities.filter.locks,tab_bar.customize.available_section.footer_full

@bgoncal
bgoncal merged commit 0ddf102 into main Sep 10, 2026
11 of 12 checks passed
@bgoncal
bgoncal deleted the scout-1 branch September 10, 2026 12:09
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.29412% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.68%. Comparing base (cf32e77) to head (ff1f7cd).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
.../App/Settings/Kiosk/ConditionalContainerView.swift 75.29% 21 Missing ⚠️

❌ Your patch check has failed because the patch coverage (75.29%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5720      +/-   ##
==========================================
- Coverage   42.73%   42.68%   -0.06%     
==========================================
  Files        1123     1124       +1     
  Lines       77883    77884       +1     
==========================================
- Hits        33286    33247      -39     
- Misses      44597    44637      +40     
Files with missing lines Coverage Δ
Sources/App/Settings/Kiosk/KioskView.swift 0.00% <ø> (-46.05%) ⬇️
.../App/Settings/Kiosk/ConditionalContainerView.swift 75.29% <75.29%> (ø)

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Harness.
📢 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test coverage of this pull request is below 90%

The unit tests run 73.21% of the lines this pull request
adds or changes (82 of 112 coverable lines).

The per-file breakdown, and the changed lines no test runs, are in the
job summary. Adding tests for those lines and pushing dismisses this
review automatically.

Lines that carry no executable code, and files the unit test targets do not
build, are not counted. If the new code genuinely cannot be unit tested, a
maintainer can dismiss this review.

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