Skip to content

Add "search devices", "search commands" and "Assist" to App gestures #3592

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

bgoncal
Copy link
Member

@bgoncal bgoncal commented May 12, 2025

Summary

Screenshots

Link to pull request in Documentation repository

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

Any other notes

@bgoncal bgoncal requested a review from Copilot May 12, 2025 16:06
@bgoncal bgoncal self-assigned this May 12, 2025
Copy link
Contributor

@Copilot 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

This PR adds support for three new App gestures ("search devices", "search commands" and "assist") by introducing corresponding key events, updating localization strings, and wiring up the actions within the WebView controller.

  • Added new tests to verify the JavaScript key events corresponding to the new gestures
  • Updated localized string mappings and the gesture action enum to include the new commands
  • Extended the WebView controller gesture handling to trigger evaluation of the new key events

Reviewed Changes

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

Show a summary per file
File Description
Tests/App/WebView/WebViewJavascriptCommandsTests.swift New tests added for search devices, search commands, and assist key events
Sources/Shared/Resources/Swiftgen/Strings.swift Added localized string entries for assist, search commands, and search devices options
Sources/Shared/AppGesture.swift Updated gesture enum and mapping to include assist, search commands, and search devices actions
Sources/App/WebView/WebViewJavascriptCommands.swift Added new static properties for the key events for assist, search commands, and search devices
Sources/App/WebView/WebViewController+Gestures.swift Extended gesture handling with new cases and corresponding methods for the new gestures
Files not reviewed (1)
  • Sources/App/Resources/en.lproj/Localizable.strings: Language not supported
Comments suppressed due to low confidence (1)

Tests/App/WebView/WebViewJavascriptCommandsTests.swift:54

  • [nitpick] Consider renaming 'testWebViewJavascriptCommandsKeyA' to 'testWebViewJavascriptCommandsAssist' for consistency with the assist gesture action.
@Test func testWebViewJavascriptCommandsKeyA() async throws {

Copy link

codecov bot commented May 12, 2025

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Project coverage is 45.69%. Comparing base (4f60d68) to head (70a52f7).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
Sources/Shared/AppGesture.swift 53.84% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3592      +/-   ##
==========================================
+ Coverage   44.72%   45.69%   +0.97%     
==========================================
  Files         232      232              
  Lines       13911    13941      +30     
==========================================
+ Hits         6221     6371     +150     
+ Misses       7690     7570     -120     

☔ 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 b7101dd into master May 12, 2025
14 checks passed
@bgoncal bgoncal deleted the more-gestures branch May 12, 2025 18:36
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.

1 participant