Skip to content

fix(super-filtro): BUG-15 a BUG-22 + BUG-VOZ — rebased s/ HEAD (substitui #480)#485

Merged
adm01-debug merged 1 commit into
mainfrom
rebase/480-super-filtro
May 26, 2026
Merged

fix(super-filtro): BUG-15 a BUG-22 + BUG-VOZ — rebased s/ HEAD (substitui #480)#485
adm01-debug merged 1 commit into
mainfrom
rebase/480-super-filtro

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

@adm01-debug adm01-debug commented May 26, 2026

Substitui PR #480 (conflito resolvido — rebased sobre HEAD atual)

BUG-15afeatured: contabilizado/chipeado mas sem filtro no filteredProducts → adicionado
BUG-15bisNew: usava product.isNew (inexistente) → product.newArrival
BUG-15chasPersonalization: ausente do tipo Product → adicionado em product-catalog.ts
BUG-16gender: contabilizado mas sem bloco de filtro → adicionado
BUG-17sizes: contabilizado mas sem filtro via variations.size_code → adicionado
BUG-19 — Stale closure em debouncedSearch: padrão filtersRef + onFilterChangeRef
BUG-20fuzzySearchQuery usava searchParams.get stale → usa filters.search
BUG-21priceRange threshold < 500< 9999 em useCatalogFiltering
BUG-22activeFiltersCount threshold < 500< 9999 em useCatalogState
BUG-VOZsortMap sem best-seller-supplier/best-seller-promo → adicionados em FiltersPage.tsx

fix(lint): != null → !== null (eqeqeq) em useFiltersPageState.ts l.415

Testes: 27/27 passando (super-filtro-bugfix-15-22.test.ts). ESLint: 0 errors. Prettier: limpo.


Summary by cubic

Corrige o Super Filtro: aplica filtros que faltavam, conserta busca/contagem e alinha o range de preço (0–9999). Também adiciona ordenações por voz e reduz flicker em transições.

  • Bug Fixes

    • BUG-15a: filtro de featured aplicado.
    • BUG-15b: isNew mapeado para product.newArrival.
    • BUG-15c: hasPersonalization no tipo Product e filtro aplicado.
    • BUG-16: filtro de gender adicionado.
    • BUG-17: filtro de sizes via variations.size_code.
    • BUG-19: debouncedSearch sem stale closure (refs para filters e onFilterChange).
    • BUG-20: fuzzySearch usa filters.search (não o searchParams stale).
    • BUG-21: priceRange ativa com < 9999 em useCatalogFiltering.
    • BUG-22: activeFiltersCount usa < 9999 em useCatalogState.
    • BUG-VOZ: adicionadas ordenações best-seller-supplier e best-seller-promo.
    • Lint eqeqeq e 27 testes de regressão cobrindo os casos acima.
  • Refactors

    • Transições: uso de React.startTransition + valor diferido para evitar flicker durante ordenação.
    • Prefetch de próxima página simplificado com requestIdleCallback/fallback de timeout.
    • Reset de paginação ao mudar filtros/ordenar sem travar a UI.

Written for commit 44151cb. Summary will update on new commits. Review in cubic

Incorpora PR #480 (fix/super-filtro-audit-bugs-15-23) sobre HEAD atual do main.

BUG-15a — featured: contabilizado/chipeado mas sem filtro no useMemo → adicionado
BUG-15b — isNew: filtro usava product.isNew (inexistente) → product.newArrival
BUG-15c — hasPersonalization: ausente do tipo Product → adicionado em product-catalog.ts
BUG-16  — gender: contabilizado mas sem bloco de filtro → adicionado
BUG-17  — sizes: contabilizado mas sem filtro via variations.size_code → adicionado
BUG-19  — stale closure em debouncedSearch: filtersRef+onFilterChangeRef pattern
BUG-20  — fuzzySearchQuery usava searchParams.get stale → usa filters.search
BUG-21  — priceRange threshold < 500 → < 9999 em useCatalogFiltering
BUG-22  — activeFiltersCount priceRange < 500 → < 9999 em useCatalogState
BUG-VOZ — sortMap sem best-seller-supplier/promo → adicionados em FiltersPage.tsx

fix(lint): != null → !== null (eqeqeq) em useFiltersPageState.ts linha 415

Testes: 27/27 passando (super-filtro-bugfix-15-22.test.ts)

Co-authored-by: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 26, 2026 21:24
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

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

Project Deployment Actions Updated (UTC)
we-dream-big Ready Ready Preview, Comment May 26, 2026 9:24pm

@supabase
Copy link
Copy Markdown

supabase Bot commented May 26, 2026

This pull request has been ignored for the connected project doufsxqlfjyuvxuezpln because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@adm01-debug, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 21 minutes and 14 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2fde615a-2e7e-4b48-9082-58499e79ac86

📥 Commits

Reviewing files that changed from the base of the PR and between db1fa3c and 44151cb.

📒 Files selected for processing (6)
  • src/components/filters/filter-panel/useFilterPanelState.ts
  • src/hooks/products/useCatalogFiltering.ts
  • src/hooks/products/useCatalogState.ts
  • src/pages/filters/useFiltersPageState.ts
  • src/pages/products/FiltersPage.tsx
  • tests/hooks/super-filtro-bugfix-15-22.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rebase/480-super-filtro

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

@adm01-debug adm01-debug merged commit 5e984a0 into main May 26, 2026
38 of 45 checks passed
@adm01-debug adm01-debug deleted the rebase/480-super-filtro branch May 26, 2026 21:25
@adm01-debug adm01-debug review requested due to automatic review settings May 26, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant