Repository navigation
Conversation
…1083) The catalog sort toggle was nowrap, so the Czech label pushed the page 38px sideways; let it wrap within its container. Separately, the wider "EN" and "CS" locale labels pushed the phone menu toggle's 44px tap area 3px off screen; trim the compact switcher's padding to fit every label. Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#1084) (#1085) * fix(web): keep the Czech leaderboard and merchant header inside 320px (#1084) "falešných/spamových" had no line-break opportunity and overflowed the leaderboard's blocked-spam badge; use "či" instead of the slash. The merchant header's rating, follower and model items were non-wrapping inline-flex rows that forced the text column wider than the screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(web): guard the leaderboard blocked-spam badge copy (#1084) The E2E seed has no ignored reviews, so /cs/leaderboard never renders the blocked-spam badge. Check the copy directly: no plural branch in any locale may contain a word too long to wrap inside the badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…olors (#1086) (#1087) Forced colours replace the background and text colours that set a pressed toggle apart, so the selected category on the leaderboard and compare switchers looked like the others in Windows High Contrast. Draw every [aria-pressed="true"] control with Highlight/HighlightText. Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…loor (#1091) * refactor(shared-data): one source for the bait-price rule and price floor (#1089) Move the bait-price rule (offer-plausibility) and the listing price floor (1.2M VND device / 400k earbuds) out of apps/web into a browser-safe subpath, @repo/shared-data/rules, so the importer and Rate-Services can use the same rules. The 1B VND ceiling now has one definition, shared by the schemas and the rule. No behaviour change: the rules are moved, not altered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(shared-data): tighten the price rules checks (#1089) Review P3s: the browser-safety check now requires every import in dist/rules to be a sibling module (it missed ../index.js and bare zod imports), and the single-ceiling check fails if specs.schema redefines MAX_VALID_VND_PRICE instead of comparing values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Promote dev to main.
Merge with a merge commit, never squash (Docs/Resources/RELEASE.md).
📌 TL;DR
This PR refactors price validation logic into a shared, browser-safe
@repo/shared-data/rulespackage to eliminate duplication and prevent heavy dependencies (zod/Supabase) from leaking into client bundles. It also fixes mobile layout overflow issues for long Czech/Vietnamese labels and ensures accessibility compliance for forced-color modes.🎯 Type of Change
🔍 Changes Walkthrough
packages/shared-data/src/rules/index.tspackages/shared-data/src/rules/price-limits.tsMAX_VALID_VND_PRICE(1B VND) as a single source of truth.packages/shared-data/src/rules/listing-price-floor.tsminimumListingPriceVndfunction.packages/shared-data/src/rules/offer-plausibility.tsapps/web/src/lib/to shared package; now importsMAX_VALID_VND_PRICEfrom local rules.packages/shared-data/src/schemas/specs.schema.tsMAX_VALID_VND_PRICEfrom rules instead of defining it locally, ensuring schema and rules stay in sync.packages/shared-data/package.json./rulessubpath export to allow importing rules without pulling in the main package (which contains zod/Supabase).apps/web/src/lib/offer-plausibility.tsapps/web/src/lib/rate-api.ts@repo/shared-data/rules.apps/web/src/server/rate/extension.tsminimumListingPriceVndfrom shared rules.apps/web/src/server/rate/api-handler.ts@repo/shared-data/rules.apps/web/src/server/rate/deals.ts@repo/shared-data/rules.apps/web/src/app/[locale]/smartphones/[slug]/page.tsx@repo/shared-data/rules.apps/web/src/components/inspect/DeepInspectWorkspace.tsx@repo/shared-data/rules.apps/web/src/components/leaderboard/ProductOffersExplorer.tsx@repo/shared-data/rules.apps/web/src/app/[locale]/smartphones/page.tsxmw-100to dropdown container to prevent horizontal overflow on mobile.apps/web/src/app/[locale]/merchants/[id]/page.tsxflex-wrapto merchant rating spans to prevent text overflow on narrow screens.apps/web/src/app/style/scss/style.scsswhite-space: normal) to prevent horizontal scroll on mobile.apps/web/src/app/style/scss/_custom.scssforced-colorsmedia query styles to ensure pressed buttons remain visible in Windows High Contrast mode.apps/web/src/components/elementary/LocaleSwitcher.tsxapps/web/locales/cs.jsonapps/web/e2e/reflow-contrast.spec.tsapps/web/e2e/selector-state.spec.tsapps/web/src/lib/__tests__/leaderboard-badge-copy.test.tsapps/web/src/lib/__tests__/offer-plausibility.test.ts@repo/shared-data/rules.apps/web/src/server/rate/__tests__/core-rate-architecture.test.ts@repo/shared-data/rules.apps/extension/src/test-extension-pipeline.ts@repo/shared-data/rules.packages/shared-data/src/__tests__/shared-data.test.tsrulessubpath, verifying browser-safety (no zod/Supabase imports) and logic correctness.apps/web/package.jsonleaderboard-badge-copy.test.tsto the test script.📊 Architectural Flow
flowchart TD subgraph "Shared Package (@repo/shared-data)" direction TB RulesIndex["rules/index.ts"] PriceLimits["rules/price-limits.ts<br/>(MAX_VALID_VND_PRICE)"] Plausibility["rules/offer-plausibility.ts<br/>(plausibleOffers, etc.)"] Floor["rules/listing-price-floor.ts<br/>(minimumListingPriceVnd)"] Schemas["schemas/specs.schema.ts"] RulesIndex --> PriceLimits RulesIndex --> Plausibility RulesIndex --> Floor Plausibility --> PriceLimits Schemas --> PriceLimits end subgraph "Web App (apps/web)" direction TB ServerCode["Server Components / API Routes"] ClientCode["Client Components"] Tests["Unit / E2E Tests"] ServerCode -- "import" --> RulesIndex ClientCode -- "import" --> RulesIndex Tests -- "import" --> RulesIndex end subgraph "Extension (apps/extension)" ExtCode["Extension Logic"] ExtCode -- "import" --> RulesIndex end style RulesIndex fill:#e1f5fe,stroke:#01579b,stroke-width:2px style PriceLimits fill:#fff9c4,stroke:#fbc02d,stroke-width:2px