Skip to content

Add push commands to open or hide full screen camera view#4688

Merged
bgoncal merged 7 commits into
mainfrom
camera-push-command
Jun 2, 2026
Merged

Add push commands to open or hide full screen camera view#4688
bgoncal merged 7 commits into
mainfrom
camera-push-command

Conversation

@bgoncal

@bgoncal bgoncal commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds push notification commands to open camera in full screen as well as closing it.

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#1338
FCM: home-assistant/mobile-apps-fcm-push#308

Any other notes

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.

Pull request overview

This PR adds two new push notification commands (show_camera / hide_camera) that allow the iOS app to present (or dismiss) a full-screen camera player overlay in response to notification commands, extending the existing notification-command pipeline used across APNs and local push.

Changes:

  • Extend legacy push payload parsing to support show_camera/hide_camera and include entity_id for show_camera.
  • Add new notification command handlers and register them in NotificationCommandManager.
  • Add app-side handling to present/dismiss a full-screen CameraPlayerView, plus JSON fixtures for push-server contract tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Sources/SharedPush/Sources/NotificationParserLegacy.swift Adds legacy parsing support for show_camera / hide_camera commands.
Sources/Shared/Notifications/NotificationCommands/NotificationsCommandManager.swift Registers new camera command handlers.
Sources/Shared/Notifications/NotificationCommands/HandlerShowCamera.swift Implements show_camera command handling by broadcasting an app event.
Sources/Shared/Notifications/NotificationCommands/HandlerHideCamera.swift Implements hide_camera command handling by broadcasting an app event.
Sources/PushServer/Tests/SharedPushTests/notification_test_cases.bundle/command_show_camera.json Adds push-server contract fixture for show_camera.
Sources/PushServer/Tests/SharedPushTests/notification_test_cases.bundle/command_hide_camera.json Adds push-server contract fixture for hide_camera.
Sources/PushServer/SharedPush/Sources/NotificationParserLegacy.swift Mirrors legacy parsing updates for the PushServer target.
Sources/App/Notifications/NotificationManager.swift Presents/dismisses full-screen camera overlay and schedules a fallback local notification.
HomeAssistant.xcodeproj/project.pbxproj Adds new handler source files to the Xcode project build.

Comment thread Sources/SharedPush/Sources/NotificationParserLegacy.swift
Comment thread Sources/App/Notifications/NotificationManager.swift
Comment thread Sources/App/Notifications/NotificationManager.swift
Comment thread Sources/App/Notifications/NotificationManager.swift Outdated
Comment thread .github/workflows/push_ci.yml Fixed
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.05263% with 30 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@efa8c74). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...tions/NotificationCommands/HandlerShowCamera.swift 0.00% 17 Missing ⚠️
...tions/NotificationCommands/HandlerHideCamera.swift 0.00% 12 Missing ⚠️
...ficationCommands/NotificationsCommandManager.swift 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4688   +/-   ##
=======================================
  Coverage        ?   43.80%           
=======================================
  Files           ?      282           
  Lines           ?    17058           
  Branches        ?        0           
=======================================
  Hits            ?     7473           
  Misses          ?     9585           
  Partials        ?        0           

☔ 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 5c02410 into main Jun 2, 2026
16 checks passed
@bgoncal bgoncal deleted the camera-push-command branch June 2, 2026 20:32
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