Skip to content

Filter history: order list integration - #16422

Open
AdamGrzybkowski wants to merge 5 commits into
issue/WOOMOB-3825-filter-history-screenfrom
issue/WOOMOB-3826-order-list-integration
Open

Filter history: order list integration#16422
AdamGrzybkowski wants to merge 5 commits into
issue/WOOMOB-3825-filter-history-screenfrom
issue/WOOMOB-3826-order-list-integration

Conversation

@AdamGrzybkowski

@AdamGrzybkowski AdamGrzybkowski commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Part of WOOMOB-3326WOOMOB-3826

Description

Third PR in the filter history stack: wires the shared history screen (#16421) into the order list filters. Behind the FILTER_HISTORY flag.

  • Adds a flag-gated clock entry point to the order filter screen → opens the history screen with source=orders and tracks filter_history_button_tapped.
  • Saves the current selection to history when the user taps Show Orders — from either the categories screen or an options sub-screen — via a new SaveOrderFilterToHistory use case that reads the full selection from OrderFiltersRepository (the source of truth) and runs fire-and-forget on the app scope, so navigation isn't blocked and a rare failure can't crash the app.
  • Applies a picked past filter by writing the decoded selection (per category + custom date range) back to the repository and rebuilding the categories, reusing the existing persistence→UI round-trip (so filters whose values no longer exist are silently dropped).
  • OrderFilterHistoryMapper produces a canonical JSON payload (stable dedup) and a readable label.

Test Steps

Enable Filter History in the developer feature-flag screen, then on the Orders tab:

  • Open Filters → tap the clock (top right) → confirm the history is empty.
  • Select some filters → Show Orders → reopen the history → the filter appears at the top.
  • Apply more filters and confirm newest-first + dedup; swipe to delete one; tap a past filter and confirm the filter screen repopulates and Show Orders lists correctly; Clear History → confirm dialog → empty state.
  • Verify Tracks events fire with source=orders.

Images/GIFs

Screen_recording_20260817_102514.mp4
  • I have considered if this change warrants release notes — none needed (behind feature flag, not user-facing).

@wpmobilebot

wpmobilebot commented Aug 14, 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 Number778
Version25.4-rc-1
Application IDcom.woocommerce.android.prealpha
Commit7182f38
Installation URL47i8hgv438ieg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/WOOMOB-3826-order-list-integration branch from cf50664 to 87091f0 Compare August 14, 2026 14:49

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Code Review - Found 1 potential issue

The feature is well structured: the shared FilterHistoryRepository/FilterHistoryViewModel are reused cleanly, the payload encoding is canonicalized for reliable dedup, the save runs fire-and-forget on the app scope with failures swallowed, and the test coverage (mapper round-trip, save use case, both ViewModels) is thorough. One correctness issue on the custom-date-range round-trip is called out inline.

PR housekeeping
  • Applied repo AGENTS.md/CLAUDE.md guidance: store-app MVVM patterns (ScopedViewModel, triggerEvent/MultiLiveEvent, repository-mediated data access) are followed correctly.

Automatic review · claude-opus-4-8 · Workflow run

How to reply to a finding

Reply on this review (or inline at the line the finding refers to) with one of:

  • @claude addressed - I made the change. Bot verifies against the next diff before marking resolved.
  • @claude rejected: <reason> - Will not fix; reason gets quoted on the next review.
  • @claude not-applicable - Finding does not apply (wrong file, already covered elsewhere, etc.).

The bot honours these on the next review pass.

@AdamGrzybkowski AdamGrzybkowski added status: feature-flagged Behind a feature flag. Milestone is not strongly held. New Feature labels Aug 14, 2026
@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/WOOMOB-3826-order-list-integration branch 4 times, most recently from ed405c6 to 19457e2 Compare August 14, 2026 15:18
@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/WOOMOB-3826-order-list-integration branch from 2f8e712 to 349de92 Compare August 17, 2026 09:19
@AdamGrzybkowski
AdamGrzybkowski force-pushed the issue/WOOMOB-3826-order-list-integration branch from 349de92 to 7182f38 Compare August 17, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature status: feature-flagged Behind a feature flag. Milestone is not strongly held.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants