Fix watch folder bugs#4404
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes issues in the Apple Watch “folders” feature so folder edits apply correctly, folder creation uses a placeholder name, and navigation/UI behavior is more consistent between root and folder views.
Changes:
- Adjust
MagicItemEquatable/Hashablebehavior to treat more fields as “different” (intended to help UI reflect folder edits). - Hide the watch navigation bar in folder content view to better match the root view’s custom header/navigation behavior.
- Change “Add Folder” flow to start with an empty text field (placeholder) and fall back to the default name when saved empty.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Sources/Shared/MagicItem/MagicItem.swift | Expands equality comparison and tweaks hashing inputs for MagicItem. |
| Sources/Extensions/Watch/Home/WatchFolderContentView.swift | Hides navigation chrome to reduce layout/transition artifacts and rely on custom header/back. |
| Sources/App/Settings/AppleWatch/HomeCustomization/WatchConfigurationView.swift | Uses placeholder behavior for new folder name and defaults on save if empty. |
Comments suppressed due to low confidence (1)
Sources/Shared/MagicItem/MagicItem.swift:21
- This PR changes the semantics of
MagicItem’sEquatable/Hashableconformance in a way that affects multiple subsystems (watch config, widgets, CarPlay). There are existing tests for watch configuration behavior, but there are no tests asserting that widget state caching continues to work whenMagicItemcontent changes (e.g., customization/name changes should not prevent retrieving cached state for the same entity). Adding a focused unit test around the widget cache keying/lookup behavior would help prevent regressions here, especially ifMagicItemremains a dictionary key.
public static func == (lhs: MagicItem, rhs: MagicItem) -> Bool {
lhs.id == rhs.id
&& lhs.serverId == rhs.serverId
&& lhs.type == rhs.type
&& lhs.customization == rhs.customization
&& lhs.action == rhs.action
&& lhs.displayText == rhs.displayText
&& lhs.items == rhs.items
}
public func hash(into hasher: inout Hasher) {
hasher.combine(id)
hasher.combine(serverId)
}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4404 +/- ##
======================================
Coverage ? 0
======================================
Files ? 0
Lines ? 0
Branches ? 0
======================================
Hits ? 0
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@bgoncal just tested on TestFlight. Looks better, but bug 3) above is still present for me. Any ideas what might be causing it? |
|
@joelhawksley I can't reproduce it on my Apple Watch, whats your watch and watchOS version? |
|
@bgoncal iPhone 15 Pro @ 26.3.1 and Apple Watch Ultra 3 @ 26.3. What's yours? |
|
17 Pro, 26.4 Beta 3, Watch ultra 2 @ 26.3, the results should be the same since the screen size didnt change or anything like that between the 2 versions, I'll see if I can reproduce it early next week, I'm a bit busy right now with mTLS (feature in development), so if you find something please let me know |
Summary
This PR aims to fix a couple of bugs I noticed while testing the new watch folders feature in the latest Test Flight build:
IMG_2557.mov
Note: I could not reproduce the resizing bug in the simulator, and haven't been able to get Xcode to let me build to my devices locally. Would you be up for trying to reproduce it/verify my fix on your end?
Link to pull request in Documentation repository
N/A