Skip to content

Conversation

@najuna-brian
Copy link
Contributor

Summary

Fixes confusing UX issues on the Sync screen where version information and status messages were contradictory or unclear.
Closes #146

Issues Fixed

Version Display Confusion

  • Problem: App bundle versions showed "current" or "Unknown" instead of actual version numbers
  • Solution: Display actual version numbers for both local and server versions
  • Before: Local: current, Server: Unknown with "Update available"
  • After: Local: 003, Server: 004 with logical update status

Status Message Contradictions

  • Problem: Status card showed "Error" with subtext "All synced" simultaneously
  • Solution: Remove contradictory subtext when error state is active
  • Result: Clear, non-conflicting status messages

Authentication Error Handling

  • Problem: 401 errors during app bundle updates showed generic error messages
  • Solution: Add specific authentication checks and targeted error messages
  • Result: Users get clear guidance when authentication issues occur

Changes Made

SyncScreen.tsx

  • Modified checkForUpdates() to set server version to local version on manifest fetch failure
  • Updated getDataSyncStatus() to return "All synced" instead of "Ready" for consistency
  • Removed contradictory "All synced" subtext when error state is active
  • Added authentication and permission checks in handleCustomAppUpdate()
  • Enhanced error handling with specific 401 authentication error messages
  • Maintained display of actual version numbers for better user clarity

Testing

Test with normal sync operations, app bundle updates, network failures, authentication errors, and version display scenarios.

Impact

  • Improved UX: Users now see clear, consistent version and status information
  • Better error handling: More informative error messages guide users to resolution
  • Reduced confusion: Eliminates contradictory status displays

Copy link
Contributor

@IamLRBA IamLRBA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new check for errorMessage.includes('401') with the “Your session has expired…” alert is awesome, that'll greatly improve handling of authentication expiration/Unauthorized errors.

Copy link
Contributor

@r0ssing r0ssing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 🚀

@najuna-brian najuna-brian merged commit 74b7859 into OpenDataEnsemble:dev Jan 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Formulus] App bundle displayed versions and status

3 participants