Skip to content

Conversation

samiuelson
Copy link
Contributor

@samiuelson samiuelson commented Oct 1, 2025

WOOMOB-1405

Description

This PR performs incremental sync on the POS splash screen.

Steps to reproduce

On the POS splash screen, the incremental sync should start. Sync should be non-blocking.

Testing information

  1. Go to POS
  2. Notice in logs that incremental sync was attempted
  3. Notice the sync does not block the splash screen from moving to POS

The tests that have been performed

Above

Images/gif

N/A

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 1, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitc356054
Direct Downloadwoocommerce-wear-prototype-build-pr14675-c356054.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 1, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitc356054
Direct Downloadwoocommerce-prototype-build-pr14675-c356054.apk

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.38%. Comparing base (845eb44) to head (c356054).
⚠️ Report is 9 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #14675   +/-   ##
=========================================
  Coverage     38.37%   38.38%           
- Complexity     9824     9825    +1     
=========================================
  Files          2093     2093           
  Lines        116745   116747    +2     
  Branches      15622    15622           
=========================================
+ Hits          44806    44810    +4     
+ Misses        67780    67779    -1     
+ Partials       4159     4158    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…n-payment' into woomob-1405-woo-poslocal-catalog-run-incremental-sync-on-pos-splash
@samiuelson samiuelson marked this pull request as ready for review October 2, 2025 16:27
@samiuelson samiuelson requested a review from kidinov October 2, 2025 16:28
Base automatically changed from woomob-1116-woo-poslocal-catalog-run-incremental-sync-on-payment to trunk October 2, 2025 16:44
@samiuelson samiuelson added the type: task An internally driven task. label Oct 3, 2025
@samiuelson samiuelson added this to the 23.4 milestone Oct 3, 2025
@malinajirka malinajirka modified the milestones: 23.4, 23.5 Oct 3, 2025
@kidinov kidinov self-assigned this Oct 3, 2025
init {
val splashScreenStartTime = System.currentTimeMillis()

performIncrementalSyncUseCase.execute(WooPosIncrementalSyncReason.ON_SPLASH_SCREEN)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn’t it be blocking? I mean, shouldn’t we display a splash screen until the process is complete? Or what’s the plan here? Currently, every time I open the POS for the first time, it shows an empty list of products.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. The plan is to make the incremental sync non-blocking in general. However, in the next PR, I'm going to add a check if the full sync is required, which will handle cases like POS opened for the first time (empty local catalog). In case the full sync was never performed before, or the catalog is empty, the full sync will be required and will block an access to POS.

Copy link
Contributor

@kidinov kidinov left a comment

Choose a reason for hiding this comment

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

LGTM! I left one non-blocking question

@samiuelson samiuelson merged commit f3dceab into trunk Oct 3, 2025
16 of 17 checks passed
@samiuelson samiuelson deleted the woomob-1405-woo-poslocal-catalog-run-incremental-sync-on-pos-splash branch October 3, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants