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}% )}