Fine tuning Live Activity implementation#4696
Open
bgoncal wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fine-tunes the Live Activity implementation by extending the Live Activity content model to support a dynamically updateable title, and by reporting a per-activity push token expiration timestamp back to Home Assistant core.
Changes:
- Add
titletoHALiveActivityAttributes.ContentStateand plumb it through notification payload parsing and Live Activity UI rendering. - Extend the per-activity push token webhook payload with an
expires_atfield and freeze the TTL contract in tests. - Add a DEBUG-only switch to optionally disable local push handling during Live Activity testing.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Shared/LiveActivity/LiveActivityContractTests.swift | Updates wire-format contract tests for new title key and expires_at/TTL assertions. |
| Tests/Shared/LiveActivity/HandlerLiveActivityTests.swift | Extends handler tests to validate parsing of the new title field. |
| Sources/Shared/Notifications/NotificationCommands/HandlerLiveActivity.swift | Parses title into the dynamic Live Activity content state. |
| Sources/Shared/LiveActivity/LiveActivityRegistry.swift | Adds expires_at reporting for push tokens and defines TTL contract constant. |
| Sources/Shared/LiveActivity/HALiveActivityAttributes.swift | Adds title to ContentState with explicit CodingKeys + Codable support. |
| Sources/Extensions/Widgets/LiveActivity/HALockScreenView.swift | Uses dynamic state.title when present, falling back to attributes title. |
| Sources/Extensions/Widgets/LiveActivity/HADynamicIslandView.swift | Uses dynamic state.title when present, falling back to attributes title. |
| Sources/App/Notifications/NotificationManager.swift | Adds DEBUG-only toggle to force-disallow local push interface for testing. |
21 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4696 +/- ##
======================================
Coverage ? 0
======================================
Files ? 0
Lines ? 0
Branches ? 0
======================================
Hits ? 0
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Copilot
AI
changed the title
Fine tuning live activity implementation
Fine tuning Live Activity implementation
Jun 3, 2026
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
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
expires_at.expires_atto whole-second epoch values to keep the webhook contract stable and avoid fractional timestamp inconsistencies.live_activity_token) to keep the test contract consistent with production behavior.Screenshots
N/A (no user-facing UI changes in this follow-up adjustment)
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
CC @rwarner