fix(sf-03): CompetitorTable Status column + filter tabs #278
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#278
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/sf-03-competitor-table-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
SF FixList #3 — CompetitorTable теперь показывает статус ЖК (Строящиеся/Сданные) с цветным badge + filter tabs.
Depends on backend PR #276 (SF #2) — добавит
site_status/ready_dtв/analyzeresponse. До его deploy все badges будут null/—.Изменения
frontend/src/types/site-finder.ts—ParcelAnalysisCompetitorextended сsite_status?: string | nullиready_dt?: string | null(backward compat, additive)frontend/src/components/site-finder/CompetitorTable.tsx:<StatusBadge>(green=Строящиеся, slate=Сданные, zinc=null)Все (N) | Строящиеся (N) | Сданные (N)сuseState<"all"|"building"|"ready">slice(0, 20)→ footer показываетfiltered.lengthfixes/Fix_SF_CompetitorTable_Status_May17.mdTest plan
—. После deploy → правильные цвета⚠️ Review note: worker использовал inline hex colors (
#d1fae5/#065f46) для badges. По.claude/rules/frontend.mdлучше использовать Tailwind utility classes (bg-emerald-100 text-emerald-700) — reviewer может попросить refactor. Это P3 cleanup, можно follow-up PR (item #19 в epic #271).Related: epic #271 item #3 (Wave 1, last item) · Depends on #276
Merged via deep-code-reviewer — verdict APPROVE.
Что проверено:
competitors.filter(...).slice(0, 20)— correct order, counts от полного списка (не filtered) — tabs показывают true totalsfiltered.lengthconsistent с filter применением"all"|"building"|"ready"— type-safeInline hex vs Tailwind (author-flagged):
Acknowledged. Existing CompetitorTable.tsx уже full inline-styles (
CLASS_COLORS: Record<string, string>с hex, всеstyle={{ ... }}) → worker consistent с existing pattern, не regression. Tailwind migration требует refactor всего файла — отдельный chore (item #19 в epic #271, P3).Smoke checklist после deploy:
/site-finder→ парсель → Market tab → Competitors block → колонка "Статус" видна—(null state)Minor follow-ups (non-blocking, P3):
aria-selected/role="tab"для filter buttons"Строящиеся"/"Сданные"— можно вынести в const enum при следующем refactor (tightly coupled с backend Pydantic, acceptable trade-off)