Repository navigation
Description
Goal
Implement Package 8A Feature F1 (approved by JOY on 2026-11-22 from Docs/Proposals/2026-11-22-de-xuat-tinh-nang-moi-phase-8.html): expose a transparent 30-day pre-discount floor audit inspired by Hlidac shopu / EU Omnibus Directive Article 6a alongside a 90-day percentile Buy-Now vs Wait-for-Sale indicator across rate.vn product price history, /inspect, and /deals with zero database migrations.
Requirements
- Pure Omnibus 30-Day Floor & 90-Day Percentile Engine (
apps/web/src/lib/omnibus-price-audit.ts):- Given an item or listings
price_historypoints, current selling price, and merchant-claimed strikethroughoriginal_price:- Compute
prior30dMinPriceand real discount/markup delta vs the 30-day prior floor. - Strict window honesty: Label as
30-day Omnibus floorONLY when valid observed history spans at least 30 full days prior (observedSpanDays >= 30) without disqualifying gaps; whenobservedSpanDays < 30, report the exact observed window (N-day observed floor) and never claim 30-day Omnibus certification or violation. - Compute the 90-day price-cycle percentile indicator when sufficient valid points exist:
<= P15(buy_now_floor- near 90d low),P15..P70(fair_market- stable range),> P70(above_recent_floor- elevated vs recent low, show VND gap above floor). - Exclude unavailable and bait-price points consistently with
offer-plausibility/deal-radar.
- Compute
- Given an item or listings
- UI Surfaces (
PriceHistorySection.tsx,InspectWorkspace.tsx,DealFinderWorkspace.tsx):- Render the 3-column Omnibus Price Truth card (
Current vs Claimed List Price,30-Day Prior Real Floor,90-Day Cycle Signal) inPriceHistorySection.tsxand/inspect. - Add quick seasonal sale filter chips on
/deals(DealFinderWorkspace.tsx) to filter genuine floor deals vs pre-sale inflated strikethrough listings across all 22 retail platforms.
- Render the 3-column Omnibus Price Truth card (
- Localization (
vi,en,cs):- Localize all copy in
apps/web/locales/{vi,en,cs}.jsonstrictly under namespaces"deals","inspect", and"priceVerdict"with 100% key parity acrossvi,en, andcs.
- Localize all copy in
Approach
Build a pure, deterministic TypeScript module in apps/web/src/lib/omnibus-price-audit.ts (zero LLM calls, zero DB DDL, reusing cached price_history and offer payloads), wire it into PriceHistorySection.tsx, InspectWorkspace.tsx, and DealFinderWorkspace.tsx, and add comprehensive unit tests in apps/web/src/lib/__tests__/discount-verdict-copy.test.ts and sale-state.test.ts.
Acceptance
- 30-day Omnibus floor is certified only when observed history covers
>= 30days; shorter histories display exact observed days honestly. - Fake pre-sale strikethrough markups (where claimed
original_priceexceedsprior30dMinPricewhile current price is equal or higher thanprior30dMinPrice) are clearly exposed with exact VND / percentage deltas. - 90-day Buy-Now / Fair-Market / Wait signal renders cleanly in
vi,en, andcswith WCAG 2.1 AA contrast (>= 4.5:1). - Zero DB DDL changes; full monorepo
typecheck,lint,test,build, and Playwright E2E pass.
Files
apps/web/src/lib/omnibus-price-audit.tsapps/web/src/components/reviews/PriceHistorySection.tsxapps/web/src/components/deals/DealFinderWorkspace.tsxapps/web/src/components/inspect/InspectWorkspace.tsxapps/web/locales/{vi,en,cs}.json("deals","inspect","priceVerdict"namespaces only)apps/web/src/lib/__tests__/discount-verdict-copy.test.tsapps/web/src/lib/__tests__/sale-state.test.ts
Activity
JOY commentedon Nov 22, 2026
🔒 [Agent: Core] Claim lock
refs/claims/1863taken by claimantantigravity:0bf51a92-7798-4214-9d8f-7dc9804217b4(Status: in-progress).JOY commentedon Nov 22, 2026
[Agent: Core] Claimed #1863 (, Status: Ready -> In Progress) on branch
feat/1863-omnibus-price-audit.JOY commentedon Nov 22, 2026
[Agent: Core] Implementation complete, 2 independent fresh-context reviews completed with all Round-1 findings fixed, and local
test/typecheck/lint/buildpassing. Moving status to In Review (PR: #1869, Commit:a2aa78ef).