Repository navigation
Conversation
…ible (#809, #811) (#812) At 320px the header needed 327px of 296, so every page scrolled sideways and the menu toggle was cut off; the review sort select also overflowed. Tighten the header spacing below 360px, slim the compact language switcher and let the sort select shrink. Excluded review cards were dimmed with opacity-75, which dropped all their text to 3.1-3.9:1. Set them apart by background and border only. Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…809) (#813) The 34px .mobile_nav margin from #812 never applied: _custom.scss is emitted before the template, whose 38px rule wins. Keep 38px on purpose (the toggle's 44px tap area reaches 7px past its box and must not cover the icons) and remove the rule. The 320px test now checks that the tap area stays inside the viewport and clear of the header icons. Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ual spellings (#815) (#816) A size written apart ends the generic model like "256GB"; "ProMax" (and an iPhone "16ProMax") is "Pro Max", and "Max" after "Pro" stays past the 4-token cap, so Redmi Note 17 Pro Max no longer keys as the Pro; Sony WF/WH-1000XM match without the hyphen (the hyphenless brand/category check needs the "XM"). Against 3,117 crawled titles only the intended 16 change key; no master name changes. dos[bot] CLEAN_PASS on 6fc7195; fresh-context review found no P0-P2 (each regex change pinned by a failing revert), and its P3s are fixed in 6fc7195. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
…" titles as iPhones (#817) (#818) The Apple branch fell back to the iPhone for any title no line pattern knew. It now reads the iPad chip ("A16", "(A16)", and an A16 or later chip after the screen size or generation), "Gen 10", MacBook Neo, iPhone Air and Duo, and "(Nth generation)" as the generation number; with no line matched, it takes the Apple family the title names first. The Watch SE takes a number as its generation unless a case size or storage follows. Against dev, 252 of the 3,117 corpus titles change key: all from apple:iphone:* to the family they name, except "iPad 11 (A16) WiFi" joining apple:ipad-a16. No master name changes. dos[bot] CLEAN_PASS on 025d205. CodeRabbit's two findings and two fresh-context reviews' findings fixed (a quadratic iPad pattern, the double space, "Neoprene", "SE 2nd Gen", "11-inch (A16)"); older gaps go to #819. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
"Apple iPad mini 6 Wi-Fi 64GB" and "Apple iPad mini 7 64GB" both keyed as apple:ipad-mini:64gb, so two models with different prices shared a master. The iPad pattern now keeps the number after "mini" unless a storage, a size or more digits follow ("mini 64GB", "mini 8.3 inch", "mini 8,3 inch", "mini 2024" stay "mini"; a separator comma does not), and a mini title naming the A17 Pro is the 7th. Of the 3,117 corpus titles only the 16 iPad mini 6 and 7 titles change key; no master name changes.
dos[bot] CLEAN_PASS on 7e8d26b; CodeRabbit's finding (a separator comma after the number) fixed in 7e8d26b and confirmed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
The iPad mini generation from #820 took any one or two digits not followed by a storage unit, so "Apple iPad mini 5G 64GB" keyed as apple:ipad-mini-5 (the 2019 iPad mini 5) and "iPad mini 64 Wifi" as apple:ipad-mini-64. It is now one digit 1-9 not followed by another digit or a "G"; "iPad mini 6 5G" is still the mini 6. The 3,117 corpus titles and 70 master names key as before. dos[bot] CLEAN_PASS on d1c28d9. Found by the fresh-context replacement review of DOS/Rate-Services#362. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
The Apple brand test matched the "ipad" inside "Mipad", so Xiaomi tablets keyed as apple:ipad-5. Apple now takes "ipad" only when no letter comes before it, and "Mi Pad" or "Mipad" is Xiaomi and a tablet. Of 3,117 real titles only the three Mipad titles and "Mi pad 6" change key; no master name changes key. dos[bot] CLEAN_PASS on 91717ff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
…not read it (#829) (#830) * fix(web): /api/health checks the database and answers 503 when it cannot read it (#829) During the 2026-10-24 outage (#814) every uncached database read failed while /api/health still said ok, because it never touched the database. It now reads one row of rate.categories with the app's own client and key (3 s timeout, result reused for 15 s per instance, concurrent requests share one probe) and reports checks.database. A failed read is a 503 with status "degraded"; the cause is logged, never returned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(web): health tests reset the cached client and the probe logs its cause (#829) Review follow-up. The health test helper reset the Supabase client it pointed at a stub host, so later guards stop making real requests (the core suite drops from about 60 s to 9 s). The probe logs the error with a timedOut flag instead of replacing it, and inFlight is cleared even if a future probe throws. 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.
/api/healthchecks the database and answers 503 when it cannot read it.key_specs.Merge with a merge commit (no squash).
🤖 Generated with Claude Code
📌 TL;DR
This PR hardens the product ingestion pipeline against malformed data and security vulnerabilities by enforcing strict integer bounds on hardware specs, sanitizing HTTP URLs to prevent injection, and refining product normalization logic for Apple and Xiaomi devices. It also updates the test suite to validate these new safety constraints and parsing edge cases.
🎯 Type of Change
🔍 Changes Walkthrough
apps/importer/src/shopee/ai-spec-enricher.tssanitizeKeySpecTextto clean AI-generated text. Added URL validation for the AI base URL and bounded timeout/temperature parameters.apps/importer/src/shopee/arena-spec-syncer.tsnormalizeArenaUrlto validate and sanitize GSM Arena and Phone Arena URLs, rejecting non-HTTP(S) or path-traversal attempts. Enforced integer constraints on RAM/storage parsing and fixed TB formatting logic.apps/importer/src/shopee/entity-matcher.tssanitizeHttpUrlandsanitizeHttpUrlListto filter out invalid or malicious image URLs. Applied strict bounds checking to RAM, storage, screen size, and battery values before database insertion. Filtered fuzzy matches to exclude invalid IDs or similarity scores.apps/importer/src/shopee/product-normalizer.tsapps/importer/src/shopee/__tests__/arena-audit.test.tsapps/importer/src/shopee/__tests__/entity-matcher.test.tsapps/importer/src/shopee/__tests__/open-core-intelligence.test.tsapps/importer/src/shopee/__tests__/shopee-to-supabase.test.ts📊 Architectural Flow
flowchart TD A[Raw Product Data] --> B{Product Normalizer} B -->|Clean Title/Brand/Model| C[Entity Matcher] C -->|Sanitize URLs & Bounds| D[Supabase DB] C -->|Needs Enrichment| E[AI Spec Enricher] E -->|Validate AI Output Bounds| F[Sanitized Specs] F --> D G[Arena HTML] --> H[Arena Spec Syncer] H -->|Normalize URLs & Parse Specs| I[Valid Arena Specs] I --> D