Skip to content

Rename live activity tags#4670

Merged
bgoncal merged 4 commits into
mainfrom
live-activity-tweaks
May 27, 2026
Merged

Rename live activity tags#4670
bgoncal merged 4 commits into
mainfrom
live-activity-tweaks

Conversation

@bgoncal

@bgoncal bgoncal commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

Screenshots

Link to pull request in Documentation repository

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

Any other notes

@bgoncal bgoncal self-assigned this May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 09:57
@bgoncal bgoncal requested a review from edenhaus May 27, 2026 09:58
@bgoncal

bgoncal commented May 27, 2026

Copy link
Copy Markdown
Member Author

@rwarner Please check this will not impact other parts of the flow

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 renames several Live Activity wire-format keys used for webhook payloads and registration AppData, as well as the Keychain key used to persist the push-to-start token.

Changes:

  • Renames the dismissed webhook payload key from live_activity_tag to tag.
  • Renames the Keychain key for the push-to-start token.
  • Renames the registration AppData field used to report the push-to-start token.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Sources/Shared/LiveActivity/LiveActivityRegistry.swift Changes webhook dismissed payload keys and the Keychain storage key for the push-to-start token.
Sources/Shared/API/HAAPI.swift Changes the registration payload field name used to report the push-to-start token to HA.

static let webhookTypeDismissed = "mobile_app_live_activity_dismissed"
/// Keys in the dismissed webhook request data dictionary.
static let dismissedWebhookKeys: Set<String> = ["activity_id", "live_activity_tag", "reason"]
static let dismissedWebhookKeys: Set<String> = ["activity_id", "tag", "reason"]
Comment thread Sources/Shared/LiveActivity/LiveActivityRegistry.swift
Comment on lines 613 to 614
// The relay server uses this token to start a Live Activity entirely via APNs.
if let pushToStartToken = LiveActivityRegistry.storedPushToStartToken {
data: [
"activity_id": activityID,
"live_activity_tag": tag,
"tag": tag,
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
Sources/Shared/API/HAAPI.swift 0.00% 1 Missing ⚠️
...ces/Shared/LiveActivity/LiveActivityRegistry.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4670   +/-   ##
=======================================
  Coverage        ?   44.00%           
=======================================
  Files           ?      280           
  Lines           ?    17028           
  Branches        ?        0           
=======================================
  Hits            ?     7494           
  Misses          ?     9534           
  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.

}

static let pushToStartTokenKeychainKey = "live_activity_push_to_start_token"
static let pushToStartTokenKeychainKey = "live_activity_start_token"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In core I renamed it to live_activity_token. Is that fine or should I change it in core to live_activity_start_token?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

live_activity_token Is fine, I made a mistake here, thanks for the heads up

Comment thread Sources/Shared/LiveActivity/LiveActivityRegistry.swift Outdated
@bgoncal bgoncal merged commit 4401f7c into main May 27, 2026
19 of 20 checks passed
@bgoncal bgoncal deleted the live-activity-tweaks branch May 27, 2026 13:49
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