Skip to content

Mobile App UI and storage fixes, Exercise Sets Fix #717

Merged
CodeWithCJ merged 6 commits intoCodeWithCJ:mainfrom
apedley:app-ui-polish
Feb 22, 2026
Merged

Mobile App UI and storage fixes, Exercise Sets Fix #717
CodeWithCJ merged 6 commits intoCodeWithCJ:mainfrom
apedley:app-ui-polish

Conversation

@apedley
Copy link
Contributor

@apedley apedley commented Feb 22, 2026

Fixed exercise entry sync to use a default set, allowing the duration to display (#642)
Standardized structure of backgrounds (background, surface, raised, chrome)
Gestures for navigation between days
Moved API key to encrypted storage

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @apedley, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a series of enhancements aimed at refining the application's user experience and bolstering its security posture. It addresses the accurate representation of exercise durations within synced entries and establishes a consistent visual language through standardized background color variables. Furthermore, the introduction of swipe gestures streamlines daily navigation, while a critical security upgrade ensures API keys are stored using encrypted methods.

Highlights

  • Exercise Entry Sync Improvement: Exercise entry synchronization now includes duration in sets, allowing for proper display and handling of exercise session lengths.
  • UI Background Standardization: The application's UI background color variables have been standardized (e.g., 'canvas' to 'background', 'section' to 'surface', 'card' to 'raised', 'nav-bar' to 'chrome') for improved consistency across themes.
  • Day Navigation Gestures: Intuitive swipe gestures have been implemented on the Dashboard and Diary screens, enabling users to easily navigate between days.
  • API Key Security Enhancement: API keys are now stored in encrypted storage using Expo SecureStore, significantly enhancing data security.
  • Empty State Illustration: A new EmptyDayIllustration component was introduced to provide a more engaging user experience on days where no health entries are recorded.
Changelog
  • SparkyFitnessMobile/App.tsx
    • Renamed UI color variables for consistency.
    • Disabled gesture navigation for tab screens to prevent conflicts with new day navigation gestures.
  • SparkyFitnessMobile/tests/services/healthconnect/dataTransformation.test.ts
    • Added tests to confirm exercise session duration is correctly included in sets.
  • SparkyFitnessMobile/tests/services/healthkit/dataTransformation.test.ts
    • Added tests to confirm workout duration is correctly included in sets, including rounding and missing duration handling.
  • SparkyFitnessMobile/tests/services/storage.test.ts
    • Expanded storage tests to cover SecureStore integration, API key migration, and new background sync/collapsed categories storage.
  • SparkyFitnessMobile/app.config.ts
    • Updated iOS configuration to declare non-exempt encryption usage.
  • SparkyFitnessMobile/app.json
    • Added expo-secure-store plugin to project dependencies.
  • SparkyFitnessMobile/global.css
    • Refactored and standardized UI color variables (e.g., canvas to background, section to surface, card to raised, nav-bar to chrome).
    • Introduced new color variables for form states.
    • Adjusted various color values for light, dark, and AMOLED themes.
  • SparkyFitnessMobile/jest.setup.js
    • Added a mock implementation for expo-secure-store for testing purposes.
  • SparkyFitnessMobile/package-lock.json
    • Updated expo-secure-store dependency version.
  • SparkyFitnessMobile/package.json
    • Added expo-secure-store dependency.
  • SparkyFitnessMobile/src/components/AppearanceSettings.tsx
    • Updated background class from bg-section to bg-surface.
  • SparkyFitnessMobile/src/components/BottomSheetPicker.tsx
    • Updated background color variables and classes for consistency.
  • SparkyFitnessMobile/src/components/CalendarSheet.tsx
    • Updated background color variables for consistency.
  • SparkyFitnessMobile/src/components/CalorieRingCard.tsx
    • Updated progress fill color variable and background class.
  • SparkyFitnessMobile/src/components/DevTools.tsx
    • Updated background class to bg-surface.
  • SparkyFitnessMobile/src/components/EmptyDayIllustration.tsx
    • Added new component to display an illustration when no data is available for a day.
  • SparkyFitnessMobile/src/components/ExerciseProgressCard.tsx
    • Updated color variables and background class, and adjusted progress bar opacity.
  • SparkyFitnessMobile/src/components/ExerciseSummary.tsx
    • Updated background class to bg-surface.
  • SparkyFitnessMobile/src/components/FoodSummary.tsx
    • Updated background class to bg-surface.
  • SparkyFitnessMobile/src/components/HealthDataSync.tsx
    • Updated switch colors and background class, and refactored text color for 'Learn more'.
  • SparkyFitnessMobile/src/components/HydrationGauge.tsx
    • Updated background class to bg-surface.
  • SparkyFitnessMobile/src/components/MacroCard.tsx
    • Updated background class to bg-surface.
  • SparkyFitnessMobile/src/components/OnboardingModal.tsx
    • Updated background classes for modal content and privacy section.
  • SparkyFitnessMobile/src/components/PrivacyPolicyModal.tsx
    • Updated background class to bg-surface.
  • SparkyFitnessMobile/src/components/ServerConfig.tsx
    • Updated accent color variable and background class.
  • SparkyFitnessMobile/src/components/ServerConfigModal.tsx
    • Updated background classes for modal content and input fields.
  • SparkyFitnessMobile/src/components/SyncFrequency.tsx
    • Updated switch colors and background class.
  • SparkyFitnessMobile/src/screens/DashboardScreen.tsx
    • Implemented swipe gestures for day navigation.
    • Replaced inline empty state SVG with EmptyDayIllustration component.
    • Adjusted conditions for displaying calorie and exercise cards.
    • Updated background class.
  • SparkyFitnessMobile/src/screens/DiaryScreen.tsx
    • Implemented swipe gestures for day navigation.
    • Integrated EmptyDayIllustration for days without entries.
    • Updated background class.
  • SparkyFitnessMobile/src/screens/LogScreen.tsx
    • Updated background classes for screen, summary, filter, and log items.
  • SparkyFitnessMobile/src/screens/SettingsScreen.tsx
    • Updated background classes.
  • SparkyFitnessMobile/src/screens/SyncScreen.tsx
    • Updated background classes for screen, sync range, and health overview.
    • Added border to health metric display cards.
  • SparkyFitnessMobile/src/services/healthconnect/dataTransformation.ts
    • Modified exercise session transformation to include duration in sets.
  • SparkyFitnessMobile/src/services/healthkit/dataTransformation.ts
    • Modified workout transformation to include duration in sets.
  • SparkyFitnessMobile/src/services/storage.ts
    • Integrated expo-secure-store for API key storage.
    • Implemented logic for migrating legacy API keys from AsyncStorage to SecureStore.
    • Updated saveServerConfig, getAllServerConfigs, and deleteServerConfig to handle SecureStore.
  • SparkyFitnessMobile/src/types/healthRecords.ts
    • Added ExerciseSet interface to define the structure of an exercise set.
    • Updated TransformedExerciseSession to include an optional sets array.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request provides a significant UI polish, standardizing background colors and improving navigation with gestures. The migration of API keys to SecureStore is a critical security improvement. However, I identified a logic error in the Dashboard's conditional rendering that could hide the main calorie tracking card under common scenarios, and a potential race condition in the storage migration logic. I have also suggested some code cleanup for messy indentation and redundant logic.

Comment on lines +184 to +186
{(summary.foodEntries.length > 0 || summary.exerciseEntries.length > 0) &&
(summary.exerciseMinutesGoal > 0 || summary.exerciseCaloriesGoal > 0 || summary.exerciseMinutes > 0 || summary.otherExerciseCalories > 0) && (

Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This condition is redundant because it is already inside the 'else' branch of a ternary (line 196) that checks if both food and exercise entries are empty. If we reach this point, we already know at least one of them has entries.

@apedley apedley changed the title App UI polish Mobile App UI polish Feb 22, 2026
@apedley apedley changed the title Mobile App UI polish Mobile App UI and storage fixes, Exercise Sets Fix Feb 22, 2026
@CodeWithCJ CodeWithCJ merged commit 36ad2fb into CodeWithCJ:main Feb 22, 2026
6 checks passed
@apedley apedley deleted the app-ui-polish branch February 22, 2026 16:05
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.

2 participants