Skip to content

[WOOMOB-3390] Revert order-status CIAB gating#16181

Merged
AdamGrzybkowski merged 5 commits into
trunkfrom
issue/woomob-3390-revert-order-status-gating
Jul 7, 2026
Merged

[WOOMOB-3390] Revert order-status CIAB gating#16181
AdamGrzybkowski merged 5 commits into
trunkfrom
issue/woomob-3390-revert-order-status-gating

Conversation

@AdamGrzybkowski

@AdamGrzybkowski AdamGrzybkowski commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes WOOMOB-3390

Sub-task of the CIAB ("Commerce In A Box") retirement on Android. On CIAB sites, order statuses are currently gated in two ways: the full status list is collapsed into a single "Open" status, statuses are shown read-only (non-editable), and status filters are grouped/remapped. This PR reverts that gating so order statuses behave the same on every site — full editable status list, no "Open" collapsing — and removes the now-unused order-status CIAB machinery entirely.

Stacked PR: this targets issue/WOOMOB-3387-revert-ipp-gating (the IPP-gating revert), not trunk. It should merge after that base. It is otherwise independent and safe to ship on its own.

What changed:

  • Editing gate removed (always editable). OrderDetailFragment, OrderCreateEditFormFragment, and OrderListFragment no longer branch on CIABAffectedFeature.OrderStatusEditing; the status view is always Mode.OrderEdit and multi-select is always enabled. The ciabSiteGateKeeper field was dropped from these fragments (it was used only for this gate).
  • Status-mapper routing removed. Every CIABOrderStatusMapper transform call (mapOrderStatus, mapOrderStatusOptionsList, mapFilterOptions, resolveFilterKeys) was inlined to use the input unchanged, and the injected ciabOrderStatusMapper was removed from OrderListViewModel, OrderDetailViewModel, OrderCreateEditViewModel, DashboardOrdersViewModel, GetOrderStatusFilterOptions, GetWCOrderListDescriptorWithFilters, and GetWCOrderListDescriptorWithFiltersBySiteId.
  • CIABOrderStatusMapper deleted. With all transform callers inlined, the class and its remaining static OPEN_KEY references became dead. Removed the class + its test, the three now-dead "Open"-status display branches (OrderStatusTag, AiAssistantOrderCardRenderer, and the DashboardOrdersViewModel status-color helper — a custom "open" status now falls through to the default color like any other custom status), and the now-unused ciab_order_status_open source string. (Translated copies are GlotPress-managed and cleaned up by the translation sync.)
  • Enum cleanup. Removed the now-unused OrderStatusEditing value from CIABAffectedFeature (mirrors the base branch removing InPersonPayments).
  • Tests. Dropped the ciabOrderStatusMapper mock wiring from the four affected ViewModel tests (they already stubbed it as identity, so behavior is unchanged) and removed the CIAB "open"-status color test from AiAssistantOrderCardRendererTest. Kept the ciabSiteGateKeeper mock in OrderDetailViewModelTest (still used for the unrelated "is CIAB -> fetch fulfillments" logic).

Test Steps

  1. Open the Order list — the status filter shows the full set of statuses (Processing, Pending, On hold, Completed, Failed, etc.), not a single "Open" status.
  2. Long-press an order in the list — multi-select is available.
  3. Open an order's details — tap the order status; the status is editable (opens the status picker) rather than read-only, and shows the real underlying status.
  4. Create/edit an order — in edit mode the order status is editable.
  5. Open the dashboard Orders card — order rows show their real statuses/colors and the status filter uses the full status list.

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.

@AdamGrzybkowski AdamGrzybkowski added category: unit tests Related to unit testing. feature: order list Related to the order list. type: technical debt Represents or solves tech debt of the project. labels Jul 2, 2026
@AdamGrzybkowski AdamGrzybkowski added this to the 25.2 milestone Jul 2, 2026
@wpmobilebot

wpmobilebot commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Build Number768
Version25.1-rc-2
Application IDcom.woocommerce.android.prealpha
Commit042bfec
Installation URL3tgmcgl7fhnrg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@codecov-commenter

codecov-commenter commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.93103% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.14%. Comparing base (54dbaca) to head (042bfec).
⚠️ Report is 10 commits behind head on trunk.

Files with missing lines Patch % Lines
...ters/domain/GetWCOrderListDescriptorWithFilters.kt 0.00% 4 Missing ⚠️
...ist/GetWCOrderListDescriptorWithFiltersBySiteId.kt 0.00% 4 Missing ⚠️
...erce/android/ui/orders/list/OrderListRepository.kt 20.00% 4 Missing ⚠️
...ders/filters/domain/GetOrderStatusFilterOptions.kt 0.00% 3 Missing ⚠️
...id/ui/dashboard/orders/DashboardOrdersViewModel.kt 88.88% 0 Missing and 1 partial ⚠️
...oid/ui/orders/creation/OrderCreateEditViewModel.kt 0.00% 1 Missing ⚠️
...merce/android/ui/orders/list/OrderListViewModel.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #16181      +/-   ##
============================================
- Coverage     42.15%   42.14%   -0.02%     
+ Complexity    13492    13476      -16     
============================================
  Files          2474     2473       -1     
  Lines        142821   142750      -71     
  Branches      20650    20639      -11     
============================================
- Hits          60212    60157      -55     
+ Misses        76524    76514      -10     
+ Partials       6085     6079       -6     

☔ View full report in Codecov by Harness.
📢 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.

@AdamGrzybkowski
AdamGrzybkowski marked this pull request as ready for review July 3, 2026 07:54
@AdamGrzybkowski
AdamGrzybkowski requested a review from Copilot July 3, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes CIAB-specific order-status gating and mapping so order statuses behave consistently across all sites (full editable status list, no “Open” collapsing), and deletes the now-dead CIAB order-status machinery across UI, domain, and tests.

Changes:

  • Removed CIABOrderStatusMapper usage throughout orders/dashboard flows and deleted the mapper + its unit tests and related “open” status UI branches/resources.
  • Made order-status UI always editable and enabled multi-select unconditionally (removed CIAB feature gating in fragments).
  • Simplified dashboard “top orders” filtering in OrderListRepository/DashboardOrdersViewModel from multi-status lists to a single nullable status filter, updating tests accordingly.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
WooCommerce/src/test/kotlin/com/woocommerce/android/ui/orders/OrderListViewModelTest.kt Removes CIAB mapper mocking/wiring from order list VM tests.
WooCommerce/src/test/kotlin/com/woocommerce/android/ui/orders/OrderDetailViewModelTest.kt Removes CIAB mapper mocking/wiring from order detail VM tests.
WooCommerce/src/test/kotlin/com/woocommerce/android/ui/orders/creation/UnifiedOrderEditViewModelTest.kt Removes CIAB mapper dependency from unified order edit VM test setup.
WooCommerce/src/test/kotlin/com/woocommerce/android/ui/dashboard/orders/DashboardOrdersViewModelTest.kt Updates mocks/stubs for new nullable single-status filter API on repository calls.
WooCommerce/src/test/kotlin/com/woocommerce/android/ui/aiassistant/AiAssistantOrderCardRendererTest.kt Removes CIAB “open” status color test expectation.
WooCommerce/src/test/kotlin/com/woocommerce/android/ciab/CIABOrderStatusMapperTest.kt Deletes mapper tests (mapper removed).
WooCommerce/src/main/res/values/strings.xml Removes CIAB “Open” status string resource.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/OrderStatusTag.kt Removes special-case coloring for CIAB “open” status key.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/OrderListViewModel.kt Removes CIAB mapper injection and identity mapping for status options.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/OrderListRepository.kt Changes dashboard top-orders filtering from list-of-statuses to single nullable status.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/OrderListFragment.kt Always enables multi-select (removes CIAB feature gate).
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/GetWCOrderListDescriptorWithFiltersBySiteId.kt Removes CIAB filter-key expansion; passes selected keys through unchanged.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/filters/domain/GetWCOrderListDescriptorWithFilters.kt Removes CIAB filter-key expansion; passes selected keys through unchanged.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/filters/domain/GetOrderStatusFilterOptions.kt Removes CIAB option grouping/mapping; returns raw options list.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/details/OrderDetailViewModel.kt Removes CIAB status mapping when resolving order status.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/details/OrderDetailFragment.kt Always initializes status view in editable mode (no CIAB gating).
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/creation/OrderCreateEditViewModel.kt Removes CIAB status mapping when observing status data.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/creation/OrderCreateEditFormFragment.kt Always initializes order status view as editable in edit mode.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/dashboard/orders/DashboardOrdersViewModel.kt Removes CIAB status mapping + “open” color special-casing; uses raw status/options.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/aiassistant/AiAssistantOrderCardRenderer.kt Removes CIAB “open” status special-case color mapping.
WooCommerce/src/main/kotlin/com/woocommerce/android/ciab/CIABOrderStatusMapper.kt Deletes mapper implementation (no longer used).
WooCommerce/src/main/kotlin/com/woocommerce/android/ciab/CIABAffectedFeature.kt Removes OrderStatusEditing enum entry (no longer used).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AdamGrzybkowski AdamGrzybkowski added the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Jul 3, 2026
@dangermattic

dangermattic commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by 🚫 Danger

@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/WOOMOB-3387-revert-ipp-gating branch from 563cf3b to cc9ee78 Compare July 6, 2026 12:53
@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/woomob-3390-revert-order-status-gating branch from 2d89a27 to b498548 Compare July 6, 2026 13:01
@irfano irfano self-assigned this Jul 6, 2026
@AdamGrzybkowski
AdamGrzybkowski requested a review from irfano July 7, 2026 08:15

@irfano irfano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 👍🏻 Thanks for the changes.

@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/WOOMOB-3387-revert-ipp-gating branch from cc9ee78 to c35e2fe Compare July 7, 2026 11:03
Base automatically changed from issue/WOOMOB-3387-revert-ipp-gating to trunk July 7, 2026 11:26
@AdamGrzybkowski AdamGrzybkowski removed the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Jul 7, 2026
@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/woomob-3390-revert-order-status-gating branch from 3aa1dc2 to 12a4823 Compare July 7, 2026 11:32
@AdamGrzybkowski
AdamGrzybkowski enabled auto-merge July 7, 2026 11:32
@AdamGrzybkowski
AdamGrzybkowski requested a review from a team as a code owner July 7, 2026 14:22
@AdamGrzybkowski
AdamGrzybkowski removed the request for review from a team July 7, 2026 14:22
@AdamGrzybkowski
AdamGrzybkowski merged commit 0502a98 into trunk Jul 7, 2026
16 checks passed
@AdamGrzybkowski
AdamGrzybkowski deleted the issue/woomob-3390-revert-order-status-gating branch July 7, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: unit tests Related to unit testing. feature: order list Related to the order list. type: technical debt Represents or solves tech debt of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants