minozzzi/dotfiles/imowiz-web-filter-dataflow-diagnosis

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Diagnose filter and data-flow bugs in the Imowiz web portal (apps/web) — nuqs defaults, buildSearchParams mapping, DTO/mapper casing fragility, and PascalCase API contract

Install

npx vskill@latest install minozzzi/dotfiles/imowiz-web-filter-dataflow-diagnosis

SKILL.md

Diagnosing Filter & Data-Flow Bugs in apps/web (Imowiz Portal)

Use when investigating bugs in /properties or / (home) involving filters, card clicks, detail navigation, or stale/incorrect listings in the apps/web app of the imowiz-frontend monorepo.

Data flow (the golden path — trace bugs along this chain)

FilterSidebar (filter-sidebar.tsx, nuqs setFilters)
→ use-property-filters.ts (useQueryStates parsers + defaults)
→ URL query string (?purpose=1&type=...&beds=...)
→ app/(public)/properties/page.tsx (reads searchParams)
→ modules/properties/screens/properties-list-screen.tsx (converts to GetPropertiesParams)
→ modules/properties/actions/get-properties-action.ts (server action)
→ modules/properties/http/get-properties.ts → buildSearchParams()
→ @imowiz/infra HttpApiClient (ky, no casing normalization)
→ C# backend API (PascalCase query params)

Key files and their roles

FileRole
apps/web/src/modules/properties/hooks/use-property-filters.tsnuqs parsers + defaults. Check withDefault() — shadow defaults fabricate active filters silently.
apps/web/src/modules/properties/components/filter-sidebar.tsxUI labels (e.g. ${num}+) vs values sent. Check if label promises range but value is exact.
apps/web/src/modules/properties/http/get-properties.tsbuildSearchParams() maps frontend → PascalCase API params. Check for exact-vs-range semantics here.
apps/web/src/modules/properties/mappers/property-mapper.tsNormalizes casing: has fallbacks (price ?? sellPrice, bedrooms ?? bedRooms, images ?? photos) — check id which historically has none.
apps/web/src/core/router/routes.tsROUTES.PROPERTIES.update = { path: "/properties/:id", params: { id: true } }.
packages/utils/src/create-generate-route-path/create-generate-route-path.tsgenerateRoutePath() — does path.replace(":id", params.id). If params.id is the string "undefined" → /properties/undefined (bad). If "" → /properties/ (falls to index).

Known bug patterns in this codebase

Pattern 1: nuqs withDefault() fabricates implicit filters
  • parseAsInteger.withDefault(1) makes purpose=1 always present → buildSearchParams sends Purpose=Sale even when user didn't select it.
  • Check: any parser with withDefault(N) where N is truthy AND consumed by buildSearchParams with a truthy guard (if (params.X)) → implicit filter.
  • Fix: drop the withDefault, allow null as neutral state, add a "Qualquer"/"Any" button for null.
Pattern 2: UI label semantics ≠ value semantics
  • Buttons labeled 1+, 2+, 3+ (promising "1 or more") send exact values NumberOfBedrooms=1, not >=1.
  • Fix: change param name to MinNumberOfBedrooms (confirm with Swagger first) or adjust labels to exact.
  • Applies identically to baths and parking.
Pattern 3: Mapper casing fragility
  • C# API likely returns PascalCase (Id, Price, Bedrooms).
  • mapRawPropertyToSummary has casing fallbacks for most fields except id (just item.id).
  • If id comes back as Id (PascalCase), cards generate href="/properties/undefined" or href="/properties/" → 404 or redirects to list.
  • Fix: add item.id ?? item.Id ?? item.ID fallback pattern, plus .filter((p) => p.id) as safety net where mapped.
Pattern 4: featured param silently dropped
  • getPropertiesAction({ featured: true }) passes featured but buildSearchParams ignores it → home "Destaques" section actually gets first 12 arbitrary properties, not backend-flagged featured ones.

Verification approach

  • No automated tests in this repo (copilot-instructions.md confirms). Verification is manual smoke.
  • Must use tenant subdomain in dev (e.g. imowiz.imowiz.com.br:PORT, not localhost) — host-based tenant resolution.
  • eval tool is effective for reproducing buildSearchParams and generateRoutePath behavior with synthetic inputs before committing to a fix.

API contract reminders (C# backend)

  • Query params: PascalCase (Purpose, ListingTypeId, City, NumberOfBedrooms, MinPrice, CurrentPage, PageSize).
  • Purpose values: string enums "Sale", "Rent", "SaleAndRent" — confirm exact strings with Swagger.
  • Range filter param names (e.g. MinNumberOfBedrooms vs NumberOfBedrooms) must be confirmed with Swagger before changing buildSearchParams.
  • Response also PascalCase but mapper handles most casing; the exception is id.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/minozzzi/dotfiles/imowiz-web-filter-dataflow-diagnosis/badge)](https://verified-skill.com/skills/minozzzi/dotfiles/imowiz-web-filter-dataflow-diagnosis)

Something wrong with this skill or its page? Tell us.