Repository navigation
Conversation
* fix(proposals): review v2 rollback drops review_text_stored The review submission v2 rollback left rate.review_text_stored(text) behind. gemini found it on the DOS-Me PR (DOS/DOS.Me#1499), which carries the same fix. The replay now checks that all seven functions are gone after the rollback. Refs #1544 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1574) * docs(proposals): dos-me search sorts and filters on the shown rating Draft DOS-Me migration (not applied): rate.search_master_products orders rating_desc and filters p_min_rating on rating_score, then the weighted user rating, then the average, as the web shows them. Built on DOS/DOS.Me#1497's function; verify, rollback and a Docker replay in CI. Refs #1545 * docs(proposals): the search rating filter compares at one decimal (#1545 review) A stored 4.46 shows 4.5, so it now passes a 4.5 minimum; V5 and the replay follow. The proposal lists the web follow-ups the review found. Refs #1545 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): rating fallbacks follow the shown rating (#1545) - The catalog's non-RPC path sorts and filters on resolveCompareEffectiveUserRating, not expert_rating, and compares a minimum rating at one decimal as pages show it. - The leaderboard engine's user score uses the same helper, so a 0-100 average is 4.5, not 0, and a zero weighted rating falls back to the average. - The rating helpers move to rate-domain-core (re-exported from rate-domain), so the engine imports them without a cycle. - OpenAPI says minRating and rating_desc use rating_score_5. Refs #1545 * fix(web): keep the OpenAPI rating text until the search RPC migration (#1545 review) The live search_master_products still filters and sorts on the older ratings; the docs change when the DOS-Me migration from #1574 is applied. Refs #1545 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1576) * chore(db): mirror the p3 review submission v2 migration from dos-me DOS/DOS.Me#1499 is applied to production (promote DOS/DOS.Me#1500, 96237029). Mirror its migration byte for byte into supabase/migrations and regenerate packages/shared-data/src/database.types.ts, so the web gets the types of rate.submit_community_review_v2, rate.rating_criteria and the line helpers. Nothing is applied by this change. Refs #1544 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1577) * feat(web): store review form v2 through submit_community_review_v2 Refs #1544. P3 is live (DOS/DOS.Me#1500, mirrored in #1576), so the stub becomes the real call: rate.submit_community_review_v2 as the signed-in user, with blank criteria left out and no star or reviewer type sent. A 22023 rejection whose DETAIL names a field is shown on that field of the form (criteria.x as criterion.x, criterion_points as points); 42501, 23505, 54000, P0002 and a bare 22023 keep v1's answers, a missing RPC is a 503. The review list gets the analysis verdict (flag_verdict), not the writer's verdict text. The write button is hidden for a category without a criteria list, and the API refuses one. The flag stays off by default. * fix(web): review findings on the v2 rpc wiring Refs #1544. The review category is the product's category row, as the RPC reads it, never a guess from metadata or the name: the API and the write button use it, so no one fills a form the RPC refuses. The stored item keeps the category's own criteria keys. Criterion lines are counted on storedPoint (NFC, no invisible characters) like the RPC. A whole criterion entry the RPC refuses is marked on the criteria box, and P0002 on the product is a 404. 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 aligns the catalog search RPC and client-side rating logic to use the unified "shown rating" (prioritizing
rating_scoreover weighted/average ratings) and implements the full write path for the v2 review form, including category validation, RPC error mapping, and localized field-level error handling.🎯 Type of Change
🔍 Changes Walkthrough
.github/workflows/ci.yml.gitignoreDocs/Proposals/2026-11-01-dos-me-review-submission-v2-rollback.sqlrate.review_text_storedfunction.Docs/Proposals/2026-11-02-dos-me-search-rating-score.sqlrate.search_master_productsto sort/filter using the unified "shown rating" logic (rating_score → weighted → average) instead of raw/expert ratings.Docs/Proposals/2026-11-02-dos-me-search-rating-score-rollback.sqlsearch_master_productsfunction definition.Docs/Proposals/2026-11-02-dos-me-search-rating-score-verify.sqlDocs/Proposals/2026-11-02-dos-me-search-rating-score.mdapps/web/locales/{cs,en,vi}.jsonv2ErrRejectedtranslation key for generic field validation errors.apps/web/src/app/[locale]/smartphones/[slug]/page.tsxapps/web/src/app/api/v1/rate/__tests__/write-paths.test.tsapps/web/src/app/api/v1/rate/reviews/route.tsapps/web/src/components/reviews/JReviewsSection.tsxapps/web/src/components/reviews/ReviewFormV2.tsxcategorySlug.apps/web/src/lib/__tests__/leaderboard-criteria.test.tsapps/web/src/lib/__tests__/review-form-v2.test.tsapps/web/src/lib/leaderboard-engine.tsscoreMasterProductForLeaderboardto useresolveCompareEffectiveUserRatingfor consistent rating calculation.apps/web/src/lib/rate-api.tsgetMasterProductsto use the unified rating resolver and 1-decimal rounding for min-rating filters. RefactorsgetPublishedMasterProductCategorySlugto return a structured object withpublishedandcategorystatus.📊 Architectural Flow
sequenceDiagram participant User participant Web_UI as Web UI (ReviewFormV2) participant API as API Route (reviews/route.ts) participant DB as Supabase (RPC) participant Cache as Next.js Cache User->>Web_UI: Submits v2 Review Web_UI->>API: POST /api/v1/rate/reviews API->>API: Validate Category & Criteria (hasRatingCriteria) alt Category Invalid API-->>Web_UI: 400 INVALID_REVIEW (fieldErrors) else Category Valid API->>DB: submit_community_review_v2 (RPC) alt RPC Success DB-->>API: Review Record API->>Cache: revalidateTag (Reviews, Products, Stats) API-->>Web_UI: 200 OK (Review Item) else RPC Field Error (22023) DB-->>API: Error with details API->>API: Map details to field (reviewV2FieldFromRpcDetail) API-->>Web_UI: 400 INVALID_REVIEW (fieldErrors) else RPC Not Found (P0002) DB-->>API: Error API-->>Web_UI: 404 NOT_FOUND else RPC Unavailable DB-->>API: 404/500 API-->>Web_UI: 503 REVIEWS_UNAVAILABLE end end