Conversation
Refactor various UI components and rename MoodNest to Mood across the app for consistency. Key changes: - PrivacyPolicyData & TermsOfService: updated wording replacing MoodNest with Mood and adjusted ProgressHub → Progress. - DashboardDietCardView: tightened text scaling, allowed tightening, increased layout priority, and made progress bar use flexible width. - DashboardEventCardView: adjusted Add Event label scaling and line limits. - DashboardInsightCardView: switched text alignment to leading, allowed multiline sizing and removed fixed height constraint. - DashboardWeekCardView: set fixed height to 160 for consistent layout. - FaceViews: made eye view respect aspect ratio and max dimensions. - MoodNestPlaylistsView: changed navigation title to "Mood" and limited background height. - MoodNestView: major layout cleanup — adjusted fonts, spacing, max heights, added safeAreaInset bottom button for "Set Mood" (safer placement), moved navigationDestination, and improved accessibility/spacing. - Xcode scheme: removed askForAppToLaunch flag. These changes improve responsiveness, accessibility, and visual consistency across different device sizes.
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
|
@copilot Add/Fix accessibility action to the all possible view (buttons, tapable view). Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action |
Agent-Logs-Url: https://github.com/rtk-rnjn/MomCare/sessions/dac30726-b2a1-4ab9-8ff4-9cfd70e71750 Co-authored-by: rtk-rnjn <37435729+rtk-rnjn@users.noreply.github.com>
Added
For views that already use proper SwiftUI |
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR focuses on improving UI responsiveness and accessibility across multiple SwiftUI screens, while also refactoring networking/auth/content layers (renames + stronger concurrency annotations) and updating some product text/metadata (e.g., MoodNest → Mood, HTTPS endpoint).
Changes:
- Added
.accessibilityAction(.default)to many tappable SwiftUI views and refactored repeated tap logic into helpers. - Performed broad service/repository renames (
AuthenticationService→MCAuthenticationService,NetworkManager→MCNetworkManager,ContentRepository→MCContentRepository) and adjusted concurrency-related types. - Tweaked several layouts (Dashboard/Mood views), updated wording (MoodNest → Mood), and updated project metadata (scheme, version, regions).
Reviewed changes
Copilot reviewed 76 out of 76 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| MomCare+/MomCare.xcodeproj/xcshareddata/xcschemes/TriTrack GlanceExtension.xcscheme | Scheme flag tweak (launch behavior). |
| MomCare+/MomCare.xcodeproj/project.pbxproj | Add hi region, bump marketing version. |
| MomCare+/MomCare+/Views/TriTrackScreens/TriTrackView.swift | Auth service rename; popup helpers + accessibility actions. |
| MomCare+/MomCare+/Views/TriTrackScreens/TriTrackSymptomsContentView.swift | Updated VO hint + default accessibility action. |
| MomCare+/MomCare+/Views/TriTrackScreens/TriTrackCalendarItemContentView.swift | Added accessibility default action to row selection. |
| MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackReminderRow.swift | Added accessibility element metadata + default action. |
| MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackAllSymptomsView.swift | Added accessibility default action to row selection. |
| MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackAllRemindersView.swift | Added accessibility default action to row selection. |
| MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackAllCalendarItemView.swift | Added accessibility default action to row selection. |
| MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift | Auth service rename; added accessibility action for support email. |
| MomCare+/MomCare+/Views/ProfileScreens/ProfilePersonalInfoView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/ProfileScreens/ProfileHealthInfoView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/ProfileScreens/ProfileAccountSecurityView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/ProfileScreens/ProfileAccountManagementView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/TermsOfServiceView.swift | MoodNest → Mood copy update. |
| MomCare+/MomCare+/Views/OnboardingScreens/SignUp/PreferencesSignUpView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/OnboardingScreens/SignUp/HealthMetricsSignUpView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/OnboardingScreens/SignUp/BaseSignUpView.swift | Remove mobile number field/validation; auth rename; adjust focus flow. |
| MomCare+/MomCare+/Views/OnboardingScreens/SignInView.swift | Auth rename; added default accessibility action. |
| MomCare+/MomCare+/Views/OnboardingScreens/OnboardingView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift | Auth rename; keyboard toolbar submit; accessibility action. |
| MomCare+/MomCare+/Views/OnboardingScreens/ForgetPasswordView.swift | Auth service rename in OTP/reset flows. |
| MomCare+/MomCare+/Views/MyPlanScreens/MyPlanFoodItemSearchView.swift | Default accessibility action; switch to MCNetworkManager. |
| MomCare+/MomCare+/Views/MyPlanScreens/MyPlanExercisePlanView.swift | Added default accessibility action. |
| MomCare+/MomCare+/Views/MyPlanScreens/Components/WaterIntake/WaterLogListView.swift | Added default accessibility action (edit). |
| MomCare+/MomCare+/Views/MyPlanScreens/Components/ExercisePlan/ExerciseHistory.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Views/MyPlanScreens/Components/ExercisePlan/ExerciseCardView.swift | Removed dismiss environment usage. |
| MomCare+/MomCare+/Views/MyPlanScreens/Components/DietPlan/MyPlanDietPlanProgressCardView.swift | Added default accessibility actions; refactored toggle helper. |
| MomCare+/MomCare+/Views/MyPlanScreens/Components/DietPlan/MyPlanDietPlanMealTimelineCardView.swift | Added default accessibility actions; switch to MCContentRepository. |
| MomCare+/MomCare+/Views/MyPlanScreens/Components/DietPlan/MyPlanDietPlanHistory.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Views/MoodNestScreens/MoodNestView.swift | Layout cleanup; safeAreaInset bottom button; navigationDestination moved. |
| MomCare+/MomCare+/Views/MoodNestScreens/MoodNestPlaylistsView.swift | Mood title; background height flexibility. |
| MomCare+/MomCare+/Views/MoodNestScreens/MoodAnimation/FaceViews.swift | Eye view aspect ratio + max sizing. |
| MomCare+/MomCare+/Views/DebugScreens/OSLogView.swift | Refactor log fetching; make subviews private; list styling updates. |
| MomCare+/MomCare+/Views/DebugScreens/JSONTreeRow.swift | Removed JSON tree debug UI. |
| MomCare+/MomCare+/Views/DashboardScreens/DashboardView.swift | Added default accessibility actions; auth rename. |
| MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardWeekCardView.swift | Fixed card height to 160. |
| MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardInsightCardView.swift | Leading alignment; multiline sizing; remove fixed height. |
| MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardEventCardView.swift | Add Event label scaling/line limit; accessibility action. |
| MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardDietCardView.swift | Tighten scaling/priority; flexible progress bar width. |
| MomCare+/MomCare+/Views/AppCore/MomCareRootView.swift | Auth service rename. |
| MomCare+/MomCare+/Views/AppCore/MomCareMainTabView.swift | Auth rename; switch to MCContentRepository. |
| MomCare+/MomCare+/Views/AppCore/MomCareApp.swift | Instantiate MCAuthenticationService. |
| MomCare+/MomCare+/Views/AppCore/Components/ReAuthenticationSheetView.swift | Auth service rename. |
| MomCare+/MomCare+/View+UIKit/AppDelegate.swift | Switch to MCAuthenticationService + MCNetworkManager. |
| MomCare+/MomCare+/View+UIKit/AppDelegate+MetricKit.swift | Switch to MCNetworkManager. |
| MomCare+/MomCare+/Info.plist | Removed background mode processing. |
| MomCare+/MomCare+/Handlers/ContentServiceHandler/ContentServiceHandler+MealPlan.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Handlers/ContentServiceHandler/ContentServiceHandler+Exercises.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Extensions/UserExerciseModel+ContentService.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Extensions/SongModel+ContentService.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Extensions/FoodReferenceModel+ContentService.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/DataHandlers/NetworkManager.swift | Rename + Sendable constraints + concurrency annotation changes. |
| MomCare+/MomCare+/DataHandlers/NetworkLocalizedError.swift | Add server message plumbing to API errors. |
| MomCare+/MomCare+/DataHandlers/HTTPErrorResponse.swift | Add CodableValue(any:) initializer. |
| MomCare+/MomCare+/DataHandlers/FunctionField.swift | Tighten generic constraints; remove conditional Sendable extension. |
| MomCare+/MomCare+/DataHandlers/Endpoint.swift | Switch base URL to HTTPS domain. |
| MomCare+/MomCare+/DataHandlers/DataTransferObject.swift | Make DTOs immutable; add concurrency annotations. |
| MomCare+/MomCare+/DataHandlers/ContentRepository.swift | Convert to actor MCContentRepository; update cache/db access. |
| MomCare+/MomCare+/DataHandlers/ContentRepository+Update.swift | Update extension target type + network manager calls. |
| MomCare+/MomCare+/DataHandlers/AuthenticationService.swift | Rename to MCAuthenticationService; concurrency annotations + main-thread updates. |
| MomCare+/MomCare+/Components/MoodNest/MoodResultViewModel.swift | Switch to MCContentRepository. |
| MomCare+/MomCare+/Components/LocationManager.swift | Formatting tweak in delegate method signature. |
| MomCare+/Common/hi.lproj/Localizable.strings | Added (currently empty) Hindi localization file. |
| MomCare+/Common/en.lproj/Localizable.strings | Added (currently empty) English localization file. |
| MomCare+/Common/Utils.swift | Added concurrency annotations to utility functions/constants. |
| MomCare+/Common/Static/PrivacyPolicyData.swift | MoodNest → Mood and ProgressHub → Progress copy update. |
| MomCare+/Common/Static/LicenseData.swift | License metadata and dependency name/url update. |
| MomCare+/Common/Models/UserModel.swift | Remove enum; add concurrency annotation to model. |
| MomCare+/Common/Models/SongModel.swift | Add concurrency annotation to models. |
| MomCare+/Common/Models/MealPlanModel.swift | Add concurrency annotation to model. |
| MomCare+/Common/Models/FoodItemModel.swift | Add concurrency annotation to model. |
| MomCare+/Common/Models/ExerciseModel.swift | Add concurrency annotation to models. |
| MomCare+/Common/KeychainHelper.swift | Added concurrency annotations to keychain APIs. |
| MomCare+/Common/Extensions/Date+Utils.swift | Added concurrency annotations to computed properties. |
| MomCare+/Common/Extensions/Data+Decoding.swift | Added concurrency annotation to decode helper. |
Comments suppressed due to low confidence (2)
MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift:1
- This
Button(role:action:)is missing a label, which will not compile. Add a label closure (e.g.,Text(\"Done\")) or use aButton(\"Done\", role: .confirm) { ... }initializer so the keyboard toolbar renders a tappable control.
MomCare+/MomCare+/Views/DebugScreens/OSLogView.swift:1 - The
Task.detached { ... }body is notthrows, but it usestrycalls (OSLogStore(...),store.getEntries(...)) without ado/catchortry?, which should not compile. Wrap the body indo/catch(and consider surfacing the error rather than silently ignoring it). Also, inserting intoentrieson the main queue for every log entry is potentially expensive; it would be more efficient to build an array off-main and then apply a single main-actor update.
| } | ||
|
|
||
| struct LoginCredentials: Codable, Sendable { | ||
| nonisolated struct LoginCredentials: Codable, Sendable { |
There was a problem hiding this comment.
nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).
| } | ||
|
|
||
| struct DailyInsightModel: Codable, Sendable { | ||
| nonisolated struct DailyInsightModel: Codable, Sendable { |
There was a problem hiding this comment.
nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).
| } | ||
|
|
||
| struct RegistrationResponse: Codable, Sendable, TokenContaining { | ||
| nonisolated struct RegistrationResponse: Codable, Sendable, TokenContaining { |
There was a problem hiding this comment.
nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).
| } | ||
|
|
||
| struct TokenPair: Codable, Sendable, TokenContaining { | ||
| nonisolated struct TokenPair: Codable, Sendable, TokenContaining { |
There was a problem hiding this comment.
nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).
| } | ||
|
|
||
| struct ServerMessage: Codable, Sendable { | ||
| nonisolated struct ServerMessage: Codable, Sendable { |
There was a problem hiding this comment.
nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).
| import Foundation | ||
|
|
||
| enum FieldType<Value: Codable> { | ||
| enum FieldType<Value: Codable & Sendable> { |
There was a problem hiding this comment.
FieldType previously had an explicit Sendable conditional conformance, but that conformance was removed. Even with Value: Sendable, FieldType will not automatically be Sendable unless it declares conformance. If FieldType is passed across concurrency domains (likely, given the new Sendable constraints), declare enum FieldType<...>: Sendable to make the intent explicit.
| enum FieldType<Value: Codable & Sendable> { | |
| enum FieldType<Value: Codable & Sendable>: Sendable { |
| name: "MomCare+", | ||
| license: "GNU General Public License v2.0", | ||
| urlString: "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html" | ||
| license: "CC BY-NC-ND 4.0 License", | ||
| urlString: "https://creativecommons.org/licenses/by-nc-nd/4.0/deed.en" |
There was a problem hiding this comment.
This PR updates the app's license metadata and changes the referenced third-party library name/URL, but the PR description doesn’t mention any licensing/dependency metadata changes. If this is intentional, it should be called out explicitly in the PR description (and ideally validated against the actual dependency used) because license metadata changes can have legal/release implications.
| name: "LNPopupUI", | ||
| license: "MIT License", | ||
| urlString: "https://github.com/LeoNatan/LNPopupController" | ||
| urlString: "https://github.com/LeoNatan/LNPopupUI" |
There was a problem hiding this comment.
This PR updates the app's license metadata and changes the referenced third-party library name/URL, but the PR description doesn’t mention any licensing/dependency metadata changes. If this is intentional, it should be called out explicitly in the PR description (and ideally validated against the actual dependency used) because license metadata changes can have legal/release implications.
Refactor various UI components, rename MoodNest to Mood across the app for consistency, and add comprehensive accessibility actions to all tappable views. Key changes:
.accessibilityAction(.default)to all tappable views (views using.onTapGesture) across the app so VoiceOver and other assistive technologies can invoke them. Covers Dashboard cards, TriTrack list rows and detail views, My Plan diet/exercise/water components, onboarding screens, and profile screen. Extracted shared popup and toggle logic into private helper methods to avoid duplication.These changes improve responsiveness, accessibility, and visual consistency across different device sizes.
Pull Request Template
Description
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.