Skip to content

Add support for folders in Watch app#4376

Merged
bgoncal merged 47 commits intohome-assistant:mainfrom
joelhawksley:watch-folders
Feb 27, 2026
Merged

Add support for folders in Watch app#4376
bgoncal merged 47 commits intohome-assistant:mainfrom
joelhawksley:watch-folders

Conversation

@joelhawksley
Copy link
Copy Markdown
Contributor

@joelhawksley joelhawksley commented Feb 19, 2026

Summary

It's pretty unwieldy to navigate a long list of items in the current Watch app. By adding the ability to group items into folders, you can now create a mini dashboard of sorts that is significantly easier to use.

For full disclosure, this was my first time writing Swift and otherwise working with Xcode. I had a lot of help from Claude Opus but did what I could to self-review and test.

Screenshots

Screenshot 2026-02-19 at 3 08 35 PM
demo.mov

Link to pull request in Documentation repository

TODO: I will write docs assuming the UI flow is approved.

Any other notes

Related issue: #1422

@joelhawksley joelhawksley marked this pull request as ready for review February 19, 2026 22:31
Copilot AI review requested due to automatic review settings February 19, 2026 22:31
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 pull request adds folder support to the Home Assistant Watch app, allowing users to organize their watch items into collapsible folders for better navigation. This addresses issue #1422 which requested folder organization for the watch app.

Changes:

  • Adds a new folder type to MagicItem.ItemType with nested items support via the items property
  • Implements iOS UI for creating, editing, and managing folders in the Watch configuration view
  • Implements watchOS UI for navigating into folders and displaying folder contents
  • Updates the communication service to properly handle folder items and their children
  • Adds comprehensive unit tests for folder management functionality

Reviewed changes

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

Show a summary per file
File Description
Sources/Shared/MagicItem/MagicItem.swift Adds folder type and items property to support nested folder structure
Sources/Shared/MagicItem/MagicItemProvider.swift Adds folder info provider with folder icon and default name
Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationViewModel.swift Implements folder management methods (add, update, delete, move items)
Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationView.swift Adds UI for creating folders with name input sheet
Sources/App/Settings/AppleWatch/HomeCustomization/FolderDetailView.swift Implements folder content editing view with item management
Sources/App/Settings/AppleWatch/HomeCustomization/FolderEditView.swift Implements folder customization view for icon, colors, and name
Sources/Extensions/Watch/Home/WatchHomeView.swift Adds folder navigation with back button and folder row display
Sources/Extensions/Watch/Home/MagicItemRow/WatchFolderRow.swift Implements Watch folder row UI component with chevron indicator
Sources/Extensions/Watch/Home/MagicItemRow/WatchMagicViewRow.swift Refactors icon color handling for consistency
Sources/Watch/WatchCommunicatorService.swift Updates to send folder and nested item info to Watch, handles folder press events
Tests/App/Watch/WatchConfig.test.swift Adds comprehensive unit tests for folder operations
FolderDetailView.swift Duplicate file in project root (should be removed)
HomeAssistant.xcworkspace/contents.xcworkspacedata Adds workspace file reference (likely unintended)
Podfile.lock Updates HAKit checksum and CocoaPods version (likely unintended)
HomeAssistant.xcodeproj/project.pbxproj Adds new files to Xcode project
Files not reviewed (1)
  • HomeAssistant.xcworkspace/contents.xcworkspacedata: Language not supported
Comments suppressed due to low confidence (2)

FolderDetailView.swift:64

  • The project uses SFSafeSymbols for type-safe SF Symbol references. Use systemSymbol parameter instead of systemName with string literals to comply with the coding guidelines and avoid runtime errors from invalid symbol names.
                Image(systemName: "line.3.horizontal")

FolderDetailView.swift:77

  • The project uses SFSafeSymbols for type-safe SF Symbol references. Use systemSymbol parameter instead of systemName with string literals to comply with the coding guidelines and avoid runtime errors from invalid symbol names.
                    Image(systemName: "line.3.horizontal")

Comment thread FolderDetailView.swift Outdated
Comment thread Sources/Shared/MagicItem/MagicItemProvider.swift Outdated
Comment thread Sources/Extensions/Watch/Home/MagicItemRow/WatchFolderRow.swift Outdated
Comment thread HomeAssistant.xcworkspace/contents.xcworkspacedata Outdated
Comment thread FolderDetailView.swift Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bgoncal
Copy link
Copy Markdown
Member

bgoncal commented Feb 19, 2026

Looking good! I'll be able to review it on Monday, meanwhile feel free to evaluate Copilots comments and address if necessary.

joelhawksley and others added 4 commits February 19, 2026 15:42
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

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

Comments suppressed due to low confidence (1)

Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationView.swift:257

  • This passes a hard-coded fallback folder name ("Folder"). Prefer L10n.Watch.Configuration.Folder.defaultName for localization consistency. Also, consider not passing folderName as a separate constant—after editing a folder name in FolderEditView, FolderDetailView’s navigation title won’t update because it uses this captured value.
            NavigationLink {
                FolderDetailView(
                    folderId: item.id,
                    folderName: item.displayText ?? "Folder",
                    viewModel: viewModel
                )

Comment thread Sources/App/Settings/AppleWatch/HomeCustomization/FolderEditView.swift Outdated
Comment thread Sources/Extensions/Watch/Home/WatchHomeView.swift Outdated
Comment thread Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationView.swift Outdated
Comment thread Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationView.swift Outdated
Comment thread Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationView.swift Outdated
Comment thread Sources/App/Resources/en.lproj/Localizable.strings
Comment thread Sources/Watch/WatchCommunicatorService.swift Outdated
joelhawksley and others added 5 commits February 19, 2026 19:52
…ew.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rationView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rationView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@joelhawksley joelhawksley marked this pull request as draft February 25, 2026 20:14
@joelhawksley
Copy link
Copy Markdown
Contributor Author

Converting to draft while I fix a bug I found.

@joelhawksley joelhawksley marked this pull request as ready for review February 25, 2026 20:51
@joelhawksley joelhawksley requested a review from Copilot February 25, 2026 20:51
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

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

@bgoncal
Copy link
Copy Markdown
Member

bgoncal commented Feb 26, 2026

Looking forward to use it on my watch! For some reason I cannot push to your branch anymore, so just fix the linting issues and let's merge it :D

@joelhawksley
Copy link
Copy Markdown
Contributor Author

@bgoncal lints fixed!

Comment thread Sources/Shared/MagicItem/MagicItem.swift Outdated
Comment thread Sources/Shared/MagicItem/MagicItem.swift Outdated
@home-assistant home-assistant Bot marked this pull request as draft February 26, 2026 19:20
@joelhawksley joelhawksley marked this pull request as ready for review February 26, 2026 20:03
@home-assistant home-assistant Bot requested a review from bgoncal February 26, 2026 20:03
@joelhawksley
Copy link
Copy Markdown
Contributor Author

@bgoncal no worries! Fixed, I think.

@bgoncal bgoncal merged commit 0071cc2 into home-assistant:main Feb 27, 2026
9 checks passed
bgoncal added a commit that referenced this pull request Feb 27, 2026
@bgoncal
Copy link
Copy Markdown
Member

bgoncal commented Feb 27, 2026

@joelhawksley I will have to revert your PR, I just noticed that between the massive changes in the .pbxproj file, you set to "auto sign", and this is not correct and also breaks the CI.

Can you revert the changes for this file and then add just what you need (files etc)?

@joelhawksley
Copy link
Copy Markdown
Contributor Author

#4396 here you go!

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