feat(site-finder): grounded parcel-chat panel UI (#958) #1174
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#1174
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/chat-ui-958"
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
First slice of #958 — the parcel-chat UI panel, consuming the just-shipped chat backend (#957). Mounts on
site-finder/analysis/[cad]below the §22 forecast section (chat sits below the data it grounds on).ChatPanel.tsx("use client"): textarea + send, history-aware thread (cap 10 turns), 5 preset-intent quick-buttons (Сводка / Что строить / Почему такой прогноз / Риски / Сценарии), Enter-to-send / Shift+Enter newline.postChatAskinsite-finder-api.tsvia the sharedapiFetch(base URL + X-Session-Id inherited). Types inline (codegen targets unreachable localhost in this env) — match the backend contract field-for-field.toLocaleString("ru")), subtle «Детерминированный ответ» marker whenllm_used=false.report_status="pending"→ neutral "запустите анализ" turn (NOT an error), network error →role="alert"+ retry.The LLM prose path lights up once
LLM_ENABLED=true+ key in prod; until then the panel shows the deterministic chat answers (which work now).Test plan
npm run lint→ clean;npx tsc --noEmit→ cleanvitest run ChatPanel.test.tsx→ 6 passed (render, preset-button sends correct intent+cad_num, advisory/provenance render, pending-not-error, error-retry-refires, free-text submit)/site-finder/analysis/<cad>→ "Чат по участку" panel — preset buttons, advisory/provenance on a real answer, pending message for a no-forecast parcelConventions
Tokens-only (no inline hex), Lucide icons (no emoji),
<Badge>/Section patterns, TanStackuseMutation(no useEffect-for-HTTP), TS strict (noany), XSS-safe plain-text rendering, a11y (label/aria/focus/role=alert). No new dependency (package.json/lockfile untouched).Scope / next
Chat UI only. Did NOT touch the horizon-selector (needs parcels.py — other dev) or build the broader forecast/scenario display screens (separate follow-up).
Refs #958