Skip to content

Feat: build 18#106

Merged
destucr merged 7 commits intomainfrom
development
Dec 1, 2025
Merged

Feat: build 18#106
destucr merged 7 commits intomainfrom
development

Conversation

@destucr
Copy link
Contributor

@destucr destucr commented Dec 1, 2025

🎯 Summary

This pull request enhances user feedback during authentication and synchronization, improves role-based data management, and strengthens UI responsiveness and state handling throughout the app.

✨ Features/Changes

Authentication and User Feedback

  • Added isLoading property to AuthenticationService and updated async methods (signInWithApple, updateUserRole, updateUserName, createRoom, deleteAccount, joinRoom) to reflect loading state.
  • Updated SignInView and ProfileView to show loading indicators and disable buttons during authentication operations.

Synchronization State Management

  • Added isSyncing property to HeartbeatSyncManager to track sync status.
  • Updated HeartbeatSoundManager to observe HeartbeatSyncManager's isSyncing property via Combine for real-time UI updates.

Role-Based Data Management

  • Account deletion now only removes shared heartbeat and moment data if the user is not a father.
  • Fathers logging in now fetch the mother's pregnancy weeks using the room code, exposed via partnerPregnancyWeeks in AuthenticationService.

Debugging and Diagnostics

  • Added detailed debug print statements in key setup and sync methods to aid development.

UI Responsiveness and State Handling

  • Improved ProfileView with modal overlay and progress indicator during account deletion.
  • Disabled UI elements appropriately during loading and sync states.

📁 Files Changed

  • AuthenticationService.swift – Added isLoading, partnerPregnancyWeeks, and debug prints.
  • HeartbeatSyncManager.swift – Added isSyncing.
  • HeartbeatSoundManager.swift – Observes isSyncing for real-time updates.
  • SignInView.swift – Shows loading indicators.
  • ProfileView.swift – Improved loading UI, account deletion overlay, and button states.
  • Other supporting files for role-based logic and debug prints.

🔧 Usage Examples (if applicable)

// Show loading during sign-in
authService.isLoading // true during async operation

// Observe sync state
heartbeatSyncManager.isSyncing

// Access father's partner pregnancy weeks
authService.partnerPregnancyWeeks

@destucr destucr added the bug Something isn't working label Dec 1, 2025
@destucr destucr merged commit 9783d71 into main Dec 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants