Filter history: shared history screen and ViewModel - #16421
Filter history: shared history screen and ViewModel#16421AdamGrzybkowski wants to merge 5 commits into
Conversation
Generated by 🚫 Danger |
|
|
There was a problem hiding this comment.
AI Code Review - Found 1 potential issue (a minor nit).
This is well-structured foundation work for the shared Filter History screen. It correctly follows the store-app MVVM conventions (ScopedViewModel, StateFlow via combine/toStateFlow, triggerEvent/MultiLiveEvent, Compose-in-Fragment), the swipe-to-delete + root-level nav-action patterns match existing code, SavedFilter is correctly made @Parcelize to travel as an ExitWithResult nav result, and the ViewModel is thoroughly unit-tested. No correctness, security, or backwards-compatibility concerns found.
PR housekeeping
- Unused string resource
filter_history_entry_content_descriptionis added instrings.xmlbut not referenced anywhere in the diff; either wire it up (e.g. as the row's content description) or drop it to avoid a lint warning. - Applied repo
AGENTS.md/CLAUDE.mdguidance: verified this is store-management (not POS) code and validated against the store MVVM/Compose patterns.
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.
81e412b to
92919ad
Compare
Adds the 4 filter history Tracks events (button tapped, past filter applied/removed, cleared) with a source property, mirroring iOS. Part 2 of WOOMOB-3326 (WOOMOB-3825).
Adds FilterHistoryFragment, Compose screen and ViewModel (single-select, swipe-to-delete, clear-all), hosted in both filter nav graphs. Part 2 of WOOMOB-3326 (WOOMOB-3825).
92919ad to
cf9574f
Compare

Part of WOOMOB-3326 — WOOMOB-3825
Description
Second PR in the filter history stack. Adds the shared UI, on top of the foundation from #16420. Still behind the
FILTER_HISTORYflag and not reachable from any menu yet (wired up in the order/product PRs).FilterHistoryView: a "Recent" list, single-select + Apply/Cancel, swipe-to-delete, "Clear History" with a confirmation dialog, and an empty state.FilterHistoryViewModeldriven byFilterHistoryRepository, taking asource(orders/products) argument and returning the chosenSavedFilteras a nav result.filter_history_button_tapped,_past_filter_applied,_past_filter_removed,_cleared) with asourceproperty, matching iOS.Test Steps
Not reachable in the app yet. CI green is the bar:
./gradlew :WooCommerce:testWasabiDebugUnitTest --tests "*FilterHistoryViewModelTest*"Stacked PRs
PR 2 of 4. Base branch:
issue/WOOMOB-3824-filter-history-foundation(#16420). Review/merge #16420 first.