Skip to content

chore(release): promote dev to main - #1093

Merged
JOY (JOY) merged 4 commits into
mainfrom
dev
Oct 25, 2026
Merged

JOY (JOY) merged 4 commits into
mainfrom
dev

Conversation

@JOY

@JOY JOY (JOY) commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

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/rules package 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

  • 🚀 New feature
  • 🐛 Bugfix
  • 🧹 Refactor
  • ⚡ Performance
  • 📚 Documentation
  • ⚙️ CI / Configuration

🔍 Changes Walkthrough

File Summary of Changes
packages/shared-data/src/rules/index.ts New: Entry point for the shared rules package, exporting price limits and plausibility checks.
packages/shared-data/src/rules/price-limits.ts New: Defines MAX_VALID_VND_PRICE (1B VND) as a single source of truth.
packages/shared-data/src/rules/listing-price-floor.ts New: Extracts earbuds/device price floor logic and regex into a reusable minimumListingPriceVnd function.
packages/shared-data/src/rules/offer-plausibility.ts Moved: Relocated from apps/web/src/lib/ to shared package; now imports MAX_VALID_VND_PRICE from local rules.
packages/shared-data/src/schemas/specs.schema.ts Refactor: Re-exports MAX_VALID_VND_PRICE from rules instead of defining it locally, ensuring schema and rules stay in sync.
packages/shared-data/package.json Config: Adds ./rules subpath export to allow importing rules without pulling in the main package (which contains zod/Supabase).
apps/web/src/lib/offer-plausibility.ts Removed: Logic moved to shared package.
apps/web/src/lib/rate-api.ts Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/server/rate/extension.ts Refactor: Replaces local price floor constants/regex with minimumListingPriceVnd from shared rules.
apps/web/src/server/rate/api-handler.ts Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/server/rate/deals.ts Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/app/[locale]/smartphones/[slug]/page.tsx Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/components/inspect/DeepInspectWorkspace.tsx Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/components/leaderboard/ProductOffersExplorer.tsx Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/app/[locale]/smartphones/page.tsx Fix: Adds mw-100 to dropdown container to prevent horizontal overflow on mobile.
apps/web/src/app/[locale]/merchants/[id]/page.tsx Fix: Adds flex-wrap to merchant rating spans to prevent text overflow on narrow screens.
apps/web/src/app/style/scss/style.scss Fix: Allows wrapping for long sort labels (white-space: normal) to prevent horizontal scroll on mobile.
apps/web/src/app/style/scss/_custom.scss Fix: Adds forced-colors media query styles to ensure pressed buttons remain visible in Windows High Contrast mode.
apps/web/src/components/elementary/LocaleSwitcher.tsx Fix: Reduces padding in compact mode to accommodate wider locale labels (EN/CS) without overflowing 320px screens.
apps/web/locales/cs.json Fix: Changes "falešné/spamové" to "falešné či spamové" to allow line breaks in the leaderboard badge.
apps/web/e2e/reflow-contrast.spec.ts Test: Adds E2E tests for mobile reflow and forced-color contrast on specific pages.
apps/web/e2e/selector-state.spec.ts Test: Adds E2E tests to verify pressed category buttons are distinguishable in forced-color mode.
apps/web/src/lib/__tests__/leaderboard-badge-copy.test.ts Test: New unit test ensuring locale strings for the leaderboard badge do not contain unbreakable words >12 chars.
apps/web/src/lib/__tests__/offer-plausibility.test.ts Refactor: Updates imports to use @repo/shared-data/rules.
apps/web/src/server/rate/__tests__/core-rate-architecture.test.ts Refactor: Updates imports to use @repo/shared-data/rules.
apps/extension/src/test-extension-pipeline.ts Refactor: Updates imports to use @repo/shared-data/rules.
packages/shared-data/src/__tests__/shared-data.test.ts Test: Adds comprehensive tests for the new rules subpath, verifying browser-safety (no zod/Supabase imports) and logic correctness.
apps/web/package.json Config: Adds leaderboard-badge-copy.test.ts to 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
Loading

JOY (JOY) and others added 4 commits October 26, 2026 00:27
…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>

@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.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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.

@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
rate Ready Ready Preview Oct 25, 2026 7:55pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4a2d0f8e-6223-4abf-a1ab-1a5e591dcf59

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added area:frontend Frontend / Next.js / UI area:shared Shared packages / contracts / configs area:extension labels Oct 25, 2026
@JOY
JOY (JOY) merged commit 27806ca into main Oct 25, 2026
23 checks passed

This branch was successfully deployed

1 active deployment
Preview — a1ae633a Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:extension area:frontend Frontend / Next.js / UI area:shared Shared packages / contracts / configs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant