-
Notifications
You must be signed in to change notification settings - Fork 408
Add CallKit notification command to open Assist #4233
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
Draft
Copilot
wants to merge
10
commits into
main
Choose a base branch
from
copilot/add-call-notification-command
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Created CallKitManager to handle incoming calls via CallKit - Added 'call_assist' notification command handler - Integrated CallKit with NotificationManager to open AssistView on answer - Supports optional parameters: caller_name, pipeline_id, auto_start_recording Co-authored-by: bgoncal <[email protected]>
- Created test case JSON files for notification parser tests - Added comprehensive documentation for using the call_assist command - Included examples with various parameter combinations Co-authored-by: bgoncal <[email protected]>
- Added thread-safe access to CallKit state using DispatchQueue - Fixed race condition in call answer handler by capturing state atomically - Improved error handling in NotificationManager with guard statement - Prevents crash when no servers are available Co-authored-by: bgoncal <[email protected]>
- Added error handling for webViewWindowControllerPromise failure - Improved state clearing order in CallKit answer handler - Clear state before delegate callback to prevent potential reuse - Added explicit logging for promise failures Co-authored-by: bgoncal <[email protected]>
- Added atomic captureAndClearState() method for thread-safe state transitions - Added clearState() helper for atomic state clearing - All state operations now happen within a single queue.sync block - Prevents race conditions between reading and clearing state Co-authored-by: bgoncal <[email protected]>
- Comprehensive overview of CallKit notification command feature - Details on all files changed and their purposes - Technical implementation details and architecture - Code quality notes and future enhancement ideas Co-authored-by: bgoncal <[email protected]>
Copilot
AI
changed the title
[WIP] Add CallKit notification command to open AssistView
Add CallKit notification command to open Assist
Jan 16, 2026
Deleted documentation files related to the CallKit Assist command and implementation summary. Updated Xcode project to add CallKitManager.swift to the build and source groups. Refactored NotificationManager to use webViewControllerPromise for AssistView presentation. Cleaned up CallKitManager by removing hardcoded app name from provider configuration.
Member
|
On hold until more clear vision of use cases for this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements
call_assistnotification command using CallKit to present a native incoming call UI that opens AssistView when answered. Works from lock screen, similar toupdate_widgetsbut with user interaction.New Command Handler:
CallKitManager: Thread-safe CallKit integration with atomic state operationsHandlerCallAssist: Notification command processorNotificationManageropens AssistView on answerSupported Parameters:
caller_name: Display name for incoming call (default: "Home Assistant")pipeline_id: Specific Assist pipeline IDauto_start_recording: Auto-start voice recordingUsage:
Implementation Notes:
captureAndClearState()prevents race conditionsScreenshots
N/A - Uses native iOS CallKit UI
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
Test cases and comprehensive documentation included in
Documentation/CallKitAssistCommand.mdandDocumentation/CallKitAssistFlowDiagram.md.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.