Add versioned export/import for CarPlay, Watch, and Widgets configurations#4103
Add versioned export/import for CarPlay, Watch, and Widgets configurations#4103Copilot wants to merge 8 commits into
Conversation
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
…llback Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
|
@copilot let's go beyond, let's make CarPlay, Watch and Widgets configuration exportable, and then the App can handle the import flow for all of them directly in home (webview) screen, no need to have the specific feature screen open. |
I'll expand the feature to support CarPlay, Watch, and Widgets configuration export/import with:
Working on this now. |
…gets configs - Created ConfigurationExportable protocol with versioning support - Added ConfigurationExport container with v1 format - Made CarPlayConfig, WatchConfig, and CustomWidget conform to protocol - Created ConfigurationManager for centralized import/export - Updated CarPlayConfigurationViewModel to use new infrastructure - Added export/import UI to WatchConfigurationView - Added URL handler for homeassistant://import-config - File names now include version: HomeAssistant-CarPlay-v1.homeassistant Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
…zation - Fixed extra closing brace in CarPlayConfigurationViewModel - Renamed importWidgetsConfiguration to importWidgetConfiguration (singular) - Added localization strings for import confirmation UI - Updated IncomingURLHandler to use L10n instead of hardcoded strings - Added Config.Import localization enum with success and confirmation messages Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
- Added test for ConfigurationExport container format
- Added test for versioned filenames (HomeAssistant-{Type}-v1.homeassistant)
- Verify version, type, and data encoding/decoding
- Test all three configuration types (CarPlay, Watch, Widgets)
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
|
@copilot fix lint issues
|
…ue generics - Removed all trailing spaces from ConfigurationExportable.swift - Fixed indentation in IncomingURLHandler.swift (camera case) - Changed generic parameter to opaque generic (some ConfigurationExportable) - Fixed hoistPatternLet warnings (repositioned let bindings in switch cases) - Removed trailing spaces from ViewModel files Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
Fixed all linting issues in commit f7476f0:
|
CarPlay, Watch, and Widgets Configuration Export/Import
Completed Tasks:
Summary:
This PR implements a comprehensive, versioned export/import system for CarPlay, Watch, and Widgets configurations with:
Versioned Export Format:
ConfigurationExportcontainer with version tracking (v1)HomeAssistant-{Type}-v{Version}.homeassistantThree Configuration Types:
Two Import Methods:
homeassistant://import-config?url=file://...for direct importsAutomatic Migration:
Apple-Style UI:
All linting issues resolved.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.