feat(22k): object page — full exposure 9 blocks (sales/quartirography/metro/photos/docs/specs/checks) #310
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#310
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/22k-frontend-exposure"
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
Issue #297 sub-task 22k (Phase 6 — Wave C final). Frontend exposure всех данных из Wave A+B на per-object drill-in page
/analytics/objects/[id].Backend
backend/app/services/analytics_queries.py+backend/app/api/v1/analytics.py:object_full_detail()— extended SELECT с 30 new cols из113_22begh(building specs, yard, OVZ, catalog UI, metro, scores, dev_group_name)object_flats_quartirography()— GROUP BY rooms fromdomrf_kn_flatsobject_obj_checks()— SELECT fromdomrf_obj_checks(22f)object_documents()— SELECT fromdomrf_kn_documents(22i)/object/{id}/full,/quartirography,/checks,/documentsFrontend (5 new components + page restructure)
ObjectSpecsTable.tsx— 30+ spec rows (conditional, nulls hidden)ObjectQuartirographyTable.tsx— rooms × count/free/area/priceObjectChecksBadges.tsx— 6 badge pills (passed/failed)ObjectDocumentsList.tsx— PDF links grouped bydoc_typewithsafeUrl()ObjectMetroList.tsx— top3 metro entries with line color dotpage.tsx— 9 блоков incl. DOM.РФ scores KPI row, checks, documents, specsBlocks
Test plan
npx tsc --noEmitpassesruff check backend/app/api/v1/analytics.py backend/app/services/analytics_queries.py/analytics/objects/65136(Малевич) — все 9 блоков renderCloses #297 (Phase 6 — 22k frontend exposure) → issue #297 complete (все 11 sub-tasks 22a-22k merged).
Adds backend queries + 4 API endpoints + 5 frontend components to expose all Wave A+B data on the per-object drill-in page (/analytics/objects/[id]). Backend (analytics_queries.py + analytics.py): - object_full_detail(): extended SELECT with all 30 new cols from 113_22begh (building specs, yard, OVZ, catalog UI, metro, scores, dev_group_name) - object_flats_quartirography(): GROUP BY rooms from domrf_kn_flats - object_obj_checks(): SELECT from domrf_obj_checks (22f) - object_documents(): SELECT from domrf_kn_documents (22i) - 4 new endpoints: /object/{id}/full, /quartirography, /checks, /documents Frontend: - ObjectSpecsTable.tsx — 30+ spec rows, conditional (nulls hidden) - ObjectQuartirographyTable.tsx — rooms x count/free/area/price - ObjectChecksBadges.tsx — 6 badge pills (passed/failed) - ObjectDocumentsList.tsx — PDF links grouped by doc_type with safeUrl() - ObjectMetroList.tsx — top3 metro entries with line color dot - page.tsx: 9 blocks incl. DOM.RF scores KPI row, checks, documents, specs Closes #297 (Phase 6 — 22k frontend exposure)Deep code review — verdict APPROVE, merged.
Backend (analytics_queries.py + analytics.py):
object_full_detail()SELECT сверены с113_22begh_kn_schema_extension.sql— matchdomrf_obj_checks(check_type,passed,checked_at) иdomrf_kn_documents(doc_type,doc_num,posted_at,file_url,size_bytes) — match со схемами 111_22f / 112_22i:objnamed binds везде, нет:param::type(CAST trap чист), нет f-string SQL — psycopg v3 compliant/fullconsistent с существующимobject_detailobject_flats_quartirography()— latest-snapshot CTE предотвращает дубли через множественные снимки;FILTER (WHERE price_rub > 0)корректно исключает нули из MIN/MAXFrontend (5 новых компонентов + restructure):
safeUrl()вObjectDocumentsList.tsx— protocol allowlist (http/https), fallback на#— XSS prevention OKtarget="_blank" rel="noopener noreferrer"на PDF links — корректноtypes/analytics.tsstrict, nullable правильно прокинутоObjectSpecsTable—value !== nullfilter скрывает пустые строки (30+ полей, conditional render)useQueryhooks сenabled: !!objIdguardkeyprops (room_label, check_type, type+doc_num)Minor (non-blocking):
metro_top3typed как массив — UI корректно handles current 1-element payloadCross-file impact:
useObjectDetailостаётся exported вanalytics-api.ts(не удалена, просто не используется на этой странице) — additive change, OKSmoke test plan:
/analytics/objects/65136(Малевич) — все 9 блоков renderCloses #297 — все 11 sub-tasks 22a–22k merged. Phase 6 Wave C финализирован.
Merged via deep-code-reviewer.