Skip to content

Remove legacy actions#4584

Open
bgoncal wants to merge 3 commits intomainfrom
remove-ios-action-entry
Open

Remove legacy actions#4584
bgoncal wants to merge 3 commits intomainfrom
remove-ios-action-entry

Conversation

@bgoncal
Copy link
Copy Markdown
Member

@bgoncal bgoncal commented Apr 29, 2026

Summary

Screenshots

Link to pull request in Documentation repository

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

Any other notes

@bgoncal bgoncal self-assigned this Apr 29, 2026
Copilot AI review requested due to automatic review settings April 29, 2026 14:45
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

⚠️ Unused L10n strings detected

Found 6 unused localization strings in the codebase.

Click to see details
Parsing Strings.swift...
Found 1511 L10n strings

Reading all Swift source code...
Read 5514236 characters of Swift code

Checking for unused strings...
Checked 100/1511 strings...
Checked 200/1511 strings...
Checked 300/1511 strings...
Checked 400/1511 strings...
Checked 500/1511 strings...
Checked 600/1511 strings...
Checked 700/1511 strings...
Checked 800/1511 strings...
Checked 900/1511 strings...
Checked 1000/1511 strings...
Checked 1100/1511 strings...
Checked 1200/1511 strings...
Checked 1300/1511 strings...
Checked 1400/1511 strings...
Checked 1500/1511 strings...

================================================================================
UNUSED STRINGS REPORT
================================================================================

Found 6 unused strings:


ACTIONSCONFIGURATOR:
  - L10n.ActionsConfigurator.Action.createAutomation
    Key: actions_configurator.action.create_automation
    Line: 132
  - L10n.ActionsConfigurator.VisualSection.sceneDefined
    Key: actions_configurator.visual_section.scene_defined
    Line: 172
  - L10n.ActionsConfigurator.VisualSection.serverDefined
    Key: actions_configurator.visual_section.server_defined
    Line: 178

HOMEVIEW:
  - L10n.HomeView.Menu.customize
    Key: home_view.menu.customize
    Line: 1609

SETTINGSDETAILS:
  - L10n.SettingsDetails.Actions.ActionsSynced.footerNoActions
    Key: settings_details.actions.actions_synced.footer_no_actions
    Line: 3496
  - L10n.SettingsDetails.Actions.Scenes.customizeAction
    Key: settings_details.actions.scenes.customize_action
    Line: 3514

================================================================================
Total unused: 6
================================================================================

To clean up these strings, manually remove them from the Localizable.strings files
and regenerate Strings.swift using SwiftGen.

Copy link
Copy Markdown
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 removes the legacy “Actions” feature surfaces across the app and widgets extension, cleaning up related settings entry points and widget implementations.

Changes:

  • Removes the Actions widget(s) from the widget bundles and deletes the associated widget/provider/AppIntent code.
  • Removes the legacy Actions settings screen and Settings navigation entry.
  • Removes legacy Actions hooks from Magic Item add flow and stops registering the legacy Action observer on app startup.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Sources/Extensions/Widgets/Widgets.swift Stops registering legacy Actions widgets in all widget bundles.
Sources/Extensions/Widgets/Actions/WidgetActionsProvider.swift Deleted legacy intent-based timeline provider for Actions widget.
Sources/Extensions/Widgets/Actions/WidgetActions.swift Deleted Actions widget implementations (AppIntent + legacy IntentConfiguration).
Sources/Extensions/AppIntents/WidgetActionsAppIntent.swift Deleted Actions widget configuration AppIntent.
Sources/Extensions/AppIntents/Widget/Actions/WidgetActionsAppIntentTimelineProvider.swift Deleted Actions widget AppIntent timeline provider and related datasource helpers.
Sources/App/Settings/Settings/SettingsView.swift Removes the legacy Actions section from Settings UI.
Sources/App/Settings/Settings/SettingsItem.swift Removes the legacy Actions settings item/case and its legacyItems list.
Sources/App/Settings/Settings/ActionsSettingsViewModel.swift Deleted SwiftUI view model for legacy Actions settings screen.
Sources/App/Settings/Settings/ActionsSettingsView.swift Deleted SwiftUI legacy Actions settings screen.
Sources/App/Settings/Settings/ActionConfiguratorView.swift Deleted SwiftUI Action configurator/editor replacement.
Sources/App/Settings/Observation/Action+Observation.swift Deleted Realm observation that previously refreshed menus/shortcuts/widgets/suggestions when Actions changed.
Sources/App/Settings/MagicItem/Add/MagicItemAddViewModel.swift Removes legacy Actions support from Magic Item add view model.
Sources/App/Settings/MagicItem/Add/MagicItemAddView.swift Removes legacy Actions picker option and list UI from Magic Item add flow.
Sources/App/AppDelegate.swift Stops invoking Action.setupObserver() during model setup.
HomeAssistant.xcodeproj/project.pbxproj Removes the deleted Actions-related source files from the Xcode project.

@@ -152,15 +152,6 @@ struct SettingsView: View {
}
}

// Force Realm migration to happen now
_ = Realm.live()
Action.setupObserver()
NotificationCategory.setupObserver()
Comment on lines 46 to 55
WidgetCommonlyUsedEntities()
WidgetCustom()
WidgetAssist()
WidgetScripts()
WidgetTodoList()
WidgetGauge()
WidgetDetails()
WidgetActions()
WidgetOpenPage()
WidgetSensors()
}
Comment on lines 7 to 12

enum MagicItemAddType {
case scripts
case actions
case scenes
case entities
case assistPipelines
Comment on lines 146 to 151
}
}

@ViewBuilder
private var actionsList: some View {
actionsDeprecationDisclaimer
ForEach(viewModel.actions, id: \.ID) { action in
if visibleForSearch(title: action.Text, entityId: action.ID) {
Button(action: {
itemToAdd(.init(id: action.ID, serverId: action.serverIdentifier, type: .action))
dismiss()
}, label: {
EntityRowView(optionalTitle: action.Text, accessoryImageSystemSymbol: .plusCircleFill)
})
.tint(Color(uiColor: .label))
}
}
}

private var actionsDeprecationDisclaimer: some View {
Section {
Button {
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@37b4e7a). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4584   +/-   ##
=======================================
  Coverage        ?   43.24%           
=======================================
  Files           ?      275           
  Lines           ?    16700           
  Branches        ?        0           
=======================================
  Hits            ?     7222           
  Misses          ?     9478           
  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.

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