From 9f5bf64b022f51caaf5dc12447ca4a393363cc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AF=BC=ED=97=8C?= Date: Mon, 31 Aug 2026 14:59:52 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B7=A0=ED=98=95=20=EA=B0=9C=EC=84=A0=204?= =?UTF-8?q?=EA=B1=B4=20+=20=EC=95=85=EC=84=BC=ED=8A=B8=20=EB=8B=A4?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=ED=8A=B8=20=E2=80=94=20=ED=8C=8C=EB=9E=91?= =?UTF-8?q?=EC=9D=98=20=EC=97=AD=ED=95=A0=EC=9D=84=20=ED=96=89=EB=8F=99?= =?UTF-8?q?=C2=B7=ED=98=84=EC=9E=AC=EC=A0=90=C2=B7=EC=B0=A8=ED=8A=B8?= =?UTF-8?q?=EB=A1=9C=20=ED=95=9C=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 라운드 분모 6/6 정정 (시작 제안 1 + 재협상 5) - 완료 배너 한 줄로 경량화 (큰 숫자는 좌측 패널 전담, 완료 배지는 초록 전환) - 차트 기준선 라벨을 선 위로 — 우측 여백 제거로 플롯이 카드 폭 전체 사용 - 우측 순서 재배치: 가격 라운드 → 엔진 판단 → 협상 진행 - 무채색 강등: 완료 스텝 체크·라운드 %·채팅 카드 칩·지표 바 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP --- frontend/src/components/ChatPanel.tsx | 23 +++++---- frontend/src/components/Dashboard.tsx | 65 +++++++++++++------------- frontend/src/components/PriceChart.tsx | 25 ++++++---- frontend/src/components/PricePanel.tsx | 6 ++- 4 files changed, 66 insertions(+), 53 deletions(-) diff --git a/frontend/src/components/ChatPanel.tsx b/frontend/src/components/ChatPanel.tsx index f8fb13c..b3e1a99 100644 --- a/frontend/src/components/ChatPanel.tsx +++ b/frontend/src/components/ChatPanel.tsx @@ -130,7 +130,7 @@ export function ChatPanel({
{stepLabel(m.step)} {m.meta?.card_id && ( - + {m.meta.card_id} )} @@ -167,16 +167,19 @@ export function ChatPanel({
{nego.done ? (
+ {/* 큰 숫자는 좌측 최종 합의가 패널이 담당 — 여기서는 사건만 알린다 */} {finalPrice != null ? ( -
-

협상 완료

-

- {finalPrice.toLocaleString()}원 - - 기존가 대비 −{savedPct}% - -

-
+

+ + + + + + 협상 완료 + + 최종 합의가 {finalPrice.toLocaleString()}원 · −{savedPct}% + +

) : ( 협상이 종료되었습니다 )} diff --git a/frontend/src/components/Dashboard.tsx b/frontend/src/components/Dashboard.tsx index 0827c38..364cda3 100644 --- a/frontend/src/components/Dashboard.tsx +++ b/frontend/src/components/Dashboard.tsx @@ -3,7 +3,7 @@ import type { DemoCase } from '../content/cases' import type { NegoState, Round } from '../App' const FLOW = ['서비스안내', '담당자확인', '협상품목안내', '가격협상', '협상종료'] -const MAX_ROUNDS = 5 +const MAX_ROUNDS = 6 // 시작 제안 1회 + 재협상 5회(엔진 MAX_ITERATION) // 긴장도 구간 → 응대 페르소나 (엔진 프리셋과 동일한 3구간) const PERSONA_ZONE: Record = { @@ -35,7 +35,7 @@ function Panel({ title, right, children }: { title: string; right?: React.ReactN function StepCircle({ state }: { state: 'done' | 'current' | 'todo' }) { if (state === 'done') { return ( - + @@ -72,34 +72,6 @@ export function Dashboard({ return (
@@ -224,6 +196,35 @@ export function Dashboard({

)} + + +
    + {FLOW.map((s, i) => { + const state = i < fi ? 'done' : i === fi ? 'current' : 'todo' + return ( +
  1. +
    + + {i < FLOW.length - 1 && ( +
    + )} +
    + + {s} + +
  2. + ) + })} +
+
) } diff --git a/frontend/src/components/PriceChart.tsx b/frontend/src/components/PriceChart.tsx index 4886295..34e131e 100644 --- a/frontend/src/components/PriceChart.tsx +++ b/frontend/src/components/PriceChart.tsx @@ -10,7 +10,8 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price const W = 300 const H = 150 - const PAD = { top: 14, right: 78, bottom: 12, left: 10 } + // 기준선 라벨을 선 위에 얹어 우측 여백을 최소화 — 플롯이 카드 폭을 거의 다 쓴다 + const PAD = { top: 16, right: 10, bottom: 10, left: 10 } const plotW = W - PAD.left - PAD.right const plotH = H - PAD.top - PAD.bottom @@ -31,12 +32,13 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price ] .map((r) => ({ ...r, y: yOf(r.v), ly: yOf(r.v) })) .sort((a, b) => a.y - b.y) - const MIN_GAP = 14 - for (let i = 1; i < refs.length; i++) { - if (refs[i].ly - refs[i - 1].ly < MIN_GAP) refs[i].ly = refs[i - 1].ly + MIN_GAP + // 라벨은 각자 선 위에 얹히므로, 가까우면 위쪽 라벨을 밀어 올려 겹침을 피한다 + const MIN_GAP = 12 + for (let i = refs.length - 2; i >= 0; i--) { + if (refs[i + 1].ly - refs[i].ly < MIN_GAP) refs[i].ly = refs[i + 1].ly - MIN_GAP } - const overflow = refs[refs.length - 1].ly - (H - 4) - if (overflow > 0) for (const r of refs) r.ly -= overflow + const clip = 13 - refs[0].ly + if (clip > 0) for (const r of refs) r.ly += clip const pts = priceTrail.map((v, i) => ({ x: xOf(i), y: yOf(v), v })) const line = pts.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`).join(' ') @@ -68,7 +70,7 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price {r.label} {r.v.toLocaleString()} diff --git a/frontend/src/components/PricePanel.tsx b/frontend/src/components/PricePanel.tsx index 066c5cc..ca39f46 100644 --- a/frontend/src/components/PricePanel.tsx +++ b/frontend/src/components/PricePanel.tsx @@ -32,7 +32,11 @@ export function PricePanel({ 원

{savedPct != null && ( - + 기존가 대비 −{savedPct}% )}