Skip to content

Conversation

@bgoncal
Copy link
Member

@bgoncal bgoncal commented Dec 5, 2025

This PR makes use of external bus navigation to allow more info dialogs to be opened without needing to refresh webview
Depends on: home-assistant/frontend#28375

Summary

Screenshots

Link to pull request in Documentation repository

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

Any other notes

This PR makes use of external bus navigation to allow more info dialogs to be opened without needing to refresh webview
@bgoncal bgoncal self-assigned this Dec 5, 2025
Copilot AI review requested due to automatic review settings December 5, 2025 14:43
@bgoncal bgoncal added the WebView label Dec 5, 2025
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

This PR enables more info dialogs to be opened using external bus navigation instead of requiring a full WebView reload. The change adds version detection to determine when the frontend supports this capability, allowing for smoother navigation when opening entity more info dialogs.

Key Changes:

  • Adds a new version constant canNavigateMoreInfoDialogThroughFrontend (2026.1) to track frontend feature support
  • Updates openPanel() logic to use external bus navigation for more info dialogs when the frontend version supports it
  • Maintains backward compatibility by falling back to direct URL loading for older frontend versions

Reviewed changes

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

File Description
Sources/Shared/Environment/AppConstants.swift Adds version constant to track when frontend supports more info dialog navigation via external bus
Sources/App/WebView/WebViewController.swift Updates guard condition to allow external bus navigation for more info dialogs when frontend version supports it

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.66%. Comparing base (4f60d68) to head (d5f9a5c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4056      +/-   ##
==========================================
+ Coverage   44.72%   45.66%   +0.94%     
==========================================
  Files         232      242      +10     
  Lines       13911    13611     -300     
==========================================
- Hits         6221     6216       -5     
+ Misses       7690     7395     -295     

☔ 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 16eced6 into master Dec 7, 2025
13 checks passed
@bgoncal bgoncal deleted the more-info-navigate branch December 7, 2025 15: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